diff options
author | Tejun Heo <htejun@gmail.com> | 2006-11-20 20:40:51 -0500 |
---|---|---|
committer | Tejun Heo <htejun@gmail.com> | 2006-12-03 03:56:23 -0500 |
commit | a569a30d301e4dbc0ad67a211292edece2da1146 (patch) | |
tree | 3c1fcb81485de3c5489c32251e9b671897517f6c | |
parent | 6a36261e63770ab61422550b774fe949ccca5fa9 (diff) |
[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: Tejun Heo <htejun@gmail.com>
-rw-r--r-- | drivers/ata/libata-eh.c | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index 5aa7f0907e83..2aad7b79d6dd 100644 --- a/drivers/ata/libata-eh.c +++ b/drivers/ata/libata-eh.c | |||
@@ -1136,19 +1136,21 @@ static unsigned int ata_eh_analyze_tf(struct ata_queued_cmd *qc, | |||
1136 | break; | 1136 | break; |
1137 | 1137 | ||
1138 | case ATA_DEV_ATAPI: | 1138 | case ATA_DEV_ATAPI: |
1139 | tmp = atapi_eh_request_sense(qc->dev, | 1139 | if (!(qc->ap->pflags & ATA_PFLAG_FROZEN)) { |
1140 | qc->scsicmd->sense_buffer); | 1140 | tmp = atapi_eh_request_sense(qc->dev, |
1141 | if (!tmp) { | 1141 | qc->scsicmd->sense_buffer); |
1142 | /* ATA_QCFLAG_SENSE_VALID is used to tell | 1142 | if (!tmp) { |
1143 | * atapi_qc_complete() that sense data is | 1143 | /* ATA_QCFLAG_SENSE_VALID is used to |
1144 | * already valid. | 1144 | * tell atapi_qc_complete() that sense |
1145 | * | 1145 | * data is already valid. |
1146 | * TODO: interpret sense data and set | 1146 | * |
1147 | * appropriate err_mask. | 1147 | * TODO: interpret sense data and set |
1148 | */ | 1148 | * appropriate err_mask. |
1149 | qc->flags |= ATA_QCFLAG_SENSE_VALID; | 1149 | */ |
1150 | } else | 1150 | qc->flags |= ATA_QCFLAG_SENSE_VALID; |
1151 | qc->err_mask |= tmp; | 1151 | } else |
1152 | qc->err_mask |= tmp; | ||
1153 | } | ||
1152 | } | 1154 | } |
1153 | 1155 | ||
1154 | if (qc->err_mask & (AC_ERR_HSM | AC_ERR_TIMEOUT | AC_ERR_ATA_BUS)) | 1156 | if (qc->err_mask & (AC_ERR_HSM | AC_ERR_TIMEOUT | AC_ERR_ATA_BUS)) |