Commit Graph

52270 Commits

Author SHA1 Message Date
Poul-Henning Kamp
df32e67c73 Statize devfs_ops_f 2005-02-10 12:04:26 +00:00
Poul-Henning Kamp
c711aea6ca Make a bunch of malloc types static.
Found by:	src/tools/tools/kernxref
2005-02-10 12:02:37 +00:00
Poul-Henning Kamp
8d63297e2d Add __printflike() to vn_printf() 2005-02-10 08:55:40 +00:00
Poul-Henning Kamp
fe0198779c Don't pass NULL to vprint() 2005-02-10 08:55:08 +00:00
Warner Losh
f2566fc59b 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.
2005-02-10 06:09:03 +00:00
Warner Losh
1e379d3696 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.
2005-02-10 05:34:25 +00:00
Archie Cobbs
25b67768f0 Fix incorrect comment.
Submitted by:	James Bowman <jamesb@acelere.net>
2005-02-10 02:43:26 +00:00
Jeff Roberson
5c18d18b1d - Add more information to the getnewbuf() recycling KTR.
Sponsored by:	Isilon Systems, Inc.
2005-02-10 02:22:56 +00:00
Bernd Walter
d84def1440 Implement interrupt routing for DEC_KN20AA.
Tested by:	wilko
MFC after:	2 weeks
2005-02-10 00:35:31 +00:00
Jeff Roberson
a3caf16e99 - 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
2005-02-09 23:05:20 +00:00
John Baldwin
3b1569715e Fix pc98 compile: merge in changes to use the local APIC timer. Also, add
missing initialization of i8254_intsrc while I am here.
2005-02-09 22:48:22 +00:00
Poul-Henning Kamp
954ad216af Constify. 2005-02-09 20:56:32 +00:00
Warner Losh
969eaf2179 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.
2005-02-09 20:03:40 +00:00
Max Laier
68198dedf8 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
2005-02-09 19:29:13 +00:00
Wilko Bulte
1217303f75 add support for NetMos NM9805 1284 Printer port
Submitted by: Willy Offermans <W.K.Offermans@TUe.nl>

MFC after: 2 weeks
2005-02-09 18:38:28 +00:00
Warner Losh
13bf0bf2a8 Since we no longer use kvtop, we no longer need machine/md_var.h 2005-02-09 17:37:53 +00:00
Warner Losh
b3f44d7907 If either ed_probe_Novell or ed_attach returns an error, release the
resources too.
2005-02-09 17:35:13 +00:00
Scott Long
7e22e3674b Remove some unused variables. 2005-02-09 17:19:12 +00:00
Ruslan Ermilov
195cf61776 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
2005-02-09 15:14:44 +00:00
Poul-Henning Kamp
365b18aa89 style polishing. 2005-02-09 12:22:16 +00:00
Ruslan Ermilov
da42b93280 Use CFLAGS+=. 2005-02-09 11:50:43 +00:00
Scott Long
29c711f038 Remove the messy locking dance around xpt_done() 2005-02-09 11:50:16 +00:00
Scott Long
ef3cf714a4 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.
2005-02-09 11:44:15 +00:00
David E. O'Brien
36c64d7c3e Fix the standalone module build. 2005-02-09 08:35:24 +00:00
Pawel Jakub Dawidek
e35d3a7828 - 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.
2005-02-09 08:29:39 +00:00
David E. O'Brien
db0cd7e103 Emblish rev 1.180 to -fno-strict-alias w/-Os & -O3 also. 2005-02-09 07:34:22 +00:00
Warner Losh
887a166c34 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.
2005-02-09 06:16:27 +00:00
Warner Losh
940e7b9e51 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.
2005-02-09 06:03:36 +00:00
Warner Losh
8a3b3c6288 Remove reference to softc from probe entirely... 2005-02-09 05:55:54 +00:00
Marcel Moolenaar
3ec2e857c1 s/descr/oid_descr/ 2005-02-09 04:48:23 +00:00
Robert Watson
da2ecc1aa6 Add missed merge of ripcbinfo extern. Given how widely used
ripcbinfo is, we should probably add it to an include file.

Spotted by:	mux
2005-02-09 01:12:43 +00:00
Warner Losh
b7baa9d5a2 Minor style cleanup. Get rid of extra {}, extra blank lines and some
continued line indentation.  Should be no functional changes.
2005-02-09 00:50:59 +00:00
John-Mark Gurney
9c21341304 move pmap.h after vm.h include... some of the headers from pmap.h depend
upon vm.h
2005-02-09 00:10:17 +00:00
Warner Losh
374cde5568 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
2005-02-09 00:06:12 +00:00
Warner Losh
50f30261e7 No need to bzero softc. 2005-02-08 23:58:38 +00:00
Warner Losh
851a243f68 Convenience function to clear memory of the card, and then check to make
sure that it works by reading back as 0.
2005-02-08 23:57:43 +00:00
Jeff Roberson
68f2274d97 - 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.
2005-02-08 23:27:10 +00:00
Jeff Roberson
b56dc9a785 - Remove an invalid KASSERT added in recent background write reshuffling.
Sponsored by:	Isilon Systems, Inc.
2005-02-08 23:25:08 +00:00
Robert Watson
62a2c81733 Lock raw IP socket pcb list and PCBs when processing input via
icmp6_rip6_input().

