1. NAME▲
sata_link_debounce - debounce SATA phy status
2. SYNOPSIS ▲
int sata_link_debounce(struct ata_link * link , const unsigned long * params , unsigned long deadline );
3. ARGUMENTS ▲
link
ATA link to debounce SATA phy status for
params
timing parameters { interval, duratinon, timeout } in msec
deadline
deadline jiffies for the operation
4. DESCRIPTION ▲
Make sure SStatus of link reaches stable state, determined by holding the same value where DET is not 1 for duration polled every interval, before timeout. Timeout constraints the beginning of the stable state. Because DET gets stuck at 1 on some controllers after hot unplugging, this functions waits until timeout then returns 0 if DET is stable at 1.
timeout is further limited by deadline. The sooner of the two is used.
5. LOCKING ▲
Kernel thread context (may sleep)
6. RETURNS ▲
0 on success, -errno on failure.
7. AUTHOR ▲
Jeff Garzik
Author.
8. COPYRIGHT ▲