]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
19 years agoStatize devfs_ops_f
phk [Thu, 10 Feb 2005 12:04:26 +0000 (12:04 +0000)]
Statize devfs_ops_f

19 years agoMake a bunch of malloc types static.
phk [Thu, 10 Feb 2005 12:02:37 +0000 (12:02 +0000)]
Make a bunch of malloc types static.

Found by: src/tools/tools/kernxref

19 years ago"device" and "nodevice" lines can actually specify more than one device
des [Thu, 10 Feb 2005 10:46:27 +0000 (10:46 +0000)]
"device" and "nodevice" lines can actually specify more than one device
(separated by commas), so add "devices" and "nodevices" as aliases.

MFC after:  2 weeks

19 years agoback out 1.7 changes, unneeded and possibly wrong.
alfred [Thu, 10 Feb 2005 10:44:29 +0000 (10:44 +0000)]
back out 1.7 changes, unneeded and possibly wrong.

19 years agoNote that the ICH6 controller is supported.
jkoshy [Thu, 10 Feb 2005 10:31:32 +0000 (10:31 +0000)]
Note that the ICH6 controller is supported.

Reviewed by: sos

19 years agoSync program's usage() with manpage's SYNOPSIS.
ru [Thu, 10 Feb 2005 09:39:51 +0000 (09:39 +0000)]
Sync program's usage() with manpage's SYNOPSIS.

19 years agoSync program's usage() with manpage's SYNOPSIS.
ru [Thu, 10 Feb 2005 09:19:34 +0000 (09:19 +0000)]
Sync program's usage() with manpage's SYNOPSIS.

19 years agoTurn K&R functions into prototypes.
stefanf [Thu, 10 Feb 2005 09:13:20 +0000 (09:13 +0000)]
Turn K&R functions into prototypes.

19 years agoThe variable `ROOTKEY' has internal linkage in keyserv.c, don't declare it as
stefanf [Thu, 10 Feb 2005 09:09:18 +0000 (09:09 +0000)]
The variable `ROOTKEY' has internal linkage in keyserv.c, don't declare it as
extern here.

19 years agoThe variable `arglist' has internal linkage in pw.c, don't declare it as extern
stefanf [Thu, 10 Feb 2005 09:05:27 +0000 (09:05 +0000)]
The variable `arglist' has internal linkage in pw.c, don't declare it as extern
here.

19 years agoTurn K&R functions into prototypes.
stefanf [Thu, 10 Feb 2005 09:00:55 +0000 (09:00 +0000)]
Turn K&R functions into prototypes.

19 years agoAdd __printflike() to vn_printf()
phk [Thu, 10 Feb 2005 08:55:40 +0000 (08:55 +0000)]
Add __printflike() to vn_printf()

19 years agoDon't pass NULL to vprint()
phk [Thu, 10 Feb 2005 08:55:08 +0000 (08:55 +0000)]
Don't pass NULL to vprint()

19 years agoLet the generated code include <string.h> instead of <memory.h>.
stefanf [Thu, 10 Feb 2005 08:12:38 +0000 (08:12 +0000)]
Let the generated code include <string.h> instead of <memory.h>.

19 years agoCode cleanup:
delphij [Thu, 10 Feb 2005 07:07:32 +0000 (07:07 +0000)]
Code cleanup:
- Prefer modern declaration of functions
- WARNS?= 4 -> 6

19 years agoExtricate probing of the gwether card (Gateway AT) from the middle of
imp [Thu, 10 Feb 2005 06:09:03 +0000 (06:09 +0000)]
Extricate probing of the gwether card (Gateway AT) from the middle of
probing the novell ne[12]000 cards.  It should be its own thing, ala
how we do the dl100xx support doing its own thing at the right time.
For the moment, it is just a function, which makes the mainline of the
generic probe easier to follow.

Also, correct a couple of comments that looked wrong.

# there may be a bug in setting up gwether, in that we set
# sc->rec_page_stop based on memsize, rather than sc->mem_size, so if
# these two are different, then the rec_page_stop will be wrong.  I'm
# hesitant to fix it without real hardware to test with.  Since
# gwether isn't in the hardware list of the man page nor in the commit
# messages, it is hard to know for sure.

19 years agoRemove an ifdef that's been here for a long time. So long, in fact,
imp [Thu, 10 Feb 2005 05:34:25 +0000 (05:34 +0000)]
Remove an ifdef that's been here for a long time.  So long, in fact,
that it references a function parameter that's not been passed in for
more than 4 years.

This has been if 0'd since 1994.

19 years agoFix incorrect comment.
archie [Thu, 10 Feb 2005 02:43:26 +0000 (02:43 +0000)]
Fix incorrect comment.