Reviewed by:	gnn
MFC after:	1 week
2005-02-08 22:16:26 +00:00
Pawel Jakub Dawidek
647ceb6a94 - 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
2005-02-08 22:15:24 +00:00
Colin Percival
79653046d8 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
2005-02-08 21:31:11 +00:00
Poul-Henning Kamp
02f2c6a9d8 Split the vop_vector for ffs1 and ffs2, this is mostly for the different
EXTATTR support.
2005-02-08 21:03:52 +00:00
Poul-Henning Kamp
44787ceb0b Use ffs_truncate() directly instead of UFS_TRUNCATE() 2005-02-08 20:51:00 +00:00
Dag-Erling Smørgrav
d04928f224 Remove type 0x4 (FAT12 <32MB) to make room for type 0x7 (NTFS). 2005-02-08 20:43:04 +00:00
Poul-Henning Kamp
dd19a799b8 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.
2005-02-08 20:29:10 +00:00
John Baldwin
e8ce55117b 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.
2005-02-08 20:25:07 +00:00
Poul-Henning Kamp
88e5b12a20 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.
2005-02-08 18:09:11 +00:00
Nate Lawson
7990a18c7b Maxunit is inclusive so fix off-by-one in previous commit. 2005-02-08 18:03:17 +00:00
Nate Lawson
5b68bf38ab Update device_find_child(9) to return the first matching child if unit
is set to -1.

Reviewed by:	dfr, imp
2005-02-08 18:00:29 +00:00
Robert Watson
78e21ab011 Simplify the "and if we're in the debugger, don't use locks" logic,
correcting some misthinking.

Discussed with (really this time):	bde
2005-02-08 17:56:04 +00:00
Poul-Henning Kamp
efd6d9808c 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.
2005-02-08 17:40:01 +00:00
Bill Paul
b545a3b822 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.
2005-02-08 17:23:25 +00:00
Robert Watson
45faa442c3 Don't use VOP_LEASE() with operations on extended attribute backing
files.

Pointed out by:	phk
2005-02-08 17:05:38 +00:00
Poul-Henning Kamp
40854ff546 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.
2005-02-08 16:25:50 +00:00
Poul-Henning Kamp
d6f622cc2f 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.
2005-02-08 15:54:30 +00:00
Poul-Henning Kamp
32a870da8a Use VOP_STRATEGY_APV() instead of direct dereference, this is more
correct.
2005-02-08 15:40:11 +00:00
Poul-Henning Kamp
119798b384 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().
2005-02-08 12:54:32 +00:00
Dag-Erling Smørgrav
04550802d8 merge from geom_vol_ffs.c rev 1.14 (avoid unaligned I/O requests) 2005-02-08 12:34:11 +00:00
Ruslan Ermilov
a921fb33b6 bzero() -> M_ZERO. 2005-02-08 10:31:55 +00:00
Dag-Erling Smørgrav
363de7f683 Take care not to issue unaligned I/O requests while tasting a provider. 2005-02-08 08:04:23 +00:00
Nate Lawson
2a05fbb949 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.
2005-02-08 07:51:14 +00:00
Warner Losh
ad6da8a0fc 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.
2005-02-08 06:12:44 +00:00
Warner Losh
c1ed2c9eb2 use fixed types for the calls to ed_pio_readmem, ed_pio_writemem.
Make the special hp versions match the general ones.  Also use fixed
types in the WD80x3_generic probe, and change callers' arrays to
match.  Fix a couple of minor style issues by using newstyle function
definitions in a couple places.
2005-02-08 05:59:43 +00:00
Warner Losh
9d512034e3 Make it possible to unload ed. Move the ed_pccard_detach routine to
if_ed and rename it to ed_detach().  Tell other busses to use this
routine for detach.

Since I don't actually have any non-pccard ed hardware I can test
with, I've only tested with my pccards.

More improvements in this area likely are possible.

Prodded by: rwatson
2005-02-08 05:45:35 +00:00
Warner Losh
442b6e9e8c Fix style bugs introduced in the de__Pification of this code.
Style bug generically noted by: bde
2005-02-08 05:41:54 +00:00
Scott Long
8a87dc6fd9 Fix crashdumps on twe. The twe_immediate_request() path was not only
copying data to a temporary buffer before the I/O, but also copying that
temporary buffer back to the original data location after the I/O.  When
you're dumping kernel heap and stack and protected pages, this is very
very bad.

A belated thanks to Robert Watson for donating hardware for this (and future)
work.

MFC after: 3 days
2005-02-08 03:43:02 +00:00
Peter Wemm
699a8a09d6 MFi386: read from RTC_INTR after writing to RTC_STATUSB 2005-02-08 01:21:24 +00:00
Max Laier
c721916790 Fix sloppy use of "manpage", bump .Dd where applicable and rename RED to
Random Early Detection (not ... Drop) in order to be consistent with other
documentation on ALTQ

Pointed out by:	simon, ru, Brad Davis
2005-02-07 23:20:12 +00:00
John Baldwin
0ba59a6f70 - Implement ibcs2_emul_find() using kern_alternate_path(). This changes
the semantics in that the returned filename to use is now a kernel
  pointer rather than a user space pointer.  This required changing the
  arguments to the CHECKALT*() macros some and changing the various system
  calls that used pathnames to use the kern_foo() functions that can accept
  kernel space filename pointers instead of calling the system call
  directly.
