diff options
author | sos <sos@FreeBSD.org> | 2004-08-22 15:54:08 +0000 |
---|---|---|
committer | sos <sos@FreeBSD.org> | 2004-08-22 15:54:08 +0000 |
commit | be94cde364f800cf85113f772c600382765a7361 (patch) | |
tree | a2d82f00197f9a62251a5929f88159587e0f4309 /sys/dev/ata | |
parent | 9c209cbf17be056242a8a4a401405154709088ab (diff) | |
download | FreeBSD-src-be94cde364f800cf85113f772c600382765a7361.zip FreeBSD-src-be94cde364f800cf85113f772c600382765a7361.tar.gz |
Workaround devices that responds with registers as *both* master & slave,
but fail utterly when we try to talk to the "fake" device.
Diffstat (limited to 'sys/dev/ata')
-rw-r--r-- | sys/dev/ata/ata-queue.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/sys/dev/ata/ata-queue.c b/sys/dev/ata/ata-queue.c index 1dd7bc4..7151dcd 100644 --- a/sys/dev/ata/ata-queue.c +++ b/sys/dev/ata/ata-queue.c @@ -238,8 +238,16 @@ ata_completed(void *context, int dummy) ATA_DEBUG_RQ(request, "completed called"); if (request->flags & ATA_R_TIMEOUT) { - /* workaround for devices failing to interrupt */ - if (request->status == (ATA_S_READY | ATA_S_DSC)) { + /* workarounds for devices failing to interrupt */ + if (!request->status) { + ata_prtdev(request->device, + "FAILURE - %s no interrupt\n", + ata_cmd2str(request)); + request->result = ENXIO; + ATA_UNLOCK_CH(channel); + channel->locking(channel, ATA_LF_UNLOCK); + } + else if (request->status == (ATA_S_READY | ATA_S_DSC)) { ata_prtdev(request->device, "WARNING - %s no interrupt but good status\n", ata_cmd2str(request)); |