summaryrefslogtreecommitdiffstats
path: root/sys/dev/ata/ata-queue.c
diff options
context:
space:
mode:
authorsos <sos@FreeBSD.org>2004-06-01 12:26:08 +0000
committersos <sos@FreeBSD.org>2004-06-01 12:26:08 +0000
commita6ddd034080523b983146d61fabba038871f4bd6 (patch)
tree354b1c346ea7ebd7c7044d758ea24a1d57e91f84 /sys/dev/ata/ata-queue.c
parente0c89dae136c255495a8b2e404c5ef2e6e133ad5 (diff)
downloadFreeBSD-src-a6ddd034080523b983146d61fabba038871f4bd6.zip
FreeBSD-src-a6ddd034080523b983146d61fabba038871f4bd6.tar.gz
Use the right cmd+errorcode if we are in autosense/not.
Diffstat (limited to 'sys/dev/ata/ata-queue.c')
-rw-r--r--sys/dev/ata/ata-queue.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/ata/ata-queue.c b/sys/dev/ata/ata-queue.c
index 4f642a0..8b2b318 100644
--- a/sys/dev/ata/ata-queue.c
+++ b/sys/dev/ata/ata-queue.c
@@ -393,7 +393,8 @@ ata_completed(void *context, int dummy)
"\2NO_MEDIA\1ILLEGAL_LENGTH");
}
- if (request->error & ATA_E_MASK)
+ if ((request->u.atapi.sense_key ?
+ request->u.atapi.sense_key : request->error) & ATA_E_MASK)
request->result = EIO;
}
@@ -499,7 +500,7 @@ ata_cmd2str(struct ata_request *request)
static char buffer[20];
if (request->flags & ATA_R_ATAPI) {
- switch (request->u.atapi.sense_cmd ?
+ switch (request->u.atapi.sense_key ?
request->u.atapi.sense_cmd : request->u.atapi.ccb[0]) {
case 0x00: return ("TEST_UNIT_READY");
case 0x01: return ("REZERO");
OpenPOWER on IntegriCloud