- Use kern_open(), kern_access(), kern_execve(), kern_mkfifo(), kern_mknod(),
  kern_setitimer(), kern_getrusage(), kern_utimes(), kern_unlink(),
  kern_chdir(), kern_chmod(), kern_chown(), kern_symlink(), kern_readlink(),
  kern_select(), kern_statfs(), kern_fstatfs(), kern_stat(), kern_lstat(),
  kern_fstat().
- Drop the unused 'uap' argument from spx_open().
- Replace a stale duplication of vn_access() in xenix_access() lacking
  recent additions such as MAC checks, etc. with a call to kern_access().
2005-02-07 22:02:18 +00:00
John Baldwin
c87b5f76aa - Implement svr4_emul_find() using kern_alternate_path(). This changes
the semantics in that the returned filename to use is now a kernel
  pointer rather than a user space pointer.  This required changing the
  arguments to the CHECKALT*() macros some and changing the various system
  calls that used pathnames to use the kern_foo() functions that can accept
  kernel space filename pointers instead of calling the system call
  directly.
- Use kern_open(), kern_access(), kern_msgctl(), kern_execve(),
  kern_mkfifo(), kern_mknod(), kern_statfs(), kern_fstatfs(),
  kern_setitimer(), kern_stat(), kern_lstat(), kern_fstat(), kern_utimes(),
  kern_pathconf(), and kern_unlink().
2005-02-07 21:53:42 +00:00
John Baldwin
fee4a6af3a Implement a kern_pathconf() wrapper for pathconf() which can take the
filename from either a user space or a kernel space pointer.
2005-02-07 21:46:43 +00:00
John Baldwin
5e85ac176f If the pointer to the new itimerval is NULL in kern_setitimer(), just
read the old value via kern_getitimer().
2005-02-07 21:45:48 +00:00
Gleb Smirnoff
832f26462b Use if_link_state_change() instead of rt_ifmsg(). Remove include net/route.h.
Reviewed by:	wpaul, sam
2005-02-07 19:39:29 +00:00
John Baldwin
f7a2587298 - Use kern_{l,f,}stat() and kern_{f,}statfs() functions rather than
duplicating the contents of the same functions inline.
- Consolidate common code to convert a BSD statfs struct to a Linux struct
  into a static worker function.
2005-02-07 18:47:28 +00:00
John Baldwin
25771ec2a4 Make linux_emul_convpath() a simple wrapper for kern_alternate_path(). 2005-02-07 18:46:05 +00:00
John Baldwin
76951d21d1 - Tweak kern_msgctl() to return a copy of the requested message queue id
structure in the struct pointed to by the 3rd argument for IPC_STAT and
  get rid of the 4th argument.  The old way returned a pointer into the
  kernel array that the calling function would then access afterwards
  without holding the appropriate locks and doing non-lock-safe things like
  copyout() with the data anyways.  This change removes that unsafeness and
  resulting race conditions as well as simplifying the interface.
- Implement kern_foo wrappers for stat(), lstat(), fstat(), statfs(),
  fstatfs(), and fhstatfs().  Use these wrappers to cut out a lot of
  code duplication for freebsd4 and netbsd compatability system calls.
- Add a new lookup function kern_alternate_path() that looks up a filename
  under an alternate prefix and determines which filename should be used.
  This is basically a more general version of linux_emul_convpath() that
  can be shared by all the ABIs thus allowing for further reduction of
  code duplication.
2005-02-07 18:44:55 +00:00
John Baldwin
c90110d639 Various and sundry style fixes. 2005-02-07 18:38:29 +00:00
John Baldwin
0311233ecc Use linux_emul_convpath() rather than linux_emul_find() as
linux_emul_find() is going away.
2005-02-07 18:37:51 +00:00
John Baldwin
d9e9747163 Use the LCONVPATHEXIST() macro rather than it's exact expansion to be
consistent.
2005-02-07 18:37:13 +00:00
John Baldwin
12dd959a7d Use kern_setitimer() to implement linux_alarm() instead of fondling the
real interval timer directly.
2005-02-07 18:36:21 +00:00
John Baldwin
777a3021d3 Use kern_open() directly rather than a stackgap detour via open(). 2005-02-07 18:22:20 +00:00
John Baldwin
01660e7bc2 Drop Giant before calling kthread_exit(). 2005-02-07 18:21:50 +00:00
Matthew N. Dodd
5b525a3230 Avoid using tsleep() in the resume path as it may result in the
system hanging if timer interrupts aren't running yet.

This allows my Thinkpad to resume successfully with APM.

Approved by:	 sos
MFC after:	 2 weeks
2005-02-07 17:14:42 +00:00
Poul-Henning Kamp
9ca72ab21e Add VNASSERT() which is just like KASSERT() but takes a vnode argument
which it will vn_printf() if it triggers.
2005-02-07 12:56:19 +00:00
Yoshihiro Takahashi
88d91a5ad0 Remove unused defines. 2005-02-07 12:23:07 +00:00
Maxim Sobolev
aab8b1b55f Fix the problem with incorrect throttling level reported immediately after
reboot. Safter the reboot the TCC is usually in the Automatic mode, in which
reading current performance level is likely to produce bogus results make sure
to switch it to the On-Demand mode and set to some known performance level.
Unfortunately there is no reliable way to check that TCC is in the Automatic
mode. Reading bit 4 of ACPI Thermal Monitor Control Register produces 0
regardless of the current mode.