Submitted by: James Bowman <jamesb@acelere.net>

19 years ago - Add more information to the getnewbuf() recycling KTR.
jeff [Thu, 10 Feb 2005 02:22:56 +0000 (02:22 +0000)]
 - Add more information to the getnewbuf() recycling KTR.

Sponsored by: Isilon Systems, Inc.

19 years agoImplement interrupt routing for DEC_KN20AA.
ticso [Thu, 10 Feb 2005 00:35:31 +0000 (00:35 +0000)]
Implement interrupt routing for DEC_KN20AA.

Tested by: wilko
MFC after: 2 weeks

19 years ago - In the softupdates case for ffs_truncate() we use vinvalbuf() to
jeff [Wed, 9 Feb 2005 23:05:20 +0000 (23:05 +0000)]
 - In the softupdates case for ffs_truncate() we use vinvalbuf() to
   invalidate pending io and dependencies.  However, vinvalbuf() rightfully
   does not call vnode_pager_setsize() for us.  We must do this here.  This
   could potentially have caused numerous kinds of bugs, but it was
   specifically causing msync() deadlocks because msync() was writing
   flushing pages that should not have been valid.

Sponsored by: Isilon Systems, Inc.
Reported by: kkenn

19 years agoFix pc98 compile: merge in changes to use the local APIC timer. Also, add
jhb [Wed, 9 Feb 2005 22:48:22 +0000 (22:48 +0000)]
Fix pc98 compile: merge in changes to use the local APIC timer.  Also, add
missing initialization of i8254_intsrc while I am here.

19 years ago- Correctly spell MOD_QUIESCE
glebius [Wed, 9 Feb 2005 22:06:16 +0000 (22:06 +0000)]
- Correctly spell MOD_QUIESCE
- use .Dv for it

MFC after: 3 days

19 years agoMinor nits noted by ru@
imp [Wed, 9 Feb 2005 21:23:48 +0000 (21:23 +0000)]
Minor nits noted by ru@

19 years agoConstify.
phk [Wed, 9 Feb 2005 20:56:32 +0000 (20:56 +0000)]
Constify.

19 years agoSync program's usage() with manpage's SYNOPSIS.
ru [Wed, 9 Feb 2005 20:36:12 +0000 (20:36 +0000)]
Sync program's usage() with manpage's SYNOPSIS.

19 years agoRemoved Kerberos remnants.
ru [Wed, 9 Feb 2005 20:23:36 +0000 (20:23 +0000)]
Removed Kerberos remnants.

19 years agoNote the options required for the cards as I know it...
imp [Wed, 9 Feb 2005 20:08:05 +0000 (20:08 +0000)]
Note the options required for the cards as I know it...

19 years agoBreak out obscure ISA cards into their own files, as well as ne2000
imp [Wed, 9 Feb 2005 20:03:40 +0000 (20:03 +0000)]
Break out obscure ISA cards into their own files, as well as ne2000
and wd80x3 support.  Make the obscure ISA cards optional, and add
those options to NOTES on i386 (note: the ifdef around the whole code
is for module building).  Tweak pc98 ed support to include wd80x3 too.
Add goo for alpha too.

The affected cards are the 3Com 3C503, HP LAN+ and SIC (whatever that
is).  I couldn't find any of these for sale on ebay, so they are
untested.  If you have one of these cards, and send it to me, I'll
ensure that you have no future problems with it...

Minor cleanups as well by using functions rather than cut and paste
code for some probing operations (where the function call overhead is
lost in the noise).

Remove use of kvtop, since they aren't required anymore.  This driver
needs to get its memory mapped act together, however, and use bus
space.  It doesn't right now.

This reduces the size of if_ed.ko from about 51k to 33k on my laptop.

19 years agoThe only user of this utility (share/man/man0) was removed 2+ years ago.
ru [Wed, 9 Feb 2005 19:50:45 +0000 (19:50 +0000)]
The only user of this utility (share/man/man0) was removed 2+ years ago.

19 years agoAccess softc embedded struct ifnet via function macro to make it easier to
mlaier [Wed, 9 Feb 2005 19:29:13 +0000 (19:29 +0000)]
Access softc embedded struct ifnet via function macro to make it easier to
untangle struct ifnet and softc/arpcom in the future.

Requested by: brooks

19 years agoUse defines for character constants for open and closing braces and
harti [Wed, 9 Feb 2005 18:44:09 +0000 (18:44 +0000)]
Use defines for character constants for open and closing braces and
parantheses. This helps editors to find its way through the horrible
mess of Var_Parse. Rewrite a for() loop into a while() to make it clearer.

