diff options
author | sos <sos@FreeBSD.org> | 2004-06-01 12:26:08 +0000 |
---|---|---|
committer | sos <sos@FreeBSD.org> | 2004-06-01 12:26:08 +0000 |
commit | a6ddd034080523b983146d61fabba038871f4bd6 (patch) | |
tree | 354b1c346ea7ebd7c7044d758ea24a1d57e91f84 /sys/dev/ata/ata-queue.c | |
parent | e0c89dae136c255495a8b2e404c5ef2e6e133ad5 (diff) | |
download | FreeBSD-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.c | 5 |
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"); |