MFC after:	1 week
2005-02-07 11:35:24 +00:00
Gleb Smirnoff
ad1376cc73 Improve parsing of hook name.
Submitted by:	ru
2005-02-07 11:16:07 +00:00
Poul-Henning Kamp
b9489a449c Access vmobject via the bufobj instead of the vnode 2005-02-07 10:04:06 +00:00
Poul-Henning Kamp
7ee4eb6192 VOP_DESTROYVOBJECT() is no more. 2005-02-07 09:26:58 +00:00
Poul-Henning Kamp
7c5d36fb80 Remove vop_stddestroyvobject() 2005-02-07 09:26:39 +00:00
Poul-Henning Kamp
61f9cf813f Remove vop_destroyvobject() 2005-02-07 09:23:34 +00:00
Poul-Henning Kamp
7bf4b73d6c Deimplement vop_destroyvobject() 2005-02-07 08:23:36 +00:00
Poul-Henning Kamp
c81b5b21d3 Add missing isa_dmatc() function.
This may or may not be correct,  Only the pcii driver would notice and
it doesn't support PC98 yet.
2005-02-07 08:19:53 +00:00
Poul-Henning Kamp
49829f2ec5 Remove vop_destroyvobject() initialization. 2005-02-07 08:04:24 +00:00
Poul-Henning Kamp
b348abd6cd Don't call VOP_DESTROYVOBJECT(), trust that VOP_RECLAIM() did what
was necessary.
2005-02-07 07:48:03 +00:00
Poul-Henning Kamp
5937226d51 Add a missing prefix to a struct field for consistency. 2005-02-07 07:40:39 +00:00
Nate Lawson
8b888c66d7 Remove handling _PSS notifies from acpi_cpu and let acpi_perf handle them. 2005-02-07 04:03:06 +00:00
Ian Dowse
98c926b20f Add a mechanism for associating a mutex with a callout when the
callout is first initialised, using a new function callout_init_mtx().
The callout system will acquire this mutex before calling the callout
function and release it on return.

In addition, the callout system uses the mutex to avoid most of the
complications and race conditions inherent in asynchronous timer
facilities, so mutex-protected callouts have much simpler semantics.
As long as the mutex is held when invoking callout_stop() or
callout_reset(), then these functions will guarantee that the callout
will be stopped, even if softclock() had already begun to process
the callout.

Existing Giant-locked callouts will automatically pick up the new
race-free semantics. This should close a number of race conditions
in the USB code and probably other areas of the kernel too.

There should be no change in behaviour for "MP-safe" callouts; these
still need to use the techniques mentioned in timeout(9) to avoid
race conditions.
2005-02-07 02:47:33 +00:00
Bernd Walter
b542a023e5 Enable interrupt routing as first choice on alpha.
The alpha default handler knows how to trigger a fallback.
2005-02-07 00:43:14 +00:00
Poul-Henning Kamp
a15fbb42c3 Allocate more space for softc. Amazing my machine survived this. 2005-02-06 22:45:12 +00:00
Robert Watson
8760934124 Remove a comment from the raw IPv6 output function regarding
M_TRYWAIT allocations: M_PREPEND() now uses M_DONTWAIT.

MFC after:	3 days
2005-02-06 21:43:55 +00:00
Warner Losh
cbf6a317a5 Move the $NetBSD$ tag to the top of the file, per standard NetBSD
practice (which we seem to mostly follow in the tree).  Move the
$FreeBSD$ tag to its more proper place after all copyright and license
notices.  Add '-' to the copyright notice for Christian E. Hopps so my
copyright script picks it up.
2005-02-06 21:15:19 +00:00
Nate Lawson
aca8665972 Hook acpi_throttle(4) up to the build. It's currently part of acpi_perf.ko
although this may change.
2005-02-06 21:13:41 +00:00
Warner Losh
108663cc87 ccs is a size_t. RAY_CCS_INDEX takes ccs and does math on it,
resulting in a size_t due to C's rules of arithmetic.  Rather than
bogusly cast the result to a uint8_t, fix the printf format specifier
to have a 'z' modifier which tells the compiler that the sizes really
do match.

It turns out that change 1.75 was incorrect to assume that this
'really' was a 8bit quantity.  It isn't.  Although the hardware
appears to limit things to < 256, it would be a bug that should be
caught by debug printf it it were.  Casting it to uint8_t would have
lost this useful information.

Aslo add 'z' to a nearby debug statement that's never compiled in.
2005-02-06 21:12:22 +00:00
Nate Lawson
8c5468e3f5 Remove acpi throttling support from the acpi_cpu(4) driver now that this
is supported by acpi_throttle(4).
2005-02-06 21:10:19 +00:00
Nate Lawson
7150dfc7e5 Break out acpi throttling support into a new relative cpufreq driver,
acpi_throttle(4).
2005-02-06 21:09:51 +00:00
Nate Lawson
88c9b54c47 Add support for relative cpufreq drivers. Such drivers modulate clock
frequency as a percentage of the base rate and do not change the base
rate directly.  The cpufreq framework combines these with absolute drivers
to produce synthesized levels made of one or more settings.
2005-02-06 21:08:35 +00:00
Warner Losh
440b5ade31 Move resource allocation routines from cardbus_cis.c to cardbus.c.
They have nothing at all to do with CIS parsing.

Remove some unused funce parsing: nothing used the results.

Use more of pccard_cis.h's deifnitions for the cardbus specific cis
parsing we do.  More work is needed in this area.

This reduces the size of the cardbus module by 380 bytes or so...
2005-02-06 21:03:13 +00:00
Nate Lawson
3cc2f17689 Notify the OS that we're taking over Px states in acpi_perf(4) instead of
doing it in the cpu driver.  The previous code was incorrect anyway since
this value controls Px states, not throttling as the comment said.  Since
we didn't support Px states before, there was no impact.  Also, note that
we delay the write to SMI_CMD until after booting is complete since it
sometimes triggers a change in the frequency and we want to have all
drivers ready to detect/handle this.
2005-02-06 20:12:28 +00:00
Gleb Smirnoff
2c42caf7f0 Whitespace. 2005-02-06 19:24:59 +00:00
Gleb Smirnoff
50633c3a9f Remove comment which left after removal of ng_rcvdataq_t.
MFC after:	1 week
2005-02-06 19:20:16 +00:00
David Schultz
2a51b9b0aa When running Linux binaries, set up the initial FPU state as Linux
would.

PR:	28966
2005-02-06 17:29:20 +00:00
Ian Dowse
1c7178ce25 Check that we have at least a 586-class CPU before calling do_cpuid().
This fixes booting on a number of 486 processors.

PR:		i386/75686
Reviewed by:	markm
MFC after:	1 week
2005-02-06 16:55:52 +00:00
Poul-Henning Kamp
df05d0fb93 Further elaborate the GPIB driver. We now support a minimal subset of
the ibfoo() API.
2005-02-06 15:22:23 +00:00
Xin LI
04def62430 Finish the import of nc(1) from OpenBSD. This includes:
- Bring IPsec support from the ports collection [1].
	- Bring -o ("once only") option from the ports
	  collection [2].
	- Adopt the Makefile framework into
	  usr.bin/nc/Makefile.
	- Add a knob to control whether to build nc(1),
	  NO_NETCAT.
	- Bump __FreeBSD_version so ports collection can
	  detect this change.

Original patchset are contributed to the ports collection by:
[1] nectar, [2] joerg.

Note: WARNS?=6 patchset spined off in this commit, in order not
to take too many files off the vendor branch.
2005-02-06 14:44:27 +00:00
Poul-Henning Kamp
0c3c54da63 Since we are quite unlikely to ever face another platform which
uses the i8237 without trying to emulate the PC architecture move
the register definitions for the i8237 chip into the central include
file for the chip, except for the PC98 case which is magic.

Add new isa_dmatc() function which tells us as cheaply as possible
if the terminal count has been reached for a given channel.
2005-02-06 13:46:39 +00:00
Yoshihiro Takahashi
32b8035467 Sort includes and remove duplicate include. 2005-02-06 13:31:22 +00:00
Yoshihiro Takahashi
42d2323edd MFi386: revision 1.606. 2005-02-06 13:23:20 +00:00
David E. O'Brien
61d087cf53 Fix problem with some logitec usb wireless mice.
Submitted by:	Markus <mw@kpnqwest.ch>
Tested by:	Randy Bush <randy@psg.com>
2005-02-06 12:41:00 +00:00
Gleb Smirnoff
1af305441d Jump to common action checks after doing specific once. This fixes adding
of divert rules, which I break in previous commit.

Pointy hat to:	glebius
2005-02-06 11:13:59 +00:00
Maxim Konovalov
212a79b010 o Implement net.inet.tcp.drop sysctl and userland part, tcpdrop(8)
utility:

    The tcpdrop command drops the TCP connection specified by the
    local address laddr, port lport and the foreign address faddr,
    port fport.

Obtained from:	OpenBSD
Reviewed by:	rwatson (locking), ru (man page), -current
MFC after:	1 month
2005-02-06 10:47:12 +00:00
Nate Lawson
3045c8af3f Staticize the legacy cpu devclasses and revert the name for the acpi_cpu
devclass.  As pointed out by dfr@, devclasses don't have to share the same
linkage if multiple drivers have the same name.  Newbus should match the
devclasses based on name and allocate non-conflicting unit numbers.
2005-02-06 07:36:08 +00:00
Nate Lawson
3888a87205 Finish the job of sorting all includes and fix the build by including
malloc.h before proc.h on sparc64.  Noticed by das@

Compiled on:	alpha, amd64, i386, pc98, sparc64
2005-02-06 01:55:08 +00:00
Gleb Smirnoff
4feaf224b8 Increase size of arglen to uint32_t, since uint16_t proved to be
not enough (e.g. listing 911 nodes). Bump NG_VERSION.