Submitted by: Max Okumoto <okumoto@ucsd.edu>

19 years agoadd support for NetMos NM9805 1284 Printer port
wilko [Wed, 9 Feb 2005 18:38:28 +0000 (18:38 +0000)]
add support for NetMos NM9805 1284 Printer port

Submitted by: Willy Offermans <W.K.Offermans@TUe.nl>

MFC after: 2 weeks

19 years agoSync program's usage() with manpage's SYNOPSIS.
ru [Wed, 9 Feb 2005 18:22:15 +0000 (18:22 +0000)]
Sync program's usage() with manpage's SYNOPSIS.

19 years agoFixed the misplaced $FreeBSD$.
ru [Wed, 9 Feb 2005 18:07:17 +0000 (18:07 +0000)]
Fixed the misplaced $FreeBSD$.

19 years agoSince we no longer use kvtop, we no longer need machine/md_var.h
imp [Wed, 9 Feb 2005 17:37:53 +0000 (17:37 +0000)]
Since we no longer use kvtop, we no longer need machine/md_var.h

19 years agoSync program's usage() with manpage's SYNOPSIS.
ru [Wed, 9 Feb 2005 17:37:39 +0000 (17:37 +0000)]
Sync program's usage() with manpage's SYNOPSIS.

19 years agoIf either ed_probe_Novell or ed_attach returns an error, release the
imp [Wed, 9 Feb 2005 17:35:13 +0000 (17:35 +0000)]
If either ed_probe_Novell or ed_attach returns an error, release the
resources too.

19 years agoRemove some unused variables.
scottl [Wed, 9 Feb 2005 17:19:12 +0000 (17:19 +0000)]
Remove some unused variables.

19 years ago- Reduce the number of netgraph messages when listing
ru [Wed, 9 Feb 2005 16:17:33 +0000 (16:17 +0000)]
- Reduce the number of netgraph messages when listing
  nodes from (N + 1) to 1, where N is the number of
  nodes in the system.

- Implement "ls -l" which runs the "show" command for
  each node.

In collaboration with: glebius

19 years agoIn revision 1.29 timeout() was converted to ng_callout().
ru [Wed, 9 Feb 2005 15:14:44 +0000 (15:14 +0000)]
In revision 1.29 timeout() was converted to ng_callout().

The difference is that the callout function installed via the
ng_callout() method is guaranteed to NOT fire after the shutdown
method was run (when a node is marked NGF_INVALID).  Also, the
shutdown method and the callout function are guaranteed to NOT
run at the same time, as both require the writer lock.  Thus
we can safely ignore a zero return value from ng_uncallout()
(callout_stop()) in shutdown methods, and go on with freeing
the node.

The said revision broke the node shutdown -- ng_bridge_timeout()
is no longer fired after ng_bridge_shutdown() was run, resulting
in a memory leak, dead nodes, and inability to unload the module.
Fix this by cancelling the callout on shutdown, and moving part
responsible for freeing a node resources from ng_bridge_timer()
to ng_bridge_shutdown().

Noticed by: ru
Submitted by: glebius, ru

19 years agoWhile working on constification temporarily disable -Werror. Things are too
harti [Wed, 9 Feb 2005 13:22:02 +0000 (13:22 +0000)]
While working on constification temporarily disable -Werror. Things are too
twisted.

19 years agoUntangle VarFind and, while rewriting most of the function, fix the
harti [Wed, 9 Feb 2005 13:13:59 +0000 (13:13 +0000)]
Untangle VarFind and, while rewriting most of the function, fix the
intendation. (A large part of the function was already at intendation 8).

19 years agoProperly initialise the variable `deny'.
stefanf [Wed, 9 Feb 2005 13:02:43 +0000 (13:02 +0000)]
Properly initialise the variable `deny'.

19 years agostyle polishing.
phk [Wed, 9 Feb 2005 12:22:16 +0000 (12:22 +0000)]
style polishing.

19 years agoPass -C to rpcgen.
stefanf [Wed, 9 Feb 2005 12:17:52 +0000 (12:17 +0000)]
Pass -C to rpcgen.

19 years agoUse CFLAGS+=.
ru [Wed, 9 Feb 2005 11:50:43 +0000 (11:50 +0000)]
Use CFLAGS+=.

19 years agoRemove the messy locking dance around xpt_done()
scottl [Wed, 9 Feb 2005 11:50:16 +0000 (11:50 +0000)]
Remove the messy locking dance around xpt_done()

