diff options
Diffstat (limited to 'drivers/ata/libata-eh.c')
-rw-r--r-- | drivers/ata/libata-eh.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index 70022bf91493..0444e1c91c43 100644 --- a/drivers/ata/libata-eh.c +++ b/drivers/ata/libata-eh.c @@ -1428,8 +1428,10 @@ static void ata_eh_request_sense(struct ata_queued_cmd *qc) err_mask = ata_exec_internal(dev, &tf, NULL, DMA_NONE, NULL, 0, 0); /* Ignore err_mask; ATA_ERR might be set */ if (tf.status & ATA_SENSE) { - ata_scsi_set_sense(dev, cmd, tf.lbah, tf.lbam, tf.lbal); - qc->flags |= ATA_QCFLAG_SENSE_VALID; + if (ata_scsi_sense_is_valid(tf.lbah, tf.lbam, tf.lbal)) { + ata_scsi_set_sense(dev, cmd, tf.lbah, tf.lbam, tf.lbal); + qc->flags |= ATA_QCFLAG_SENSE_VALID; + } } else { ata_dev_warn(dev, "request sense failed stat %02x emask %x\n", tf.status, err_mask); |