aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/ata/ata-queue.c
diff options
context:
space:
mode:
authorSøren Schmidt <sos@FreeBSD.org>2003-09-19 12:46:12 +0000
committerSøren Schmidt <sos@FreeBSD.org>2003-09-19 12:46:12 +0000
commit4cb5b1f9365857feea0ad62ef7d0db088e61db96 (patch)
tree292a8ddd1010d6274045bc9e64934d826f20de8c /sys/dev/ata/ata-queue.c
parent24db258f35eced3ea8ed89fc8cfe86cd958f4e10 (diff)
downloadsrc-4cb5b1f9365857feea0ad62ef7d0db088e61db96.tar.gz
src-4cb5b1f9365857feea0ad62ef7d0db088e61db96.zip
Always check the sensekey field on ATAPI returns
Add INQUIRY to cmd2str.
Notes
Notes: svn path=/head/; revision=120232
Diffstat (limited to 'sys/dev/ata/ata-queue.c')
-rw-r--r--sys/dev/ata/ata-queue.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/dev/ata/ata-queue.c b/sys/dev/ata/ata-queue.c
index c282e4c97987..dac66cb8733e 100644
--- a/sys/dev/ata/ata-queue.c
+++ b/sys/dev/ata/ata-queue.c
@@ -264,7 +264,7 @@ ata_completed(void *context, int pending)
if (request->result)
break;
- if (request->error & ATA_E_MASK) {
+ if (request->error) {
switch ((request->error & ATA_SK_MASK)) {
case ATA_SK_RECOVERED_ERROR:
ata_prtdev(request->device, "WARNING - %s recovered error\n",
@@ -297,6 +297,8 @@ ata_completed(void *context, int pending)
"\2NO_MEDIA\1ILLEGAL_LENGTH");
request->result = EIO;
}
+ if (request->error & ATA_E_MASK)
+ request->result = EIO;
}
break;
}
@@ -369,6 +371,7 @@ ata_cmd2str(struct ata_request *request)
case 0x0a: return ("WRITE");
case 0x10: return ("WEOF");
case 0x11: return ("SPACE");
+ case 0x12: return ("INQUIRY");
case 0x15: return ("MODE_SELECT");
case 0x19: return ("ERASE");
case 0x1a: return ("MODE_SENSE");