aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/libata.h
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2006-05-31 05:27:46 -0400
committerTejun Heo <htejun@gmail.com>2006-05-31 05:27:46 -0400
commitd7bb4cc7575929a60b0a718daa1bce87bea9a9cc (patch)
treeff4cd9715f5ba608795bc4a1b7b86ffd2cf4f99c /include/linux/libata.h
parenta9beec95352ff675f27d74c3cb97dc258d022497 (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.h6
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
610extern const unsigned long sata_deb_timing_boot[];
611extern const unsigned long sata_deb_timing_eh[];
612extern const unsigned long sata_deb_timing_before_fsrst[];
613
610extern void ata_port_probe(struct ata_port *); 614extern void ata_port_probe(struct ata_port *);
611extern void __sata_phy_reset(struct ata_port *ap); 615extern void __sata_phy_reset(struct ata_port *ap);
612extern void sata_phy_reset(struct ata_port *ap); 616extern void sata_phy_reset(struct ata_port *ap);
613extern void ata_bus_reset(struct ata_port *ap); 617extern void ata_bus_reset(struct ata_port *ap);
614extern int sata_set_spd(struct ata_port *ap); 618extern int sata_set_spd(struct ata_port *ap);
619extern int sata_phy_debounce(struct ata_port *ap, const unsigned long *param);
620extern int sata_phy_resume(struct ata_port *ap, const unsigned long *param);
615extern int ata_drive_probe_reset(struct ata_port *ap, 621extern 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,