Bill Paul [Wed, 5 Jan 2000 23:38:07 +0000 (23:38 +0000)]
Update copyright date for Y2K (did the other files but forgot this one).
Also update comments to credit to Rob Furr with donating the adapter
that I used for testing. No code changes.
Bruce Evans [Wed, 5 Jan 2000 19:31:26 +0000 (19:31 +0000)]
Support filesystems with the not-so-new "filetype" feature. This
feature gives the d_type field for struct dirent. We used to panic
in ext2_readdir() for filesystems with this feature.
Bill Paul [Wed, 5 Jan 2000 18:25:53 +0000 (18:25 +0000)]
Correct the vendor ID for KLSI: it's actually 0x5e9. 0x3e8 is the
vendor ID for Aox Inc, which makes the controller engine and/or
firmware for the KLSI chip.
Peter Wemm [Wed, 5 Jan 2000 17:42:43 +0000 (17:42 +0000)]
Make the evil broken pnpbios compensation slightly less evil.
This is the hack that compensates for when bios vendors "forget" to
include the fdc control (0x3f7) port in their io port mappings. Instead
of accessing ports outside of a range allocated to a handle, simply
allocate the port directly. It even shows up in the probe..
Bruce Evans [Wed, 5 Jan 2000 17:34:00 +0000 (17:34 +0000)]
Refreshed the silly copy of <sys/disklabel.h>. The old copy was
seriously out of date. It older than Lite1 (it has an undeprecated
DISKTAB but not _PATH_DISKTAB).
Bill Paul [Wed, 5 Jan 2000 17:13:50 +0000 (17:13 +0000)]
Do not attempt to load the firmware a second time. If you reboot your
machine but leave your KLSI adapter plugged into your USB port, it
may stay powered on and retain its firmware in memory. Trying to load
the firmware again in this case will wedge the chip. Try to detect this
in the kue_load_fw() routine and bail if the firmware is already
loaded and running.
Also, in the probe/match routine, force the revision code to the
hardware default and force a rescan of the quirk database. This is
necessary because the adapter will return a different revision code
if the firmware has been loaded. Without the firmware, the revision
code is 0x002. With the firmware, the revision code is 0x202. This
confuses the quirk mechanism, which won't match a quirk to a device
unless the revision code agrees with the quirk table entry.
This makes probe/attach of these devices somewhat more reliable.
Also add a few comments about the device's operation.
Bruce Evans [Wed, 5 Jan 2000 17:04:36 +0000 (17:04 +0000)]
Refreshed the silly copy of <sys/dirent.h>. _KERNEL was still spelled
KERNEL, and the changes to remove the <sys/types.h> prerequisite had
not reached here.
Removed unused/wrong include of <sys/types.h> in synopsis.
Peter Wemm [Wed, 5 Jan 2000 16:40:10 +0000 (16:40 +0000)]
Zap pci_map_dense() and pci_map_bwx() - they were for compatability but
are not used. All the drivers that use memory mapped IO on the Alpha have
been ported already.
Bruce Evans [Wed, 5 Jan 2000 16:38:58 +0000 (16:38 +0000)]
Fixed missing includes in synopsis. <sys/file.h> went missing when KERNEL
was not updated to _KERNEL. Actually including <sys/file.h> as specified
never actually worked, since a prerequisite was missing.
Peter Wemm [Wed, 5 Jan 2000 16:31:27 +0000 (16:31 +0000)]
Patch up some of the evilness left over from the early newbus porting.
In particular:
- Don't leave resources allocated in the probe routine. Allocate them
during probe and release them. Probe's job is to identify devices only.
- Don't abuse the ivars pointer.. (!). Create real ivars and use the
proper access system. (the bus_read_ivar method)
- Don't add the children until attach() has successfully grabbed the
hardware, otherwise there are potential leaks if attach fails.
Don't build with X support if DESTDIR is defined. This prevents
breaking a cross-build caused by taking the X libraries on the
build machine. In general this means that we never compile with
X support. The user has to manually compile doscmd for that.
Greg Lehey [Wed, 5 Jan 2000 06:10:52 +0000 (06:10 +0000)]
Correct printf format for pointers to avoid compilation warnings on
alpha.
Modify the manner in which we lock RAID-5 plexes. This appears to
solve some of the elusive panics we have seen with corrupted buffer
headers (specifically the zeroed-out b_iodone field).
Greg Lehey [Wed, 5 Jan 2000 06:09:43 +0000 (06:09 +0000)]
Modify the manner in which we lock RAID-5 plexes. This appears to
solve some of the elusive panics we have seen with corrupted buffer
headers (specifically the zeroed-out b_iodone field).
Greg Lehey [Wed, 5 Jan 2000 06:07:26 +0000 (06:07 +0000)]
Add function moveobject, which currently moves subdisks to different
drives. This function just does the low-level configuration changes;
the resultant subdisk is stale if it previously had any contents,
otherwise it is empty (i.e. in need of initializing if it's RAID-5).
We still need to handle getting the contents moved over, but the
current version will suffice to migrate subdisks from a disk which has
failed.
Submitted-by: Marius Bendiksen <marius@marius.scancall.no>
Greg Lehey [Wed, 5 Jan 2000 05:56:47 +0000 (05:56 +0000)]
Explicitly type large scalar parameters to avoid compilation warnings
on alpha.
Submitted-by: Bernd Walter <ticso@cicely.de>
Replace %q formats with %lld.
Desired-by: bde
Remove #ifdef RAID5
vinum_lsi: If a subdisk is in 'reviving' state, check the status of
the revive and report the status of the revive. In verbose mode,
display the pid of the reviver.
Greg Lehey [Wed, 5 Jan 2000 05:55:57 +0000 (05:55 +0000)]
Explicitly type large scalar parameters to avoid compilation warnings
on alpha.
Submitted-by: Bernd Walter <ticso@cicely.de>
Add function vinum_mv, which moves subdisks to different drives. This
function just does the low-level configuration changes; the resultant
subdisk is stale if it previously had any contents, otherwise it is
empty (i.e. in need of initializing if it's RAID-5). We still need to
handle getting the contents moved over, but the current version will
suffice to migrate subdisks from a disk which has failed.
Submitted-by: Marius Bendiksen <marius@marius.scancall.no>
Matthew Dillon [Wed, 5 Jan 2000 05:11:37 +0000 (05:11 +0000)]
Enhance reassignbuf(). When a buffer cannot be time-optimally inserted
into vnode dirtyblkhd we append it to the list instead of prepend it to
the list in order to maintain a 'forward' locality of reference, which
is arguably better then 'reverse'. The original algorithm did things this
way to but at a huge time cost.
Enhance the append interlock for NFS writes to handle intr/soft mounts
better.
Fix the hysteresis for NFS async daemon I/O requests to reduce the
number of unnecessary context switches.
Modify handling of NFS mount options. Any given user option that is
too high now defaults to the kernel maximum for that option rather then
the kernel default for that option.
Reviewed by: Alfred Perlstein <bright@wintelcom.net>
Bill Paul [Wed, 5 Jan 2000 04:27:24 +0000 (04:27 +0000)]
Add device driver support for USB ethernet adapters based on the
Kawasaki LSI KL5KUSB101B chip, including the LinkSys USB10T, the
Entrega NET-USB-E45, the Peracom USB Ethernet Adapter, the 3Com 3c19250 and the ADS Technologies USB-10BT. This device is 10mbs
half-duplex only, so there's miibus or ifmedia support. This device
also requires firmware to be loaded into it, however KLSI allows
redistribution of the firmware images (I specifically asked about
this; they said it was ok).
Special thanks to Annelise Anderson for getting me in touch with
KLSI (eventually) and thanks to KLSI for providing the necessary
programming info.
Highlights:
- Add driver files to /sys/dev/usb
- update usbdevs and regenerate attendate files
- update usb_quirks.c
- Update HARDWARE.TXT and RELNOTES.TXT for i386 and alpha
- Update LINT, GENERIC and others for i386, alpha and pc98
- Add man page
- Add module
- Update sysinstall and userconfig.c
Matthew Dillon [Wed, 5 Jan 2000 00:32:18 +0000 (00:32 +0000)]
Fix at least one source of the continued 'NFS append race'. close()
was calling nfs_flush() and then clearing the NMODIFIED bit. This is
not legal since there might still be dirty buffers after the nfs_flush
(for example, pending commits). The clearing of this bit in turn prevented
a necessary vinvalbuf() from occuring leaving left over dirty buffers
even after truncating the file in a new operation. The fix is to
simply not clear NMODIFIED.
Also added a sysctl vfs.nfs.nfsv3_commit_on_close which, if set to 1,
will cause close() to do a stage 1 write AND a stage 2 commit
synchronously. By default only the stage 1 write is done synchronously.
Reviewed by: Alfred Perlstein <bright@wintelcom.net>
Tor Egge [Tue, 4 Jan 2000 22:24:59 +0000 (22:24 +0000)]
ISA device drivers use the ISA source interrupt number in locations where
the low level interrupt handler number should be used. Change
setup_apic_irq_mapping() to allocate low level interrupt handler X (Xintr${X})
for any ISA interrupt X mentioned in the MP table.
Remove an assumption in the driver for the system clock (clock.c) that
interrupts mentioned in the MP table as delivered to IOAPIC #0 intpin Y
is handled by low level interrupt handler Y (Xintr${Y}) but don't assume
that low level interrupt handler 0 (Xintr0) is used.
Don't allocate two low level interrupt handlers for the system clock.
Reviewed by: NOKUBI Hirotaka <hnokubi@yyy.or.jp>
Create a separate pps_offset variable to use for applying the
hardpps() produced offset component. This is tested and behaved
stable with frequency offsets from -338.05 to +499.91 PPM.
Interestingly the machine I tested this on would fail if the clock
were slower than 14.3132 MHz whereas it was perfectly happy to run
at 16.384 MHz, in other words [-340PPM ... +14.4%]
Matt Jacob [Tue, 4 Jan 2000 11:12:42 +0000 (11:12 +0000)]
Add first pass of the Intel Gigabit Ethernet (wiseman) driver. This
driver seems relatively functional, but could use some souping up,
particularly in the performance area. This has both NetBSD and FreeBSD
attachment code and a fair amount of effort has been put into making
it easy to port to different *BSD platforms.
The basic design is a one tfd per mbuf transmit (with no transmit
related interrupts- tfds are gc'd as needed). The receive ring
uses a 2K buffer per rfd with a +2 byte adjust for the ethernet
header (so the payload is aligned). There's support that *almost*
works for doing large packets- the rfd chaining code works, but there's
some problem with getting good checksums at the IP reassembly level
(ditto for doing short tfd's too).
The chip has support for TCP checksums insertion for transmit and
TCP checksum calculation on receive (for both you have to do some
appropriate backoff && twiddling), but this isn't in place.
This is nearly entirely reverse engineered from the released Intel
driver, so there's a lot of "We have to do this but do not know why"
stuff. There is somebody who has the chip specs who works in FreeBSD
but they're being a bit standoffish about even sharing hints which
is somewhat annoying. It's also apparent that all I had to work with
were the first rev boards.
This driver has been lightly tested on intel && alpha, but only
point-to-point. There may be some issues with switches- use of
boot time environment variables that override EEPROM settings
(e.g., 'set wx_ilos=1' which inverts the sense of optical signal
loss) may help with this.
I had this out for review for three weeks, and nobody said anything
negative or positive, ergo, this checkin has no 'reviewed by' field
which I would have preferred.
Ruslan Ermilov [Tue, 4 Jan 2000 10:32:55 +0000 (10:32 +0000)]
* Make --null option work in (HAVE_LIBZ > 0) case.
* Remove "why we need this decl..." comment. The `matcher' variable
is defined in *grepmat.c files in the original distribution, which
we did not import.
Turn on a new /usr/bin/cpp that is a true binary rather than a shell script
wrapper. /usr/bin/cpp knows about all the GCC predefined symbols and has
the functionality of the previous EGCS 1.1.2 /usr/libexec/cpp.
Matt Jacob [Tue, 4 Jan 2000 03:45:49 +0000 (03:45 +0000)]
Clean up some debug printing. Find the correct lun when SCCLUN is
defined. If we complete with a check condition but no sense data,
say we had an AUTOSENSE failure.