19 years agoProvide locking for the ccb_bioq. This allows xpt_done() to be called without
scottl [Wed, 9 Feb 2005 11:44:15 +0000 (11:44 +0000)]
Provide locking for the ccb_bioq.  This allows xpt_done() to be called without
Giant held.  In camisr(), move the ccb_bioq elements to a temporary local list
and then process the elements off of that list.  This enables the list to be
processed by only taking the ccb_bioq_lock once and only for a very short
time.

ccb_bioq_lock is a leaf mutex, so it's fine to call xpt_done() with other
locks held.  This is just a very minor step in the work to lock CAM, but
it allows us to avoid some messy locking/unlock dances in certain drivers.

19 years agoUse CFLAGS+=.
stefanf [Wed, 9 Feb 2005 10:35:28 +0000 (10:35 +0000)]
Use CFLAGS+=.

19 years agoIntroduce VarCreate and VarDestroy functions and used them where
harti [Wed, 9 Feb 2005 09:53:28 +0000 (09:53 +0000)]
Introduce VarCreate and VarDestroy functions and used them where
appropriate.

Submitted by: Max Okumoto <okumoto@ucsd.edu>

19 years agoInclude missing headers.
stefanf [Wed, 9 Feb 2005 09:13:36 +0000 (09:13 +0000)]
Include missing headers.

19 years agoFix the standalone module build.
obrien [Wed, 9 Feb 2005 08:35:24 +0000 (08:35 +0000)]
Fix the standalone module build.

19 years ago- Remove g_gate_hold()/g_gate_release() from start/done paths. It saves
pjd [Wed, 9 Feb 2005 08:29:39 +0000 (08:29 +0000)]
- Remove g_gate_hold()/g_gate_release() from start/done paths. It saves
  4 mutex operations per I/O requests.
- Use only one mutex to protect both (incoming and outgoing) queue.
  As MUTEX_PROFILING(9) shows, there is no big contention for this lock.
- Protect sc_queue_count with queue mutex, instead of doing atomic
  operations on it.
- Remove DROP_GIANT()/PICKUP_GIANT() - ggate is marked as MPSAFE and no
  Giant there.

19 years agoEmblish rev 1.180 to -fno-strict-alias w/-Os & -O3 also.
obrien [Wed, 9 Feb 2005 07:34:22 +0000 (07:34 +0000)]
Emblish rev 1.180 to -fno-strict-alias w/-Os & -O3 also.

19 years agoRemove DLINK_3, its unused. Remove NETGEAR FA410TX, since it is the
imp [Wed, 9 Feb 2005 06:16:27 +0000 (06:16 +0000)]
Remove DLINK_3, its unused.  Remove NETGEAR FA410TX, since it is the
same as the LINKSYS COMBO_ECARD (which also seems to be the same as
another linksys product that also has a modem, but I can't find that
one at the moment).  Remove the PCM100, since it is now no longer
used.

19 years agoo Remove duplicate LINKSYS ETHERFAST entry.
imp [Wed, 9 Feb 2005 06:03:36 +0000 (06:03 +0000)]
o Remove duplicate LINKSYS ETHERFAST entry.
o The COMBO_ECARD comes in many flavors, it seems, so probe both the DL10019
  and the AX88x90 on it.  Since this seems to work with no ill effects, maybe
  the probing should happen more generally rather than being table driven.
  Need to think more about this.
o Remove PCM100 because it is duplicative (the ETHERFAST is the pcm100 and
  apparently has the same IDs).  It was here for NetBSD because they match
  up an expected MAC address OID, but since we don't bother with that, we
  don't need to be so finely discriminating.
o Minor style nit.

19 years agoRemove reference to softc from probe entirely...
imp [Wed, 9 Feb 2005 05:55:54 +0000 (05:55 +0000)]
Remove reference to softc from probe entirely...

19 years agos/descr/oid_descr/
marcel [Wed, 9 Feb 2005 04:48:23 +0000 (04:48 +0000)]
s/descr/oid_descr/

19 years agoAdd missed merge of ripcbinfo extern. Given how widely used
rwatson [Wed, 9 Feb 2005 01:12:43 +0000 (01:12 +0000)]
Add missed merge of ripcbinfo extern.  Given how widely used
ripcbinfo is, we should probably add it to an include file.

Spotted by: mux

19 years agoMinor style cleanup. Get rid of extra {}, extra blank lines and some
imp [Wed, 9 Feb 2005 00:50:59 +0000 (00:50 +0000)]
Minor style cleanup.  Get rid of extra {}, extra blank lines and some
continued line indentation.  Should be no functional changes.

