* [PATCH] libata: don't request sense if the port is frozen
@ 2006-11-21 1:40 Tejun Heo
2006-11-28 9:05 ` Jeff Garzik
0 siblings, 1 reply; 2+ messages in thread
From: Tejun Heo @ 2006-11-21 1:40 UTC (permalink / raw)
To: Jeff Garzik, linux-ide
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>
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -1136,19 +1136,21 @@ static unsigned int ata_eh_analyze_tf(st
break;
case ATA_DEV_ATAPI:
- tmp = atapi_eh_request_sense(qc->dev,
- qc->scsicmd->sense_buffer);
- if (!tmp) {
- /* ATA_QCFLAG_SENSE_VALID is used to tell
- * atapi_qc_complete() that sense data is
- * already valid.
- *
- * TODO: interpret sense data and set
- * appropriate err_mask.
- */
- qc->flags |= ATA_QCFLAG_SENSE_VALID;
- } else
- qc->err_mask |= tmp;
+ if (!(qc->ap->pflags & ATA_PFLAG_FROZEN)) {
+ tmp = atapi_eh_request_sense(qc->dev,
+ qc->scsicmd->sense_buffer);
+ if (!tmp) {
+ /* ATA_QCFLAG_SENSE_VALID is used to
+ * tell atapi_qc_complete() that sense
+ * data is already valid.
+ *
+ * TODO: interpret sense data and set
+ * appropriate err_mask.
+ */
+ qc->flags |= ATA_QCFLAG_SENSE_VALID;
+ } else
+ qc->err_mask |= tmp;
+ }
}
if (qc->err_mask & (AC_ERR_HSM | AC_ERR_TIMEOUT | AC_ERR_ATA_BUS))
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] libata: don't request sense if the port is frozen
2006-11-21 1:40 [PATCH] libata: don't request sense if the port is frozen Tejun Heo
@ 2006-11-28 9:05 ` Jeff Garzik
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2006-11-28 9:05 UTC (permalink / raw)
To: Tejun Heo; +Cc: linux-ide
Tejun Heo wrote:
> 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>
ACK
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-11-28 9:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-21 1:40 [PATCH] libata: don't request sense if the port is frozen Tejun Heo
2006-11-28 9:05 ` Jeff Garzik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).