diff options
author | Tejun Heo <htejun@gmail.com> | 2007-08-18 00:28:49 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-10-12 14:55:37 -0400 |
commit | a1e10f7e68a544c80081fee4fa550dc28389f44a (patch) | |
tree | cf6673989f360e0b12b2a658a7042d30420c14eb /include/linux/libata.h | |
parent | cbcdd87593a1d85c5c4b259945a3a09eee12814d (diff) |
libata: move EH repeat reporting into ata_eh_report()
EH is sometimes repeated without any error or action. For example,
this happens when probing IDENTIFY fails because of a phantom device.
In these cases, all the repeated EH does is making sure there is no
unhandled error or pending action and return. This repeation is
necessary to avoid losing any event which occurred while EH was in
progress.
Unfortunately, this dry run causes annonying "EH pending after
completion" message. This patch moves the repeat reporting into
ata_eh_report() such that it's more compact and skipped on dry runs.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Mikael Pettersson <mikep@it.uu.se>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'include/linux/libata.h')
-rw-r--r-- | include/linux/libata.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h index d3defae689ca..74e034ea9016 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -293,8 +293,8 @@ enum { | |||
293 | ATA_EHI_DID_RESET = ATA_EHI_DID_SOFTRESET | ATA_EHI_DID_HARDRESET, | 293 | ATA_EHI_DID_RESET = ATA_EHI_DID_SOFTRESET | ATA_EHI_DID_HARDRESET, |
294 | ATA_EHI_RESET_MODIFIER_MASK = ATA_EHI_RESUME_LINK, | 294 | ATA_EHI_RESET_MODIFIER_MASK = ATA_EHI_RESUME_LINK, |
295 | 295 | ||
296 | /* max repeat if error condition is still set after ->error_handler */ | 296 | /* max tries if error condition is still set after ->error_handler */ |
297 | ATA_EH_MAX_REPEAT = 5, | 297 | ATA_EH_MAX_TRIES = 5, |
298 | 298 | ||
299 | /* how hard are we gonna try to probe/recover devices */ | 299 | /* how hard are we gonna try to probe/recover devices */ |
300 | ATA_PROBE_MAX_TRIES = 3, | 300 | ATA_PROBE_MAX_TRIES = 3, |
@@ -581,6 +581,7 @@ struct ata_port { | |||
581 | u32 msg_enable; | 581 | u32 msg_enable; |
582 | struct list_head eh_done_q; | 582 | struct list_head eh_done_q; |
583 | wait_queue_head_t eh_wait_q; | 583 | wait_queue_head_t eh_wait_q; |
584 | int eh_tries; | ||
584 | 585 | ||
585 | pm_message_t pm_mesg; | 586 | pm_message_t pm_mesg; |
586 | int *pm_result; | 587 | int *pm_result; |