19 years agomove pmap.h after vm.h include... some of the headers from pmap.h depend
jmg [Wed, 9 Feb 2005 00:10:17 +0000 (00:10 +0000)]
move pmap.h after vm.h include...  some of the headers from pmap.h depend
upon vm.h

19 years agoo Remove ifdef PC98, since this file has diverged quite a bit from
imp [Wed, 9 Feb 2005 00:06:12 +0000 (00:06 +0000)]
o Remove ifdef PC98, since this file has diverged quite a bit from
  if_ed_isa.c, and they seem to not be helpful anymore.
o Fix style issues from de-Pification.
o change from _isa_ to _cbus_ to the largest extent possible to reflect that
  this is really for cbus, not isa.
o Use ANSI function definitions.
o Use ed_clear_memory
o eliminate kvtop

19 years agoNo need to bzero softc.
imp [Tue, 8 Feb 2005 23:58:38 +0000 (23:58 +0000)]
No need to bzero softc.

19 years agoConvenience function to clear memory of the card, and then check to make
imp [Tue, 8 Feb 2005 23:57:43 +0000 (23:57 +0000)]
Convenience function to clear memory of the card, and then check to make
sure that it works by reading back as 0.

19 years ago - Add a new assert in the getnewvnode(). Assert that the usecount is still
jeff [Tue, 8 Feb 2005 23:27:10 +0000 (23:27 +0000)]
 - Add a new assert in the getnewvnode().  Assert that the usecount is still
   0 to detect getnewvnode() races.
 - Add the vnode address to a few panics near by to help in debugging.

Sponsored by: Isilon Systems, Inc.

19 years ago - Remove an invalid KASSERT added in recent background write reshuffling.
jeff [Tue, 8 Feb 2005 23:25:08 +0000 (23:25 +0000)]
 - Remove an invalid KASSERT added in recent background write reshuffling.

Sponsored by: Isilon Systems, Inc.

19 years agoLock raw IP socket pcb list and PCBs when processing input via
rwatson [Tue, 8 Feb 2005 22:16:26 +0000 (22:16 +0000)]
Lock raw IP socket pcb list and PCBs when processing input via
icmp6_rip6_input().

Reviewed by: gnn
MFC after: 1 week

19 years ago- Add debug.watchdog tunable, so we can specify watchdog CPU from loader
pjd [Tue, 8 Feb 2005 22:15:24 +0000 (22:15 +0000)]
- Add debug.watchdog tunable, so we can specify watchdog CPU from loader
  which will help to debug hangs on boot.
- Remove 'U' from debug.watchdog sysctl definition, so if we set it to '-1'
  it really shows '-1'.
- Fix comment.

Reviewed by: rwatson

19 years agoAdd a new sysctl, "security.jail.chflags_allowed", which controls the
cperciva [Tue, 8 Feb 2005 21:31:11 +0000 (21:31 +0000)]
Add a new sysctl, "security.jail.chflags_allowed", which controls the
behaviour of chflags within a jail.  If set to 0 (the default), then a
jailed root user is treated as an unprivileged user; if set to 1, then
a jailed root user is treated the same as an unjailed root user.

This is necessary to allow "make installworld" to work inside a jail,
since it attempts to manipulate the system immutable flag on certain
files.

Discussed with: csjp, rwatson
MFC after: 2 weeks

19 years agoSplit the vop_vector for ffs1 and ffs2, this is mostly for the different
phk [Tue, 8 Feb 2005 21:03:52 +0000 (21:03 +0000)]
Split the vop_vector for ffs1 and ffs2, this is mostly for the different
EXTATTR support.

19 years agoUse ffs_truncate() directly instead of UFS_TRUNCATE()
phk [Tue, 8 Feb 2005 20:51:00 +0000 (20:51 +0000)]
Use ffs_truncate() directly instead of UFS_TRUNCATE()

19 years agoRemove type 0x4 (FAT12 <32MB) to make room for type 0x7 (NTFS).
des [Tue, 8 Feb 2005 20:43:04 +0000 (20:43 +0000)]
Remove type 0x4 (FAT12 <32MB) to make room for type 0x7 (NTFS).

19 years agoBackground writes are entirely an FFS/Softupdates thing.
phk [Tue, 8 Feb 2005 20:29:10 +0000 (20:29 +0000)]
Background writes are entirely an FFS/Softupdates thing.

Give FFS vnodes a specific bufwrite method which contains all the
background write stuff and then calls into the default bufwrite()
for the rest of the job.

Remove all the background write related stuff from the normal bufwrite.

This drags the softdep_move_dependencies() back into FFS.

Long term, it is worth looking at simply copying the data into
allocated memory and issuing the bio directly and not create the
"shadow buf" in the first place (just like copy-on-write is done
in snapshots for instance).  I don't think we really gain anything
but complexity from doing this with a buf.

