Peter Grehan [Tue, 13 Jan 2004 11:24:36 +0000 (11:24 +0000)]
Make the OpenPic driver bus-independent, with attachments for
the MacIO chip and PSIM's IOBus. Bus-specific drivers should
use the identify method to attach themselves to nexus so
interrupt can be allocated before the h/w is probed. The
'early attach' routine in openpic is used for this stage
of boot. When h/w is probed, the openpic can be attached
properly. It will enable interrupts allocated prior to
this.
Peter Grehan [Tue, 13 Jan 2004 11:20:52 +0000 (11:20 +0000)]
Remove hard-coded knowledge of specific OFW devices. Use bus_generic_probe
and add_child entry point to allow devices to use the identify
method to add themselves if need be (e.g. openpic, syscons).
Export interrupt-controller-add routine for extern int cntlr drivers.
Eliminate recursive OFW device-tree walk and only iterate the
top-level ala sparc64. Allow child devices to set the device
type with write_ivars.
Step 1 of many in removing the hard-dependency on OpenFirmware.
Alan Cox [Tue, 13 Jan 2004 07:45:10 +0000 (07:45 +0000)]
Replace calls to vm_page_alloc_contig() by calls to contigmalloc().
vm_page_alloc_contig() will be removed after the three remaining drivers
that use it are also converted to contigmalloc().
Bill Paul [Tue, 13 Jan 2004 01:12:28 +0000 (01:12 +0000)]
Loosen up the range test in ndis_register_ioport(). Allow drivers to
map ranges that are smaller than what our resource manager code knows
is available, rather than requiring that they match exactly. This
fixes a problem with the Intel PRO/1000 gigE driver: it wants to map
a range of 32 I/O ports, even though some chips appear set up to
decode a range of 64. With this fix, it loads and runs correctly.
Bill Paul [Tue, 13 Jan 2004 00:29:17 +0000 (00:29 +0000)]
Yet another inf file handling tweak: when checking for Ndi\Params\foo
keys, don't just do a substring match on "Ndi\Params". Instead, check
explicitly for strings that begin with "Ndi\Params". Why? Because it's
possible to create your own keys with different paths, like
"PROSetNdi\NdiExt\Params" which is what Intel does in their PRO/1000
driver's .INF file.
Bill Paul [Mon, 12 Jan 2004 21:00:48 +0000 (21:00 +0000)]
In if_ndis.c:ndis_intr(), be a bit more intelligent about squelching
unexpected interrupts. If an interrupt is triggered and we're not
finished initializing yet, bail. If we have finished initializing,
but IFF_UP isn't set yet, drain the interrupt with ndis_intr() or
ndis_disable_intr() as appropriate, then return _without_ scheduling
ndis_intrtask().
In kern_ndis.c:ndis_load_driver() only relocate/dynalink a given driver
image once. Trying to relocate an image that's already been relocated
will trash the image. We poison a part of the image header that we
don't otherwise need with a magic value to indicate it's already been
fixed up. This fixes the case where there are multiple units of the
same kind of device.
John Baldwin [Mon, 12 Jan 2004 20:34:42 +0000 (20:34 +0000)]
- Use constant for shift when converting file length in bytes to a sector
count.
- Fix the twiddle output so that it actually spins.
- Save %cx around BIOS calls to read in sectors from the disc as at least
one BIOS trashes %cx when called to read off of a USB CD-ROM drive.
Submitted by: Martin Nilsson <martin@gneto.com>
MFC after: 1 week
Nate Lawson [Mon, 12 Jan 2004 17:59:10 +0000 (17:59 +0000)]
Bite the bullet and uncomment the shutdown() in case we hit the _CRT or
_HOT temperatures. We have to do this at some point to keep from getting
imp(tm) melted hardware.
Ruslan Ermilov [Mon, 12 Jan 2004 15:29:47 +0000 (15:29 +0000)]
- Replaced several := ops with their += equivalents; the old
form became unnecessary with the bsd.prog.mk,v 1.69 change.
- Eliminated duplicate y.tab.h in SRCS.
Reviewed by: bde
- Complementary to the said bsd.prog.mk change, use the fact
that inner .for loops are not real loops but a tricky form
of a local macro for the outer loop's variable, and switch
to using faster variable modifiers to replace extensions.
Jacques Vidrine [Mon, 12 Jan 2004 13:29:54 +0000 (13:29 +0000)]
Fix a bug that could result in a null pointer dereference in
getpwent(3) or getpwuid(3) when using NIS adjunct maps. The bug was
present in the internal `nis_passwd' function. The lookup in the
adjunct map used the name passed into `nis_passwd', however no name
was of course supplied by getpwent or getpwuid. Correctly use the
name from the `struct pwd' that was found instead.
PR: bin/59962
Submitted by: Gabriel Gomez <ggomez@fing.edu.uy>
Matthew N. Dodd [Mon, 12 Jan 2004 12:31:03 +0000 (12:31 +0000)]
- Initialize qcb flags in ida_construct_qcb() with respect to DMA direction.
- Print operation type, if known in hard/soft error message in ida_done().
- NULL qcb struct bio pointer in ida_done().
Bill Paul [Mon, 12 Jan 2004 03:49:20 +0000 (03:49 +0000)]
Merge in some changes submitted by Brian Feldman. Among other things,
these add support for listing BSSIDs via wicontrol -l. I added code
to call OID_802_11_BSSID_LIST_SCAN to allow scanning for any nearby
wirelsss nets.
Convert from using individual mutexes to a mutex pool, created in
subr_ndis.c. This deals with the problem of drivers creating locks
in their DriverEntry() routines which might get trashed later.
Don Lewis [Sun, 11 Jan 2004 23:44:32 +0000 (23:44 +0000)]
Don't try to unlock the directory vnode in null_lookup() if the lock is
shared with the underlying file system and the lookup in the underlying
file system did the unlock for us.
Søren Schmidt [Sun, 11 Jan 2004 22:08:34 +0000 (22:08 +0000)]
Overhaul of the timeout/reinit framework. This should clear up most
of the leftovers from the old version that really doesn't work anymore.
Add a reset function for host-end of the ATA channel. This is needed
for the SiI3112 in order to whack it back to reality if a device
locks up the SATA interface (thereby preventing that we can reset the
device). The result is that ATA now recovers from the timeouts that
happens with the SiI3112A and more or less all disks based on old
PATA electronics with a Marvell PATA->SATA converter. This includes
lots of the popular SATA dongles and the WDC Raptor disks..
Ruslan Ermilov [Sun, 11 Jan 2004 20:45:46 +0000 (20:45 +0000)]
Ensure that generated headers are here before we build .depend
and object files in a less hackish way compatible with further
planned changes to bsd.dep.mk.
Ruslan Ermilov [Sun, 11 Jan 2004 19:26:33 +0000 (19:26 +0000)]
Use my newly acquired magic stick and put aslcompiler.y.h into
SRCS to teach make(1) that many .c sources are dependent on it.
This fixes parallel (-j) builds and makes it possible to build
individual .o files separately.
While here, removed PROG from CLEANFILES -- it's taken care of
already by bsd.prog.mk.