Age | Commit message (Collapse) | Author |
|
SCSI/ATAPI detach is not here yet.
Minor cleanup of wdc. Downgrade to UDMA mode 1 before going further.
Want to stay in UDMA modes because they're more error-resilient due to
a CRC.
Got rid of some of the ridiculous amount of softc sharing going on.
Hopefully, this will make the life of whoever goes in and fixes the
ref-counting to be correct easier.
|
|
during probe causes the devices pain.
So, I don't do that any more. :-)
Also, try ATAPI_IDENTIFY_DEVICE a couple times. Seems to help with an
old NEC drive.
|
|
Fix for some non-ATAPI-4 compliant drives
|
|
Use ticks not time. Ticks is monotonically increasing.
Fix error output in wdc_atapi_ctrl
ATAPI errors -> SCSI errors conversion now works better
Other minor cleanup
|
|
Better timeout logic
|
|
Major restructuring of the code path that sends ATAPI packet commands.
One set of functions works in polling, process, and interrupt contexts.
|
|
driver (pciide, wdc, etc.)
Remove #define WDCDEBUG from top of files
More fixes to ATAPISCSI logic:
Not all devices transition correctly between phases. Devices are supposed
to keep BSY high until they've set the registers to the next sensible
state. Some devices drop BSY and leave the registers in an old or
nonsense state. Our polling code is extremely sensitive to this
(though an early itnerrupt could also observe this). So, if the device is
in an unexpected state, the new polling code waits for a while in the hope
that it enters a better state.
This seems to fix many of the problems reported.
Also, there was a horrible bug which would cause sense to fail on a ATAPI
command that sent data to the drive
|
|
|
|
Use xfer->c_bcount and not sc_xfer->datalen when passing our buffer limit
to the device. In the case of SENSE, we were sending 0 as our buffer limit,
potentially confusing some devices.
Cap the bytes/interrupt at 65534, which prevents odd size transfers. Odd
size transfers, while not inherently evil, are kind of weird through a 16-bit
wide interface.
|
|
Changed SCSI XS_TIMEOUT error to SCSI XS_RESET error to better reflect
that we had to reset the bus
Don't downgrade DMA modes if the transfer that failed wasn't using DMA
|
|
Fix wdc_select_drive to no longer wait for free channel (not strictly correct
but we couldn't handle a non-free channel anyway)
Major changes to the ATAPI interrupt logic to reduce reliance on the drive
setting the bits correctly. Deal with situation that we get length = 0 back
from the drive on transfer (instead of potentially looping forever).
Timeout in drive setup should not cause the drive to downgrade modes.
|
|
Separate wdc_probe_caps into wdc_probe_caps and wdc_print_caps for more
flexibility in printing capability information.
Get rid of wdc_final_attach.
Include name of device (e.g. cd0), if possible, on errors.
atapiscsi layer work:
Put a pointer to the SCSI device into ata_drive_datas' drv_softc field
Simplify, simplify, simplify. Got rid of a bunch of fields in atapiscsi_softc
Delay printing capabilities until we know the real device name (e.g. st0)
|
|
|
|
Fix Sense Error 6 errors.
Better atapi to scsi sense conversion.
|
|
|
|
|
|
|
|
More SCSI logic from NetBSD-current
Some tape fixes. ATAPI tapes do not work yet for most operations.
|
|
during probe. This has a slight chance of breaking the detection of some
ATAPI devices (which don't show during initial probe).
Thanks to deraadt for pointing this out.
|
|
for Identify Drive to do its thing. This should fix the "IDENTIFY timeout"
some people are seeing.
ATAPI SCSI buses only have 2 targets.
|
|
|
|
Modify the ATAPI reset state machine. Added two states, IDENTIFY and
IDENTIFY_WAIT. These will revive ATAPI drives after a hard ATA reset.
I don't think ATAPI devices have LUNs, so flag SDEV_NOLUNS as quirk
of the SCSI adapter. The SCSI devices will "inherit" this setting from
the parent.
Correctly deal with 16-byte command packet devices (not that any
exists, AFAIK).
Optimization - don't poll devices that assert an interrupt on after
sending PACKET cmd.
|
|
Mostly based on NetBSD-current
|
|
|
|
|
|
|
|
Introduction of home-grown
To enable this stuff in your configuration, look at the NEWATA conf file
and go through
dev/isa/files.isa
dev/pci/files.pci
conf/files
arch/i386/conf/files.i386
and follow the instructions on commenting/uncommenting stuff
|