19 years agoUse the local APIC timer to drive the various kernel clocks on SMP machines
jhb [Tue, 8 Feb 2005 20:25:07 +0000 (20:25 +0000)]
Use the local APIC timer to drive the various kernel clocks on SMP machines
rather than forwarding interrupts from the clock devices around using IPIs:
- Add an IDT vector that pushes a clock frame and calls
  lapic_handle_timer().
- Add functions to program the local APIC timer including setting the
  divisor, and setting up the timer to either down a periodic countdown
  or one-shot countdown.
- Add a lapic_setup_clock() function that the BSP calls from
  cpu_init_clocks() to setup the local APIC timer if it is going to be
  used.  The setup uses a one-shot countdown to calibrate the timer.  We
  then program the timer on each CPU to fire at a frequency of hz * 3.
  stathz is defined as freq / 23 (hz * 3 / 23), and profhz is defined as
  freq / 2 (hz * 3 / 2).  This gives the clocks relatively prime divisors
  while keeping a low LCM for the frequency of the clock interrupts.
  Thanks to Peter Jeremy for suggesting this approach.
- Remove the hardclock and statclock forwarding code including the two
  associated IPIs.  The bitmap IPI handler has now effectively degenerated
  to just IPI_AST.
- When the local APIC timer is used we don't turn the RTC on at all, but
  we still enable interrupts on the ISA timer 0 (i8254) for timecounting
  purposes.

19 years agoDocument EBUSY.
trhodes [Tue, 8 Feb 2005 20:16:59 +0000 (20:16 +0000)]
Document EBUSY.

PR: 73387
Submitted by: Thomas Ludwig <tludwig@smr.ch> (original version)

19 years agoAdd xrefs to crypt(3) and pw(8) and add a warning about not manually
trhodes [Tue, 8 Feb 2005 19:23:24 +0000 (19:23 +0000)]
Add xrefs to crypt(3) and pw(8) and add a warning about not manually
altering passwd related files.

PR:             74656
Submitted by:   Jilles Tjoelker <jilles@stack.nl> (original version)

19 years agoDrag another softupdates tentacle back into FFS: Now that FFS's
phk [Tue, 8 Feb 2005 18:09:11 +0000 (18:09 +0000)]
Drag another softupdates tentacle back into FFS:  Now that FFS's
vop_fsync is separate from the internal use we can do the full job
there.

19 years agoMaxunit is inclusive so fix off-by-one in previous commit.
njl [Tue, 8 Feb 2005 18:03:17 +0000 (18:03 +0000)]
Maxunit is inclusive so fix off-by-one in previous commit.

19 years agoUpdate device_find_child(9) to return the first matching child if unit
njl [Tue, 8 Feb 2005 18:00:29 +0000 (18:00 +0000)]
Update device_find_child(9) to return the first matching child if unit
is set to -1.

Reviewed by: dfr, imp

19 years agoSimplify the "and if we're in the debugger, don't use locks" logic,
rwatson [Tue, 8 Feb 2005 17:56:04 +0000 (17:56 +0000)]
Simplify the "and if we're in the debugger, don't use locks" logic,
correcting some misthinking.

Discussed with (really this time): bde

19 years agoAlso add the manpage entry for cpufreq.
njl [Tue, 8 Feb 2005 17:44:18 +0000 (17:44 +0000)]
Also add the manpage entry for cpufreq.

19 years agoAdd an initial manpage for the cpufreq framework and methods to help users
njl [Tue, 8 Feb 2005 17:43:35 +0000 (17:43 +0000)]
Add an initial manpage for the cpufreq framework and methods to help users
and developers who want to import new hardware drivers.  This could also
certainly use mdoc review.

19 years agoDon't use the UFS_* and VFS_* functions where a direct call is possble.
phk [Tue, 8 Feb 2005 17:40:01 +0000 (17:40 +0000)]
Don't use the UFS_* and VFS_* functions where a direct call is possble.

The UFS_ functions are for UFS to call back into VFS.  The VFS functions
are external entry points into the filesystem.

19 years ago(forced commit to record correct commit message)
phk [Tue, 8 Feb 2005 17:23:39 +0000 (17:23 +0000)]
(forced commit to record correct commit message)

Split ffs_fsync() into a VOP_FSYNC() component and an internal part
called ffs_syncvnode().

Eliminate unnecessary thread argument and XXX'ed curthread passes
for same.  Reduce softdep_sync_metadata() from a struct vop_fsync_args
to just the vnode argument it needs.

