sata_phy_debounce — debounce SATA phy status
int sata_phy_debounce
(struct ata_port * ap, const unsigned long * params, unsigned long deadline);
ATA port to debounce SATA phy status for
timing parameters { interval, duratinon, timeout } in msec
deadline jiffies for the operation
Make sure SStatus of ap 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.
Kernel thread context (may sleep)
0 on success, -errno on failure.