diff options
author | Tejun Heo <htejun@gmail.com> | 2006-05-15 07:58:22 -0400 |
---|---|---|
committer | Tejun Heo <htejun@gmail.com> | 2006-05-15 07:58:22 -0400 |
commit | 022bdb075b9e1f224088a0b268de56268d7bc5b6 (patch) | |
tree | 05878e28202f0a86bdcc32ae5d995db9f15042da /include/linux/libata.h | |
parent | f3e81b19aac23c0e8c55d5961324ef7de44c23bb (diff) |
[PATCH] libata-eh: implement new EH
Implement new EH. The exported interface is ata_do_eh() which is to
be called from ->error_handler and performs the following steps to
recover the failed port.
ata_eh_autopsy() : analyze SError/TF, determine the cause of failure
and required recovery actions and record it in
ap->eh_context
ata_eh_report() : report the failure to user
ata_eh_recover() : perform recovery actions described in ap->eh_context
ata_eh_finish() : finish failed qcs
LLDDs can customize error handling by modifying eh_context before
calling ata_do_eh() or, if necessary, doing so inbetween each major
steps by calling each step explicitly.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Diffstat (limited to 'include/linux/libata.h')
-rw-r--r-- | include/linux/libata.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h index 298f9918e375..9fe46073cf8c 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -247,6 +247,8 @@ enum { | |||
247 | 247 | ||
248 | /* how hard are we gonna try to probe/recover devices */ | 248 | /* how hard are we gonna try to probe/recover devices */ |
249 | ATA_PROBE_MAX_TRIES = 3, | 249 | ATA_PROBE_MAX_TRIES = 3, |
250 | ATA_EH_RESET_TRIES = 3, | ||
251 | ATA_EH_DEV_TRIES = 3, | ||
250 | }; | 252 | }; |
251 | 253 | ||
252 | enum hsm_task_states { | 254 | enum hsm_task_states { |
@@ -727,6 +729,9 @@ extern void ata_eh_thaw_port(struct ata_port *ap); | |||
727 | extern void ata_eh_qc_complete(struct ata_queued_cmd *qc); | 729 | extern void ata_eh_qc_complete(struct ata_queued_cmd *qc); |
728 | extern void ata_eh_qc_retry(struct ata_queued_cmd *qc); | 730 | extern void ata_eh_qc_retry(struct ata_queued_cmd *qc); |
729 | 731 | ||
732 | extern void ata_do_eh(struct ata_port *ap, ata_reset_fn_t softreset, | ||
733 | ata_reset_fn_t hardreset, ata_postreset_fn_t postreset); | ||
734 | |||
730 | /* | 735 | /* |
731 | * printk helpers | 736 | * printk helpers |
732 | */ | 737 | */ |