diff options
author | Tejun Heo <htejun@gmail.com> | 2006-07-03 03:07:26 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-07-05 22:16:27 -0400 |
commit | e9c839142d698086d3fe33a0daafde55ddd00c4e (patch) | |
tree | f7b586dec514854b536866c9d9cbe2bd39e25c23 /include/linux/libata.h | |
parent | 28324304350e23db24d679c55de3f06a5b1e40aa (diff) |
[PATCH] libata: clean up debounce parameters and improve parameter selection
The names of predefined debounce timing parameters didn't exactly
match their usages. Rename to more generic names and implement param
selection helper sata_ehc_deb_timing() which uses EHI_HOTPLUGGED to
select params.
Combined with the previous EHI_RESUME_LINK differentiation, this makes
parameter selection accurate. e.g. user scan resumes link but normal
deb param is used instead of hotplug param.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'include/linux/libata.h')
-rw-r--r-- | include/linux/libata.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h index 4d4ed2c8fec7..2f7bbfc0c41b 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -629,9 +629,18 @@ struct ata_timing { | |||
629 | 629 | ||
630 | #define FIT(v,vmin,vmax) max_t(short,min_t(short,v,vmax),vmin) | 630 | #define FIT(v,vmin,vmax) max_t(short,min_t(short,v,vmax),vmin) |
631 | 631 | ||
632 | extern const unsigned long sata_deb_timing_boot[]; | 632 | extern const unsigned long sata_deb_timing_normal[]; |
633 | extern const unsigned long sata_deb_timing_eh[]; | 633 | extern const unsigned long sata_deb_timing_hotplug[]; |
634 | extern const unsigned long sata_deb_timing_before_fsrst[]; | 634 | extern const unsigned long sata_deb_timing_long[]; |
635 | |||
636 | static inline const unsigned long * | ||
637 | sata_ehc_deb_timing(struct ata_eh_context *ehc) | ||
638 | { | ||
639 | if (ehc->i.flags & ATA_EHI_HOTPLUGGED) | ||
640 | return sata_deb_timing_hotplug; | ||
641 | else | ||
642 | return sata_deb_timing_normal; | ||
643 | } | ||
635 | 644 | ||
636 | extern void ata_port_probe(struct ata_port *); | 645 | extern void ata_port_probe(struct ata_port *); |
637 | extern void __sata_phy_reset(struct ata_port *ap); | 646 | extern void __sata_phy_reset(struct ata_port *ap); |