summaryrefslogtreecommitdiffstats
path: root/drivers/ata/libata-eh.c
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2015-03-27 16:46:37 +0100
committerTejun Heo <tj@kernel.org>2015-03-27 11:59:22 -0400
commita1524f226a02aa6edebd90ae0752e97cfd78b159 (patch)
tree3b694223de3a939c51271f779966f1a11c74c74b /drivers/ata/libata-eh.c
parentfe7173c206de63fc28475ee6ae42ff95c05692de (diff)
downloadop-kernel-dev-a1524f226a02aa6edebd90ae0752e97cfd78b159.zip
op-kernel-dev-a1524f226a02aa6edebd90ae0752e97cfd78b159.tar.gz
libata-eh: Set 'information' field for autosense
If NCQ autosense or the sense data reporting feature is enabled the LBA of the offending command should be stored in the sense data 'information' field. Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'drivers/ata/libata-eh.c')
-rw-r--r--drivers/ata/libata-eh.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index 9fa81d9..77ef43e 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -1852,6 +1852,7 @@ void ata_eh_analyze_ncq_error(struct ata_link *link)
ata_dev_dbg(dev, "NCQ Autosense %02x/%02x/%02x\n",
sense_key, asc, ascq);
ata_scsi_set_sense(qc->scsicmd, sense_key, asc, ascq);
+ ata_scsi_set_sense_information(qc->scsicmd, &qc->result_tf);
qc->flags |= ATA_QCFLAG_SENSE_VALID;
}
@@ -1894,6 +1895,8 @@ static unsigned int ata_eh_analyze_tf(struct ata_queued_cmd *qc,
tmp = ata_eh_request_sense(qc, qc->scsicmd);
if (tmp)
qc->err_mask |= tmp;
+ else
+ ata_scsi_set_sense_information(qc->scsicmd, tf);
} else {
ata_dev_warn(qc->dev, "sense data available but port frozen\n");
}
OpenPOWER on IntegriCloud