diff options
author | Tejun Heo <htejun@gmail.com> | 2006-05-31 05:28:03 -0400 |
---|---|---|
committer | Tejun Heo <htejun@gmail.com> | 2006-05-31 05:28:03 -0400 |
commit | 084fe639b81c4d418a2cf714acb0475e3713cb73 (patch) | |
tree | 55afc26dbb866488b69e49b1742863d1293f6612 /include | |
parent | 0ea035a3d1ad948096e205f08f350c03d5cea453 (diff) |
[PATCH] libata-hp: implement hotplug
Implement ATA part of hotplug. To avoid probing broken devices over
and over again, disabled devices are not automatically detached. They
are detached only if probing is requested for the device or the
associated port is offline. Also, to avoid infinite probing loop,
Each device is probed only once per EH run.
As SATA PHY status is fragile, devices are detached only after it has
used up its recovery chances unless explicitly requested by LLDD or
user (LLDD may request direct detach if, for example, it supports cold
presence detection).
Signed-off-by: Tejun Heo <htejun@gmail.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/libata.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h index a1ceb5b67b97..56971943d261 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -824,6 +824,19 @@ extern void ata_do_eh(struct ata_port *ap, ata_prereset_fn_t prereset, | |||
824 | (ehi)->desc_len = 0; \ | 824 | (ehi)->desc_len = 0; \ |
825 | } while (0) | 825 | } while (0) |
826 | 826 | ||
827 | static inline void ata_ehi_hotplugged(struct ata_eh_info *ehi) | ||
828 | { | ||
829 | if (ehi->flags & ATA_EHI_HOTPLUGGED) | ||
830 | return; | ||
831 | |||
832 | ehi->flags |= ATA_EHI_HOTPLUGGED; | ||
833 | ehi->hotplug_timestamp = jiffies; | ||
834 | |||
835 | ehi->err_mask |= AC_ERR_ATA_BUS; | ||
836 | ehi->action |= ATA_EH_SOFTRESET; | ||
837 | ehi->probe_mask |= (1 << ATA_MAX_DEVICES) - 1; | ||
838 | } | ||
839 | |||
827 | /* | 840 | /* |
828 | * qc helpers | 841 | * qc helpers |
829 | */ | 842 | */ |