diff options
author | Tejun Heo <htejun@gmail.com> | 2006-05-16 05:58:24 +0200 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-05-20 06:39:08 +0200 |
commit | a20f33ffde8ba5fb27666aa1e228a45b7e3b8dcb (patch) | |
tree | 850a2717f3861470a0020272f98416e17d36e5bf /drivers/scsi/libata-eh.c | |
parent | [PATCH] libata: use qc->result_tf for temp taskfile storage (diff) | |
download | linux-a20f33ffde8ba5fb27666aa1e228a45b7e3b8dcb.tar.xz linux-a20f33ffde8ba5fb27666aa1e228a45b7e3b8dcb.zip |
[PATCH] libata: enforce default EH actions
LLDDs rely on libata that certain EH actions are automatically taken
on some errors. If the port is frozen or one or more qc's have failed
with HSM violation or timeout, softreset is enforced (LLDD can ask for
storonger EH action at will). If any other error condition exists,
libata EH always revalidates.
This behavior existed in earlier revisions of new EH but lost during
development process. This patch restores it.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/scsi/libata-eh.c')
-rw-r--r-- | drivers/scsi/libata-eh.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/scsi/libata-eh.c b/drivers/scsi/libata-eh.c index 7244caff13a0..750e734d1c09 100644 --- a/drivers/scsi/libata-eh.c +++ b/drivers/scsi/libata-eh.c @@ -1169,9 +1169,6 @@ static void ata_eh_autopsy(struct ata_port *ap) /* inherit upper level err_mask */ qc->err_mask |= ehc->i.err_mask; - if (qc->err_mask & AC_ERR_TIMEOUT) - action |= ATA_EH_SOFTRESET; - /* analyze TF */ action |= ata_eh_analyze_tf(qc, &qc->result_tf); @@ -1201,9 +1198,14 @@ static void ata_eh_autopsy(struct ata_port *ap) if (failed_dev) action |= ata_eh_speed_down(failed_dev, is_io, all_err_mask); - if (all_err_mask) + /* enforce default EH actions */ + if (ap->flags & ATA_FLAG_FROZEN || + all_err_mask & (AC_ERR_HSM | AC_ERR_TIMEOUT)) + action |= ATA_EH_SOFTRESET; + else if (all_err_mask) action |= ATA_EH_REVALIDATE; + /* record autopsy result */ ehc->i.dev = failed_dev; ehc->i.action = action; |