diff options
author | Tejun Heo <htejun@gmail.com> | 2006-05-31 05:27:46 -0400 |
---|---|---|
committer | Tejun Heo <htejun@gmail.com> | 2006-05-31 05:27:46 -0400 |
commit | d7bb4cc7575929a60b0a718daa1bce87bea9a9cc (patch) | |
tree | ff4cd9715f5ba608795bc4a1b7b86ffd2cf4f99c /include/linux/libata.h | |
parent | a9beec95352ff675f27d74c3cb97dc258d022497 (diff) |
[PATCH] libata-hp-prep: implement sata_phy_debounce()
With hotplug, PHY always needs to be debounced before a reset as any
reset might find new devices. Extract PHY waiting code from
sata_phy_resume() and extend it to include SStatus debouncing. Note
that sata_phy_debounce() is superset of what used to be done inside
sata_phy_resume().
Three default debounce timing parameters are defined to be used by
hot/boot plug. As resume failure during probing will be properly
handled as errors, timeout doesn't have to be long as before.
probeinit() uses the same timeout to retain the original behavior.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Diffstat (limited to 'include/linux/libata.h')
-rw-r--r-- | include/linux/libata.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h index c0513c752751..1c167f728fb4 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -607,11 +607,17 @@ struct ata_timing { | |||
607 | 607 | ||
608 | #define FIT(v,vmin,vmax) max_t(short,min_t(short,v,vmax),vmin) | 608 | #define FIT(v,vmin,vmax) max_t(short,min_t(short,v,vmax),vmin) |
609 | 609 | ||
610 | extern const unsigned long sata_deb_timing_boot[]; | ||
611 | extern const unsigned long sata_deb_timing_eh[]; | ||
612 | extern const unsigned long sata_deb_timing_before_fsrst[]; | ||
613 | |||
610 | extern void ata_port_probe(struct ata_port *); | 614 | extern void ata_port_probe(struct ata_port *); |
611 | extern void __sata_phy_reset(struct ata_port *ap); | 615 | extern void __sata_phy_reset(struct ata_port *ap); |
612 | extern void sata_phy_reset(struct ata_port *ap); | 616 | extern void sata_phy_reset(struct ata_port *ap); |
613 | extern void ata_bus_reset(struct ata_port *ap); | 617 | extern void ata_bus_reset(struct ata_port *ap); |
614 | extern int sata_set_spd(struct ata_port *ap); | 618 | extern int sata_set_spd(struct ata_port *ap); |
619 | extern int sata_phy_debounce(struct ata_port *ap, const unsigned long *param); | ||
620 | extern int sata_phy_resume(struct ata_port *ap, const unsigned long *param); | ||
615 | extern int ata_drive_probe_reset(struct ata_port *ap, | 621 | extern int ata_drive_probe_reset(struct ata_port *ap, |
616 | ata_probeinit_fn_t probeinit, | 622 | ata_probeinit_fn_t probeinit, |
617 | ata_reset_fn_t softreset, ata_reset_fn_t hardreset, | 623 | ata_reset_fn_t softreset, ata_reset_fn_t hardreset, |