- Add support for byte system bus mode. Based on patch in kern/17193 by
Christian Groessler, with some improvements by me.
- Rename sc_flags in mb86960_softc to sc_stat, rename "type" to sc_flags
to specify controller quirks and remove enum mb86960_type.
- Pass controller type via new sc_flags in mb86960_softc rather than
via an mb86960_attach() arg.
- Handle unaligned mbufs properly in mb86960_write_mbufs(). (from ne2000.c)
- Fix a signed/unsigned comparision warning.
- Add definitions of status bits in the RX packed header.
- Change types of some members in mb86960_softc.
- disk_unbusy() gets a new parameter to tell the IO direction.
- struct disk_sysctl gets 4 new members for read/write bytes/transfers.
when processing hw.diskstats, add the read&write bytes/transfers for
the old combined stats to attempt to keep backwards compatibility.
unfortunately, due to multiple bugs, this will cause new kernels and old
vmstat/iostat/systat programs to fail. however, the next time this is
change it will not fail again.
this is just the kernel portion.
kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals
kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)
based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
This merge changes the device switch tables from static array to
dynamically generated by config(8).
- All device switches is defined as a constant structure in device drivers.
- The new grammer ``device-major'' is introduced to ``files''.
device-major <prefix> char <num> [block <num>] [<rules>]
- All device major numbers must be listed up in port dependent majors.<arch>
by using this grammer.
- Added the new naming convention.
The name of the device switch must be <prefix>_[bc]devsw for auto-generation
of device switch tables.
- The backward compatibility of loading block/character device
switch by LKM framework is broken. This is necessary to convert
from block/character device major to device name in runtime and vice versa.
- The restriction to assign device major by LKM is completely removed.
We don't need to reserve LKM entries for dynamic loading of device switch.
- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
flag to clear, even when the COMMAND COMPLETE interrupt already did happen,
otherwise we get ATTENTION ERROR for next command if it happens soon
enough; this fixes the reliability problems introduced by previous change
some other cleanup & simlify of edc_cmd_wait()/edc_run_cmd(), the 'secs'
is just a hint used in !poll case only
add some comments
move status_block[] back to edc_mca_softc, to save stack memory
make #ifdef DEBUG #ifdef EDC_DEBUG and g/c some obsolete debug stuff
make some EAGAINs EIOs
edc_intr(): wakeup the waiter for any command, not just READ/WRITE DATA
not support a value (e.g., it's to be used as "options FOO" instead of
"options FOO=xxx"). options that take a value were converted to
defparam recently.
- minor whitespace & formatting cleanups
for the i82596 PORT access interface, from the documentation
for that chip. These help clarify writes to the SYSBUS
part of the SCP, and PORT usage by i82596-aware drivers.
* simplify and clean the attach code a lot, and support the 'drive'
locator
* pass proper dev_t to readdisklabel() - formerly, the passed value was
completely broken (used incorrect major and wrong minor), but worked
by accident
* worker thread is now spawned per controller, rather than per-drive;
i/o cannot be done concurrently by different drivers, only one
i/o can be pending at any time
* simplify the command queue code, just sleep appropriately when
!poll case, g/c 'async' code formerly needed, move the bio code
from ed_mca.c to edc_mca.c:edc_bio()
* other misc cleanups
the MCA DMA controller access. This also means we gain >16MB RAM support.
While here, overhaul the driver to saner state, especially:
* simplify and clean the attach code a lot, and support the 'drive'
locator
* pass proper dev_t to readdisklabel() - formerly, the passed value was
completely broken (used incorrect major and wrong minor), but worked
by accident
* worker thread is now spawned per controller, rather than per-drive;
i/o cannot be done concurrently by different drivers, only one
i/o can be pending at any time
* simplify the command queue code, just sleep appropriately when
!poll case, g/c 'async' code formerly needed, move the bio code
from ed_mca.c to edc_mca.c:edc_bio()
* put all string arrays used by edc_dump_status_block() within #ifdef EDC_DEBUG,
and use numbers instead if it's not defined; this cuts object size by 5KB
* other misc cleanups
DIAGNOSTIC/DEBUG from the kernel. This helped to boost the performance
on my test machine from ~5KB/s to like 800KB/s for ftp test, and
to like 700KB/s for netio test. I wouldn't have imagined the options
are THAT costly ....
and for initial autoconf probes; the latter eliminates need for
deferred configuration (and makes dmesg a bit nicer).
g/c EDF_IODONE flag - protect against interrupt by calling tsleep()
at splbio in worker thread
g/c unneeded stuff, improve some autoconf messages
Both models tested and seem to be quite stable and fast.
Thanks to:
- Hans Hubner <hans@Huebner.org> for giving me the cards for testing
- Georg Klug of Syskonnect, who provided me with hw docs for these cards,
very promptly and willingly - I wish all vendors would be like this
- Alfred Arnold, Linux SKNET driver author, for giving me valuable Syskonnect
contact :)
to be cleared always in edmcadone(), otherwise if there is a write
via bounce buffer followed by read directly to buf, the read operation
would return trashed data (the buf data would get overwritten
by contents of bounce buffer in edmcadone()).
Reset b_resid as necessary when the i/o is done, too.
g/c some unneeded stuff, use lockmgr()-style locking in ed_[un]lock(),
better avoid some deadlocks
These changes make the driver quite a bit more stable. It's actually
reliable enough to be possible to newfs the drive and use it for
read/write filesystem now.
Tested with NE/2 card provided to me by Hans Hubner <hans@Huebner.ORG>.
The Compex and Arco cards were not tested. According to Linux ne2 driver,
they should work same way as NE/2.
Disk & Controller only at the moment.
This driver still needs some touchup (error recovery is not quite
good, MCA DMA controller goo should be moved to driver independant
location), but is working enough to be usable for others. And I
want this under CVS control :)
Thanks to Scott Telford <st@epcc.ed.ac.uk> for providing me docs for
these devices (IBM DASD Storage Interface Specification for MCA rev. 2.2).
and shares some bits with ISA AT1700 driver. Gee, this one was really
easy :)
This card turned out to be quite good performer - I get about 360KB/s
on 386DX PS/2 machine, which is best of all supported cards so far.
Tested with AT1720T, card donated by David Brownlee.
WD8003W/A, card provided by David Brownlee (thanks!). The SMC Elite stuff not
tested since I don't have any; hopefully it's correct, should match
information in ADF files.
The MCA-specific init quirk taken from Linux smc-mca.c driver.
I don't quite grok why it works, but it does *cross fingers*.
The WD8003W/A seems to be quite a good choice. I get like 340KB/s on my
machine, where 3c523 does only like 310KB/s. The numbers would be probably
even better with faster CPU than 386DX :)
provided to me by David Brownlee (thanks!).
Performance of this card is quite poor on my PS/2 with 386DX, like 100KB/s
at best, but as low as 5KB/s when transferring bigger files due to
packet overruns. It would be good to revisit this later, probably by
teaching the ic code to use RX Early.
reset (same place as in the Linux driver). Hopefully this would fix
the initialization problem I've seen previously (cannot repeat it
even without this change no matter how I play with the card).
Remove the comment about the initialization problem now.