From 6fdbf542466663bf99012ed5b6d0fe535326e6a5 Mon Sep 17 00:00:00 2001 From: Douglas Gilbert Date: Sun, 3 Jan 2010 13:51:15 -0500 Subject: [PATCH] --- yaml --- r: 181257 b: refs/heads/master c: e7efe5932b1d3916c79326a4221693ea90a900e2 h: refs/heads/master i: 181255: b46e2983291b0a90719af2b0d526c086e6583744 v: v3 --- [refs] | 2 +- trunk/drivers/scsi/scsi_lib.c | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 13996d4f5834..5efea2ef8bf2 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 5d7ebb9c7a04d29efce1099024944dfd94d9f63c +refs/heads/master: e7efe5932b1d3916c79326a4221693ea90a900e2 diff --git a/trunk/drivers/scsi/scsi_lib.c b/trunk/drivers/scsi/scsi_lib.c index c6642423cc67..56977097de9f 100644 --- a/trunk/drivers/scsi/scsi_lib.c +++ b/trunk/drivers/scsi/scsi_lib.c @@ -773,8 +773,14 @@ void scsi_io_completion(struct scsi_cmnd *cmd, unsigned int good_bytes) * we already took a copy of the original into rq->errors which * is what gets returned to the user */ - if (sense_valid && sshdr.sense_key == RECOVERED_ERROR) { - if (!(req->cmd_flags & REQ_QUIET)) + if (sense_valid && (sshdr.sense_key == RECOVERED_ERROR)) { + /* if ATA PASS-THROUGH INFORMATION AVAILABLE skip + * print since caller wants ATA registers. Only occurs on + * SCSI ATA PASS_THROUGH commands when CK_COND=1 + */ + if ((sshdr.asc == 0x0) && (sshdr.ascq == 0x1d)) + ; + else if (!(req->cmd_flags & REQ_QUIET)) scsi_print_sense("", cmd); result = 0; /* BLOCK_PC may have set error */