Reviewed by:	julian, archie, ru
2005-02-05 23:23:14 +00:00
Nate Lawson
959c26396c Make cpu_est_clockrate() more accurate by disabling interrupts for the
millisecond it is calibrating.  Suggested by jhb@ and bde@.  Don't clobber
the tsc_freq with the new value since it isn't accurate enough for
timecounters and the timecounter system as a whole needs support for
changing rates before we do this.  Subtract 0.5% from our measurement
to account for overhead in DELAY.  Note that this interface is for
estimating the clockrate and needs to work well at runtime so doing a full
calibration including disabling interrupts for a second is not feasible.
2005-02-05 23:16:27 +00:00
Nate Lawson
76ce4cc456 Convert to the new GAS APIs to allow for detach in the future. Also, check
the PERF_CTRL register in our probe method so that we can tell earlier
that another driver should handle this device due to FFixedHW.  This avoids
scaring users when attach failed when we really wanted probe to fail.
2005-02-05 22:30:57 +00:00
Nate Lawson
f4eb041868 Convert to the new GAS API so that we can free registers in the future. 2005-02-05 22:29:03 +00:00
Nate Lawson
e1c4bf3f42 Convert the acpi_bus_alloc_gas() and acpi_PkgGas() APIs to output the memory
type.  This is needed if the resource is to be released later.  The RID is
still also present, though less necessary since rman_get_rid() can be used
to obtain it from the resource.
2005-02-05 22:28:36 +00:00
Alan Cox
ab42aa145d Acquire the source pmap's lock in pmap_copy(). 2005-02-05 22:06:47 +00:00
Nate Lawson
69bc96f231 Build cpufreq and acpi_perf on platforms that are likely to be able to
use them.
2005-02-05 21:01:09 +00:00
Alan Cox
fb1b26da19 Implement proper handling of PG_G mappings in pmap_protect(). (I don't
believe that this omission mattered before the introduction of MemGuard.)

Reviewed by: tegge@
MFC after: 1 week
2005-02-05 19:21:54 +00:00
Nate Lawson
0a9145a2f2 Use intr_disable/restore() instead of disable_intr() since the latter is
not MI.  This should fix build on non i386 platforms.
2005-02-05 16:31:58 +00:00
Gleb Smirnoff
f2a7ef4e00 Hook up ng_ipfw to kernel build. 2005-02-05 12:15:56 +00:00
Gleb Smirnoff
aa70aaecdb Add ng_ipfw to kernel module build. 2005-02-05 12:09:38 +00:00
Gleb Smirnoff
670742a102 Add a ng_ipfw node, implementing a quick and simple interface between
ipfw(4) and netgraph(4) facilities.

Reviewed by:	andre, brooks, julian
2005-02-05 12:06:33 +00:00
Gleb Smirnoff
d1240630b3 Expire aged flows in normal expiry thread. This fixes the problem, when
a node disconnected from all sources of traffic never purges its cache.
2005-02-05 10:00:04 +00:00
Gleb Smirnoff
020d3f61d8 Break long lines in code and comments. 2005-02-05 09:08:33 +00:00
Ruslan Ermilov
30aabc9afd Create a per-module mutex on MOD_LOAD, and destroy it on MOD_UNLOAD.
(This fixes witness_destroy() panic after module unload.)

OK'ed by:	rwatson, julian
2005-02-05 08:28:36 +00:00
Scott Long
6ab93aca6d Only compile the cpufreq driver on i386 and amd64. 2005-02-05 08:01:10 +00:00
Jeff Roberson
8364446643 - Don't release BKGRDINPROG until after we've bufdone'd the copy.
Sponsored by:	Isilon Systems, Inc.
2005-02-05 01:26:14 +00:00
Pawel Jakub Dawidek
662a4e5878 - Use bioq_insert_tail()/bioq_insert_head() instead of bioq_disksort().
- Improve mediasize checking.

MFC after:	1 week
2005-02-05 00:30:08 +00:00
Gleb Smirnoff
a436589ae2 Do check that version of a message from userland matches ours.
MFC after:	3 days
2005-02-04 21:38:42 +00:00
Gleb Smirnoff
e5d73ca252 Call if_link_state_change() when link status changes.
PR:		kern/76890
Reviewed by:	rwatson, sam
2005-02-04 18:36:04 +00:00
Nate Lawson
26d5f7dfa7 Don't print out a failure message when an attach for FFixedHW fails.
Instead, just fail to attach so another hardware-specific driver can
claim the device.  Also, clean up some small memory leaks in the failure
case.
2005-02-04 18:09:01 +00:00
Nate Lawson
b68b14adaf Return a special status of "not supported" for functional fixed hardware
since this type of register should be handled by another driver.
2005-02-04 18:07:03 +00:00
Warner Losh
c4241acbb3 Don't rely on indirect inclusion of machine/bus.h to use
bus_space_{read,write}_* routines.  This doesn't matter in the current
tree, but will matter soon (the rest of the tree appears to already be
clean).
2005-02-04 17:33:31 +00:00
Jeff Roberson
42a29039de - Add ke_runq == NULL to the conditions which will cause us to abort
adjusting timeshare loads in sched_class().  This is only important if
   the thread has never run, otherwise the state checks should work as
   expected.
