Commit a569a30d authored by Tejun Heo's avatar Tejun Heo

[PATCH] libata: don't request sense if the port is frozen

If EH command is issued to a frozen port, it fails with AC_ERR_SYSTEM.
libata used to request sense even when the port is frozen needlessly
adding AC_ERR_SYSTEM to err_mask.  Don't do it.
Signed-off-by: default avatarTejun Heo <htejun@gmail.com>
parent 6a36261e
...@@ -1136,12 +1136,13 @@ static unsigned int ata_eh_analyze_tf(struct ata_queued_cmd *qc, ...@@ -1136,12 +1136,13 @@ static unsigned int ata_eh_analyze_tf(struct ata_queued_cmd *qc,
break; break;
case ATA_DEV_ATAPI: case ATA_DEV_ATAPI:
if (!(qc->ap->pflags & ATA_PFLAG_FROZEN)) {
tmp = atapi_eh_request_sense(qc->dev, tmp = atapi_eh_request_sense(qc->dev,
qc->scsicmd->sense_buffer); qc->scsicmd->sense_buffer);
if (!tmp) { if (!tmp) {
/* ATA_QCFLAG_SENSE_VALID is used to tell /* ATA_QCFLAG_SENSE_VALID is used to
* atapi_qc_complete() that sense data is * tell atapi_qc_complete() that sense
* already valid. * data is already valid.
* *
* TODO: interpret sense data and set * TODO: interpret sense data and set
* appropriate err_mask. * appropriate err_mask.
...@@ -1150,6 +1151,7 @@ static unsigned int ata_eh_analyze_tf(struct ata_queued_cmd *qc, ...@@ -1150,6 +1151,7 @@ static unsigned int ata_eh_analyze_tf(struct ata_queued_cmd *qc,
} else } else
qc->err_mask |= tmp; qc->err_mask |= tmp;
} }
}
if (qc->err_mask & (AC_ERR_HSM | AC_ERR_TIMEOUT | AC_ERR_ATA_BUS)) if (qc->err_mask & (AC_ERR_HSM | AC_ERR_TIMEOUT | AC_ERR_ATA_BUS))
action |= ATA_EH_SOFTRESET; action |= ATA_EH_SOFTRESET;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment