sata_link_debounce(9)

sata_link_debounce9

Debounce sata phy status

Usage

int sata_link_debounce(struct ata_link * link, const unsigned long * params, unsigned long deadline);

Arguments

link

ATA link to debounce SATA phy status for

params

timing parameters { interval, duration, timeout } in msec

deadline

deadline jiffies for the operation

Overview

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.

LOCKING: Kernel thread context (may sleep)

Return

0 on success, -errno on failure.

Releases

6 releases since Debian 4.0 (Etch); the text changed 5 times.

  1. 4.0
  2. 5.0
  3. 6.0
  4. 7
  5. 8
  6. 9

Author

Jeff Garzik

Author.

From linux-manual-4.9 4.9.228-1 in Debian 9 (Stretch). Parsed by carta from the page's man source.