[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>
This commit is contained in:
Tejun Heo
2006-07-03 16:07:26 +09:00
committed by Jeff Garzik
parent 2832430435
commit e9c839142d
3 changed files with 24 additions and 18 deletions

View File

@@ -629,9 +629,18 @@ struct ata_timing {
#define FIT(v,vmin,vmax) max_t(short,min_t(short,v,vmax),vmin)
extern const unsigned long sata_deb_timing_boot[];
extern const unsigned long sata_deb_timing_eh[];
extern const unsigned long sata_deb_timing_before_fsrst[];
extern const unsigned long sata_deb_timing_normal[];
extern const unsigned long sata_deb_timing_hotplug[];
extern const unsigned long sata_deb_timing_long[];
static inline const unsigned long *
sata_ehc_deb_timing(struct ata_eh_context *ehc)
{
if (ehc->i.flags & ATA_EHI_HOTPLUGGED)
return sata_deb_timing_hotplug;
else
return sata_deb_timing_normal;
}
extern void ata_port_probe(struct ata_port *);
extern void __sata_phy_reset(struct ata_port *ap);