Commit Graph

17 Commits

Author SHA1 Message Date
hubertf ed418e30a2 Only define WDCDEBUG if not already define (e.g. by kernel option) 1999-02-21 00:52:04 +00:00
bouyer 379429d4df If the REQUEST_SENSE command fails, issue a reset instead of XS_DRIVER_STUFFUP.
If REQUEST_SENSE succeeds but doens't return any data, return XS_SHORTSENSE
as the sense field will just contain a copy or the error register.
1999-02-15 18:40:01 +00:00
bouyer 2bf6a99afb For IDE/ATAPI protocols botches, reset the bus and return XS_RESET
instead of XS_DRIVER_STUFFUP.
1999-02-02 12:59:31 +00:00
bouyer ce870816e0 Cosmetic changes, from Soren S. Jorvan. 1999-01-29 11:36:20 +00:00
thorpej 268eb959c4 Make this compile again after the void * arith changes. 1999-01-09 03:16:17 +00:00
augustss 332d7c138f Avoid arithmetic on `void *' since that's not ANSI C. 1999-01-08 18:10:35 +00:00
bouyer 85078af6c4 Add a new quirk flags, "ADEV_NOSENSE", for devices that don't
handle properly the request sense command. Add <FX320S, , q01> as being
sense-unfriendly in the quirk table.
1998-12-17 13:05:05 +00:00
bouyer c37bf0ccb4 Keep track of DMA errors, and downgrade the transert mode (UDMA ->DMA,
DMA->PIO) in case of 2 consecutive errors. Don't downgrade if the
PIO/DMA/UDMA modes were forced by a config flag.
1998-12-16 13:02:03 +00:00
drochner 3e38051bc5 in wdc_softc: access the per-channel data via a pointer array instead of
an array of fixed-sized channel_softc elements. This way IDE controllers
which more than 1 channel (pciide) can extend the channel data easily
for private needs.
To avoid the double dereference at runtime, change the argument of
wdcstart() to the channel data pointer instead of the array index.
1998-11-21 15:41:41 +00:00
thorpej 3b068a6c78 Adapt to the new scsipi_adapter interface. 1998-11-19 21:53:32 +00:00
bouyer 0d0ff884e5 In atapi_wdc.c, issue a 'REQUEST SENSE' command when appropriate.
Return XS_SENSE when the full sense info has been retrieved, or
XS_SHORTSENSE if only the sense key was available (from the error register)
Make atapi_interpret_sense() deal with this, and call scsipi_interpret_sense()
for XS_SENSE. (XXX sd_interpret_sense() and the ioctl code needs to be made
aware of XS_SHORTSENSE too ! sense hanlding for these is now less broken for
devices that support 'REQUEST SENSE')
All the ATAPI devices I have access to seems to honnor the SENSE_REQUEST
command, but I suspect some ATAPI devices will not (althouh it's mandatory).
The code should be able to deal with this, but is untested ...
1998-11-17 14:45:39 +00:00
bouyer 5f723da8af Move the "warning: bcount value is %d after io" message in a WDCDEBUG_PRINT.
Ifdef DIAGNOSTIC, print the above message only if bcount is < 0.
1998-10-19 12:28:03 +00:00
bouyer e8322de657 Add a new drive flag, DRIVE_MODE, set when the drive properly reported its
PIO/DMA modes. Don't try a SET_FEATURE if it didn't report its mode.
1998-10-13 15:18:46 +00:00
bouyer 7545a59b8c In debug message, always print controller:channel:drive 1998-10-13 15:02:41 +00:00
bouyer ff0134b99f Properly separate DEBUF_XFERS and DEBUG_FUNCS: DEBUF_XFERS is for data
transfers (may be called often), where DEBUG_FUNCS is for setup functions
(not used for normal contitions).
1998-10-13 09:33:59 +00:00
bouyer da5d0a6f17 pciide.c: don't define WDCDEBUG, so it compiles on alpha. Correct a bogon
in the printing of DMA mode (piix3/4 only)
others: set the debug_mask to 0, so that debug messages are turned off by
default but can be easily turned on.
Reset drive_flags to 0 for unconfigured devices, so that they are ignored
later. For configured devices, reset state to 0 after probe/attach.
1998-10-13 08:59:45 +00:00
bouyer 19fddaeeb5 Merge bouyer-ide 1998-10-12 16:09:10 +00:00