Commit Graph

104 Commits

Author SHA1 Message Date
hannken 7de36862a8 Rename bufq_init() to bufq_alloc().
Add bufq_free() to remove a buffer queue.
Avoid MALLOC while holding a spinlock.

From Chuck Silvers.
2002-07-21 15:32:17 +00:00
hannken 856bd17f66 Convert to new device buffer queue interface. 2002-07-20 16:30:18 +00:00
jdolecek 23f67512e0 edc_cmd_wait(): it is absolutely necessary to wait for the BSR_CMD_INPROGRESS
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
2002-03-31 10:01:26 +00:00
jdolecek 3ead6be6bd no need to splbio() while manipulating sc_q - it's accessed from
process context only (edcworker())
2002-03-29 20:10:46 +00:00
jdolecek 313e79182d aha at mca? confirmed working (test card provided by Jonathan Hankins) 2002-03-24 18:47:54 +00:00
jdolecek 6c9be960fd update comments + cosmetic change in aha_mca_probe()
Driver is now confirmed working. Tested with AHA-1640 card provided to me
by Jonathan Hankins.
2002-03-24 18:46:49 +00:00
jdolecek b042e5bdb0 drop the isadma attribute for aha, aha at mca? doesn't use that 2002-03-24 18:03:58 +00:00
thorpej 6ca57419d1 Labels must be followed by statements. 2001-12-31 22:07:58 +00:00
jdolecek 27b0006d34 it doesn't make sense to wait for resources during autoconfiguration 2001-12-06 21:04:27 +00:00
jdolecek a275d0a6b9 clarify copyright - this is all freshly written, no older code used 2001-12-04 20:51:23 +00:00
jdolecek 7a12ca98ab Make this NCR 53C90 driver work, using the chip information from
Tymm Twillman's Linux mca_53c9x driver.
Tested with external ZIP100 only.
2001-12-04 20:47:58 +00:00
sommerfeld ceb358f80c Fix so these files build with options DEBUG enabled.
The change to edc_mca.c may not work as I don't have any mca hardware.
2001-12-04 20:00:15 +00:00
jdolecek f803294ead use the new MCABUS_DMA_16BIT flag to use 16bit DMA (not implicit anymore) 2001-12-02 17:04:41 +00:00
jdolecek c65c74ab28 regenerate (allocate identifier for NCR 53c90) 2001-12-01 10:44:35 +00:00
jdolecek 8272a293b7 allocate identifier for NCR 53C90 2001-12-01 10:43:36 +00:00
jdolecek 4b334401ca Nonworking NCR 53c90 attachment. I don't get any interrupts from
the device yet, need to find real NCR53c90 docs to figure out what's wrong.
2001-12-01 10:42:38 +00:00
jdolecek 8528a3409b Match also product id 0x627c, it was omitted by mistake.
Problem pointed out by Carl Drougge on tech-kern, thanks!
2001-11-28 20:56:47 +00:00
lukem ecb81c3f6d - convert usage of "defopt" to "defflag" where the relevant option does
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
2001-11-28 10:21:10 +00:00
fredette f0002ba642 Added macros for the bits in the SYSBUS byte, and macros
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.
2001-11-26 23:30:59 +00:00
jdolecek 67238c609c The header part of driver overhault:
* 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
2001-11-24 12:46:15 +00:00
jdolecek 211d58f020 don't need opt_mcaverbose.h here
print 'memory configured' instead of just 'configured' for memory expansion
cards
2001-11-24 12:33:14 +00:00
jdolecek bb23eba3d8 MCA DMA hooked via bus_dma, so remove one
add entry regarding AHA-1640 (the driver needs testing)
2001-11-23 22:57:34 +00:00
jdolecek 07312f0fbb Convert over to use the new MCA DMA facilities, which encapsulate
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
2001-11-23 22:53:09 +00:00
jdolecek 90fac765da add 'drive' locator to mca edc 2001-11-23 22:35:46 +00:00
jdolecek d5c1ba9ed2 add a comment clarifying the DMA support, g/c the commented
out isa_dmacascade() call
some minor intendation changes, while here
2001-11-22 20:25:58 +00:00
lukem 2565646230 don't need <sys/types.h> when including <sys/param.h> 2001-11-15 09:47:59 +00:00
lukem 8b7bb91219 add RCSID 2001-11-13 07:38:28 +00:00
sommerfeld 3b5dda2596 Don't spinlockinit a simple_lock; simple_lock_init it instead. 2001-09-03 18:13:13 +00:00
chs 92140aa25f make this compile. 2001-08-18 00:41:38 +00:00
jdolecek 5664c34574 all outstanding MCA bugs fixed, woo-hoo :) 2001-07-31 13:16:25 +00:00
wiz cc0b68092e Correct various misspellings of 'transfer' and inflected forms. 2001-07-08 18:06:42 +00:00
jdolecek 1f7c685ce3 remove //-commented debugging stuff 2001-05-14 07:35:33 +00:00
jdolecek 2cd8833615 Change the comment about sucky performance to recommendation to remove
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 ....
2001-05-13 20:43:04 +00:00
jdolecek 5b3932d176 Implement polled command mode, and use it for writing system dump
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
2001-05-04 12:58:34 +00:00
jdolecek c58375dd6a Well, 16us is certainly more than 500 nanoseconds, but 1us is too, right?
This change improves elmc performance to ~350KB/s on my 386DX,
which is better than even WD8003.
2001-05-03 11:17:36 +00:00
jdolecek 63a7c0b5ad Add IBM SCSI Adapter support to the list - this is the last thing
I'm aware Linux MCA supports and NetBSD not
2001-05-02 13:32:21 +00:00
jdolecek 63958eee01 One item off TODO list - we check for MCA bus presence via bios call 2001-05-02 13:20:31 +00:00
jdolecek 2758818d81 regen - SKNET cards 2001-04-27 18:04:14 +00:00
jdolecek 3367b801f2 Add driver for SKNET Personal and MC+ - AMD Lance 7990 based ethernet cards.
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 :)
2001-04-27 18:03:40 +00:00
jdolecek b28d00fa02 Introduce mca_match_disabled() - this returns true if cards with particular
id should be handled even through it's marked as disabled in POS registers.
There are some cards which need this due to nonstandard hw design.
2001-04-27 17:52:51 +00:00
jdolecek d66e548d92 Introduce mca_match_disabled() - this returns true if cards with particular
id should be handled even through it's marked as disabled in POS registers.
There are some cards which need this due to nonstandard hw design.
2001-04-27 17:11:45 +00:00
simonb 6f6fe2f3ad Spell occurred correctly. 2001-04-25 02:33:08 +00:00
jdolecek 115f4e4207 print the drq together with irq, slot info 2001-04-24 09:15:06 +00:00
jdolecek 09062a99f9 one less 2001-04-23 09:36:01 +00:00
jdolecek 1fe3261554 Add constant for SKNET Ethernet Card 2001-04-23 06:10:09 +00:00
jdolecek 15224351ef Compact autoconf info by printing the IRQ number together
with 'at mca0 slot foo' info.
2001-04-23 06:10:08 +00:00
jdolecek 3d1c1edbc5 g/c edc_dev_status[] 2001-04-22 20:02:38 +00:00
jdolecek d0a98e1d18 fix edc_dump_status_block() to correctly print Command Error Code and
Device Error Code/Status when appropriate
add one item to TODO - need support for kernel memory crash dumps (to be
implemented "soon")
2001-04-22 20:00:59 +00:00
jdolecek 85f0e37b44 edc_dump_status_block(): print RBA # and block count as unsigned 2001-04-22 13:00:24 +00:00
jdolecek 912e570671 Introduce machdep mca_disk_[un]busy(), which turn on/off disk LED.
Call as appropriate from the ESDI disk driver
2001-04-22 11:52:18 +00:00