aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libata-scsi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/libata-scsi.c')
-rw-r--r--drivers/scsi/libata-scsi.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/scsi/libata-scsi.c b/drivers/scsi/libata-scsi.c
index 234e1cadb070..ec628cea386e 100644
--- a/drivers/scsi/libata-scsi.c
+++ b/drivers/scsi/libata-scsi.c
@@ -555,7 +555,8 @@ void ata_gen_ata_desc_sense(struct ata_queued_cmd *qc)
555 * Use ata_to_sense_error() to map status register bits 555 * Use ata_to_sense_error() to map status register bits
556 * onto sense key, asc & ascq. 556 * onto sense key, asc & ascq.
557 */ 557 */
558 if (tf->command & (ATA_BUSY | ATA_DF | ATA_ERR | ATA_DRQ)) { 558 if (qc->err_mask ||
559 tf->command & (ATA_BUSY | ATA_DF | ATA_ERR | ATA_DRQ)) {
559 ata_to_sense_error(qc->ap->id, tf->command, tf->feature, 560 ata_to_sense_error(qc->ap->id, tf->command, tf->feature,
560 &sb[1], &sb[2], &sb[3]); 561 &sb[1], &sb[2], &sb[3]);
561 sb[1] &= 0x0f; 562 sb[1] &= 0x0f;
@@ -630,7 +631,8 @@ void ata_gen_fixed_sense(struct ata_queued_cmd *qc)
630 * Use ata_to_sense_error() to map status register bits 631 * Use ata_to_sense_error() to map status register bits
631 * onto sense key, asc & ascq. 632 * onto sense key, asc & ascq.
632 */ 633 */
633 if (tf->command & (ATA_BUSY | ATA_DF | ATA_ERR | ATA_DRQ)) { 634 if (qc->err_mask ||
635 tf->command & (ATA_BUSY | ATA_DF | ATA_ERR | ATA_DRQ)) {
634 ata_to_sense_error(qc->ap->id, tf->command, tf->feature, 636 ata_to_sense_error(qc->ap->id, tf->command, tf->feature,
635 &sb[2], &sb[12], &sb[13]); 637 &sb[2], &sb[12], &sb[13]);
636 sb[2] &= 0x0f; 638 sb[2] &= 0x0f;