Convert internal VOP_FSYNC() calls to use ffs_syncvnode().

19 years agoNext step on the road to IRPs: create and use an imitation of the
wpaul [Tue, 8 Feb 2005 17:23:25 +0000 (17:23 +0000)]
Next step on the road to IRPs: create and use an imitation of the
Windows DRIVER_OBJECT and DEVICE_OBJECT mechanism so that we can
simulate driver stacking.

In Windows, each loaded driver image is attached to a DRIVER_OBJECT
structure. Windows uses the registry to match up a given vendor/device
ID combination with a corresponding DRIVER_OBJECT. When a driver image
is first loaded, its DriverEntry() routine is invoked, which sets up
the AddDevice() function pointer in the DRIVER_OBJECT and creates
a dispatch table (based on IRP major codes). When a Windows bus driver
detects a new device, it creates a Physical Device Object (PDO) for
it. This is a DEVICE_OBJECT structure, with semantics analagous to
that of a device_t in FreeBSD. The Windows PNP manager will invoke
the driver's AddDevice() function and pass it pointers to the DRIVER_OBJECT
and the PDO.

The AddDevice() function then creates a new DRIVER_OBJECT structure of
its own. This is known as the Functional Device Object (FDO) and
corresponds roughly to a private softc instance. The driver uses
IoAttachDeviceToDeviceStack() to add this device object to the
driver stack for this PDO. Subsequent drivers (called filter drivers
in Windows-speak) can be loaded which add themselves to the stack.
When someone issues an IRP to a device, it travel along the stack
passing through several possible filter drivers until it reaches
the functional driver (which actually knows how to talk to the hardware)
at which point it will be completed. This is how Windows achieves
driver layering.

