Commit Graph

21 Commits

Author SHA1 Message Date
mrg 603098b9b5 implement separate read/write disk statistics:
- 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.
2002-11-01 11:31:50 +00:00
thorpej c9b3657ce9 Add trailing ; to CFATTACH_DECL. 2002-10-02 16:33:28 +00:00
thorpej 9bb77522c1 Use CFATTACH_DECL(). 2002-09-30 21:31:52 +00:00
thorpej f818766afe Declare all cfattach structures const. 2002-09-27 20:31:45 +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
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
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 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
lukem 8b7bb91219 add RCSID 2001-11-13 07:38:28 +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
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 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 8927d6f1be Fix serious bug in bounce buf handling - the EDF_BOUNCEBUF flag needs
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.
2001-04-22 11:32:49 +00:00
jdolecek dbf91c827d Use "edc" instead of "dasd". As pointed out by Soren, dasd doesn't
mean anything special in IBM-talk. And edc better matches prior art, too.
2001-04-19 17:17:28 +00:00