2005-02-04 17:22:46 +00:00
Gleb Smirnoff
7a1725fc46 - Fix build with TRACE_MESSAGES defined
- Remove extra parenthesis
2005-02-04 16:08:20 +00:00
Yoshihiro Takahashi
c94fa11fc4 cosmetic changes. 2005-02-04 15:34:52 +00:00
Yoshihiro Takahashi
328a9c4f3d The bs and wdc drivers are gone. 2005-02-04 15:29:54 +00:00
Hajimu UMEMOTO
6d0a982bdf teach scope of IPv6 address to net.inet6.tcp6.getcred.
MFC after:	1 week
2005-02-04 14:43:05 +00:00
Yoshihiro Takahashi
f787023e5a Fix pc98 support (broken by previous change). 2005-02-04 13:37:21 +00:00
Yoshihiro Takahashi
9f83151765 Merged from sys/dev/sio/sio.c revision 1.457. 2005-02-04 13:35:21 +00:00
Yoshihiro Takahashi
0faf078231 MFi386: revision 1.605. 2005-02-04 13:34:24 +00:00
Yoshihiro Takahashi
2e047e2eb8 MFi386: revision 1.514. 2005-02-04 13:33:46 +00:00
Nate Lawson
7d3a06201d Make the devclass static for now until deciding whether to share them. 2005-02-04 07:25:44 +00:00
Nate Lawson
d639e9636d Bump __FreeBSD_version for cpufreq addition. Requested by marcus@ 2005-02-04 06:59:58 +00:00
Nate Lawson
a287c0ffaf Sort includes a little so that bus.h comes before cpu.h (for device_t). 2005-02-04 06:58:09 +00:00
Marcel Moolenaar
6fb59928a6 Include sys/bus.h before sys/cpu.h. The latter needs device_t. 2005-02-04 06:38:58 +00:00
Suleiman Souhlal
81ae703462 Set the scheduling class of the zeroidle thread to PRI_IDLE.
Reviewed by:	jhb
Approved by:	grehan (mentor)
MFC after:	1 week
2005-02-04 06:18:31 +00:00
Suleiman Souhlal
339a7e7fbb Set the scheduling class of the idle threads to PRI_IDLE.
While there, set their priority with sched_prio() instead of changing it
'by hand'.

Reviewed by:	jhb
Approved by:	grehan (mentor)
2005-02-04 06:16:05 +00:00
Nate Lawson
dbfdf1736b MFi386: Merge updates to the cpu pseudo-driver. Compile, not runtime
tested.
2005-02-04 06:02:37 +00:00
Nate Lawson
335e4ff3cd Hook up the cpufreq framework, acpi_perf(4), and cpufreq(4) drivers. 2005-02-04 05:49:36 +00:00
Nate Lawson
6cb2040baf Add the ACPI Performance states driver. This driver offers two or more
settings as exported via the ACPI _PSS method.  OEMs use this interface
to encapsulate chipset or processor-specific methods (e.g., SpeedStep or
Powernow) and export their settings in a standard way.  On systems that
have valid ACPI Performance states and a hardware-specific driver (e.g.,
ichss), acpi_perf(4) is preferred.
2005-02-04 05:45:07 +00:00
Nate Lawson
6c7b11ccfa Add a cpufreq driver for the SpeedStep capability in the ICH chipset. This
driver offers two settings.  Information for this driver was obtained from
the Intel datasheets and by reviewing the Linux driver.
2005-02-04 05:42:29 +00:00
Nate Lawson
73347b071d Add the cpufreq framework. This code manages multiple drivers and presents
a unified kernel and user interface for controlling cpu frequencies.
2005-02-04 05:39:19 +00:00
Nate Lawson
bfdbeca163 Add an interface for cpufreq. The kernel interface lets other drivers
select the CPU frequency level (say for cooling).  The driver interface
allows hardware drivers to announce themselves as capable of adjusting
an individual frequency setting.
2005-02-04 05:38:30 +00:00
Nate Lawson
98aa9cd052 Update the CPU attachments to return CPU_IVAR_PCPU as well as pass on
appropriate requests to any children.
2005-02-04 05:36:40 +00:00
Nate Lawson
4c4381e288 Add an implementation of cpu_est_clockrate(9). This function estimates the
current clock frequency for the given CPU id in units of Hz.
2005-02-04 05:32:56 +00:00
Nate Lawson
a07c38209c Add a new include to handle generic CPU interfaces. 2005-02-04 05:31:10 +00:00
Warner Losh
0ccd166961 Minor style nits
o remove unneeded {}
o no need to bzero sc
2005-02-04 02:32:43 +00:00
Peter Grehan
79393893e8 - recognize 7447A/7448 CPUs (used in miniMacs)
- enable 745x branch caches. Already enabled by OpenFirmware
on Macs, but reduces NetBSD diffs and usable by embedded folk.

Obtained from:	NetBSD
2005-02-04 01:59:48 +00:00
Peter Grehan
6d2d8acaf4 - add wall_cmos_clock and adjkerntz variables, required by msdosfs
- support adjkerntz sysctl to silence NTP, though it's a null
  implementation at the moment.
2005-02-04 01:41:38 +00:00
Peter Grehan
911e488a03 Convert bus_space_barrier() into a null inline function rather than an
empty macro to avoid many compile warnings in the USB code.
2005-02-04 01:27:21 +00:00
Peter Grehan
4e895c543a - add definitions for MPC7447A/7448 (i.e. miniMac)
- expand MPC745X_P macro to include these

Obtained from:	NetBSD
2005-02-04 01:17:04 +00:00
Peter Grehan
9e8e140099 HID0 updates:
- updated relevant models for High BAT enable bit
 - fixed bug in BHTCLR/XAEN constants
 - added LRSTK and FOLD bits