Project Evil now simulates most of this. if_ndis now has a modevent
handler which will use MOD_LOAD and MOD_UNLOAD events to drive the
creation and destruction of DRIVER_OBJECTs. (The load event also
does the relocation/dynalinking of the image.) We don't have a registry,
so the DRIVER_OBJECTS are stored in a linked list for now. Eventually,
the list entry will contain the vendor/device ID list extracted from
the .INF file. When ndis_probe() is called and detectes a supported
device, it will create a PDO for the device instance and attach it
to the DRIVER_OBJECT just as in Windows. ndis_attach() will then call
our NdisAddDevice() handler to create the FDO. The NDIS miniport block
is now a device extension hung off the FDO, just as it is in Windows.
The miniport characteristics table is now an extension hung off the
DRIVER_OBJECT as well (the characteristics are the same for all devices
handled by a given driver, so they don't need to be per-instance.)
We also do an IoAttachDeviceToDeviceStack() to put the FDO on the
stack for the PDO. There are a couple of fake bus drivers created
for the PCI and pccard buses. Eventually, there will be one for USB,
which will actually accept USB IRP.s

Things should still work just as before, only now we do things in
the proper order and maintain the correct framework to support passing
IRPs between drivers.

Various changes:

- corrected the comments about IRQL handling in subr_hal.c to more
  accurately reflect reality
- update ndiscvt to make the drv_data symbol in ndis_driver_data.h a
  global so that if_ndis_pci.o and/or if_ndis_pccard.o can see it.
- Obtain the softc pointer from the miniport block by referencing
  the PDO rather than a private pointer of our own (nmb_ifp is no
  longer used)
- implement IoAttachDeviceToDeviceStack(), IoDetachDevice(),
  IoGetAttachedDevice(), IoAllocateDriverObjectExtension(),
  IoGetDriverObjectExtension(), IoCreateDevice(), IoDeleteDevice(),
  IoAllocateIrp(), IoReuseIrp(), IoMakeAssociatedIrp(), IoFreeIrp(),
  IoInitializeIrp()
- fix a few mistakes in the driver_object and device_object definitions
- add a new module, kern_windrv.c, to handle the driver registration
  and relocation/dynalinkign duties (which don't really belong in
  kern_ndis.c).
- made ndis_block and ndis_chars in the ndis_softc stucture pointers
  and modified all references to it
- fixed NdisMRegisterMiniport() and NdisInitializeWrapper() so they
  work correctly with the new driver_object mechanism
- changed ndis_attach() to call NdisAddDevice() instead of ndis_load_driver()
  (which is now deprecated)
- used ExAllocatePoolWithTag()/ExFreePool() in lookaside list routines
  instead of kludged up alloc/free routines
- added kern_windrv.c to sys/modules/ndis/Makefile and files.i386.

19 years agoDon't use VOP_LEASE() with operations on extended attribute backing
rwatson [Tue, 8 Feb 2005 17:05:38 +0000 (17:05 +0000)]
Don't use VOP_LEASE() with operations on extended attribute backing
files.

Pointed out by: phk

19 years agoFor snapshots we need all VOP_LOCKs to be exclusive.
phk [Tue, 8 Feb 2005 16:25:50 +0000 (16:25 +0000)]
For snapshots we need all VOP_LOCKs to be exclusive.

The "business class upgrade" was implemented in UFS's VOP_LOCK
implementation ufs_lock() which is the wrong layer, so move it to
ffs_lock().

Also, as long as we have not abandonned advanced vfs-stacking we
should not preclude it from happening: instead of implementing a
copy locally, use the VOP_LOCK_APV(&ufs) to correctly arrive at
vop_stdlock() at the bottom.

19 years agoFor snapshots we need all VOP_LOCKs to be exclusive.
phk [Tue, 8 Feb 2005 15:54:30 +0000 (15:54 +0000)]
For snapshots we need all VOP_LOCKs to be exclusive.

The "business class upgrade" was implemented in UFS's VOP_LOCK
implementation ufs_lock() which is the wrong layer, so move it to
ffs_lock().

Also, as long as we have not abandonned advanced vfs-stacking we
should not preclude it from happening: instead of implementing a
copy locally, use the VOP_LOCK_APV(&ufs) to correctly arrive at
vop_stdlock() at the bottom.

19 years agoUse VOP_STRATEGY_APV() instead of direct dereference, this is more
phk [Tue, 8 Feb 2005 15:40:11 +0000 (15:40 +0000)]
Use VOP_STRATEGY_APV() instead of direct dereference, this is more
correct.

19 years agoNuke information about GDB_REMOTE_CHAT, it was removed some time ago.
brueffer [Tue, 8 Feb 2005 15:07:50 +0000 (15:07 +0000)]
Nuke information about GDB_REMOTE_CHAT, it was removed some time ago.

MFC after: 3 days

19 years agoAdd VOP_FOO_APV() which takes a pointer to the vop_vector.
phk [Tue, 8 Feb 2005 12:54:32 +0000 (12:54 +0000)]
Add VOP_FOO_APV() which takes a pointer to the vop_vector.

This allows stacked or partitioned filesystems to say "Continue
the normal resolution from here", for instace from FFS to UFS.

Use VNASSERT() instead of KASSERT().

19 years agomerge from geom_vol_ffs.c rev 1.14 (avoid unaligned I/O requests)
des [Tue, 8 Feb 2005 12:34:11 +0000 (12:34 +0000)]
merge from geom_vol_ffs.c rev 1.14 (avoid unaligned I/O requests)

19 years agoKeep only one style of Pittsburgh driver's tests.
ru [Tue, 8 Feb 2005 10:42:22 +0000 (10:42 +0000)]
Keep only one style of Pittsburgh driver's tests.

Noticed by: Pawel Worach

19 years agoUse the correct length when copying trailing data!!
brian [Tue, 8 Feb 2005 10:38:24 +0000 (10:38 +0000)]
Use the correct length when copying trailing data!!

PR: 77104
Submitted by: Martin Birgmeier martin at email dot aon dot at
MFC after: 3 days

19 years agoAllow building/installing of NLS catalogs while building of libraries
phantom [Tue, 8 Feb 2005 10:37:34 +0000 (10:37 +0000)]
Allow building/installing of NLS catalogs while building of libraries

MFC after: 3 days

19 years agobzero() -> M_ZERO.
ru [Tue, 8 Feb 2005 10:31:55 +0000 (10:31 +0000)]
bzero() -> M_ZERO.

19 years agoTake care not to issue unaligned I/O requests while tasting a provider.
des [Tue, 8 Feb 2005 08:04:23 +0000 (08:04 +0000)]
Take care not to issue unaligned I/O requests while tasting a provider.

19 years agoUnroll the loop for calculating the 8.3 filename checksum. In testing
njl [Tue, 8 Feb 2005 07:51:14 +0000 (07:51 +0000)]
Unroll the loop for calculating the 8.3 filename checksum.  In testing
on my P3, microbenchmarks show the unrolled version is 78x faster.  In
actual use (recursive ls), this gives an average of 9% improvement in
system time and 2% improvement in wall time.

19 years agoUse ANSI function definitions, tweak a couple of prototypes to match (since
imp [Tue, 8 Feb 2005 06:12:44 +0000 (06:12 +0000)]
Use ANSI function definitions, tweak a couple of prototypes to match (since
K&R prototypes needed to mismatch in the way that they were mismatched),
rename ds_getmcaf to ed_ds_getmcaf.  Remove a few register keywords.