diff options
author | Hannes Reinecke <hare@suse.de> | 2015-03-27 16:46:37 +0100 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2015-03-27 16:59:22 +0100 |
commit | a1524f226a02aa6edebd90ae0752e97cfd78b159 (patch) | |
tree | 3b694223de3a939c51271f779966f1a11c74c74b /drivers/ata/libata-eh.c | |
parent | libata: Implement support for sense data reporting (diff) | |
download | linux-a1524f226a02aa6edebd90ae0752e97cfd78b159.tar.xz linux-a1524f226a02aa6edebd90ae0752e97cfd78b159.zip |
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.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index 9fa81d91f6ad..77ef43e320ea 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"); } |