2005-02-04 01:14:38 +00:00
Warner Losh
e1500f0d18 Sort PANASONIC products numerically 2005-02-03 23:45:20 +00:00
Warner Losh
b73f46cfbb takawata tells me that KXLC0003 also works with this driver, so add it
to the list.  Note it is untested.

Also kill some whitespace at the end of the line...
2005-02-03 23:39:29 +00:00
Scott Long
176a8c17c6 Remove the entries for isp and ispfw instead of leaving them in an inconsistent
state.
2005-02-03 23:10:17 +00:00
Matthew N. Dodd
1f005b6723 - Split out PCI support.
- Add previously removed ISA support.

Submitted by:	David S. Madole <david AT madole.net>
2005-02-03 23:01:01 +00:00
Ruslan Ermilov
2154e70d14 Connect ng_device(4) to the build. 2005-02-03 19:54:58 +00:00
John Baldwin
aa96fcdb61 Anytime we write to the RTC's status B register to possibly enable
interrupts, read from the interrupt status register to clear any pending
interrupts.  Otherwise in some rare cases the RTC would never fire any
interrupts as it constantly thinks it has an interrupt pending.

PR:		i386/17800
PR:		kern/76776
Submitted by:	Jose M. Alcaide jose at we dot lc dot ehu dot es
MFC after:	2 weeks
2005-02-03 19:06:03 +00:00
Sam Leffler
cb212bbc75 correct check for unicast key being setup; wpa_supplicant in particular
uses only the global key state so looking in the per-node key slot is wrong

Submitted by:	Tai-hwa Liang
2005-02-03 16:21:07 +00:00
Ruslan Ermilov
27667f5821 MFlibc: Remove extra closing parenthesis. 2005-02-03 15:51:39 +00:00
Pawel Jakub Dawidek
f3830f0482 We do want to print '\n'/'\r'.
Pointed out by:	stefanf
2005-02-03 15:47:30 +00:00
Pawel Jakub Dawidek
6513f57682 'c' cannot be -1.
Submitted by:	stefanf
2005-02-03 15:23:27 +00:00
Pawel Jakub Dawidek
f627315f1e - Move gets() function to libkern (I want to use it outside vfs_mount.c).
- Add buffer size limitations (overflow will not be possible anymore).
- Add 'visible' option, which will allow for passphrase reading in the
  future.
- Remove special treatment of '@' and '#', those two are only confusing.

Discussed with:	rwatson
MFC after:	2 weeks
2005-02-03 15:10:58 +00:00
Ruslan Ermilov
72369c34ac Parse "getifname" using the standard parse string type.
Fixed an off-by-one error when dealing with interface name
(if_xname is NUL-terminated).

Don't waste time making a copy of if_xname in constructor.
2005-02-03 13:03:31 +00:00
Ruslan Ermilov
96f82336ba Fixed an off-by-one error when dealing with interface name
(if_xname is NUL-terminated).

Don't waste time making a copy of if_xname in attach().
2005-02-03 12:54:18 +00:00
Ruslan Ermilov
bbb75d7844 Fixed an off-by-one error when dealing with interface name
(if_xname is IFNAMSIZ-sized and NUL-terminated).
2005-02-03 12:50:10 +00:00
Ruslan Ermilov
c60878f0d2 Added ASCII version of the NGM_EIFACE_GET_IFNAME message, "getifname". 2005-02-03 11:52:42 +00:00
Ruslan Ermilov
c266fbc2aa Removed unused includes. 2005-02-03 11:28:53 +00:00
Robert Watson
faabfac9ff When entering siocnputc() with (kdb_active), don't acquire (or
release) the sio spin mutex, as use of synchronization primitives in
the debugger can result in substantial problems.  With this patch in
place entering the debugger via a serial console is made
substantially more reliable.

MFC after:	1 week
Tested by:	kris
Discussed with:	bde
2005-02-03 10:35:05 +00:00
Ruslan Ermilov
2f533ec052 Fix alignment in the last commit. 2005-02-03 08:07:22 +00:00
Peter Grehan
bd985cab34 - remove NO_MODULES since they've been working for some time
- add -fno-omit-framepointer to CFLAGS if DDB is enabled so
  backtraces will still work when optimization is enabled.
  Stolen from Makefile.amd64.
2005-02-03 06:28:17 +00:00
Peter Grehan
042bbe552f Don't build syscons, uart or vpo on PPC. 2005-02-03 06:12:43 +00:00
Peter Grehan
6109ca7e1a Fix up assignment of negative number to char. Char's are unsigned by
default on PowerPC.

Approved by:	mdodd
2005-02-03 02:35:28 +00:00
Warner Losh
ddf71f18a9 MF dev/wi: merge the pccard lists.
# this hasn't compiled for two weeks and no one noticed!

MFC After: 7 days or so
2005-02-03 00:40:35 +00:00
Peter Grehan
55a5dcc8fe Don't lose the frame pointer for PPC modules: backtrace doesn't work. 2005-02-02 23:44:24 +00:00
Jeff Roberson
9087d86e66 - Use a seperate malloc tag for saved inode contents to help in debugging
memory modified after free errors.

Sponsored by:	Isilon Systems, Inc.
2005-02-02 20:30:47 +00:00