---
name: "sata_link_debounce"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/sata_link_debounce"
---

# sata\_link\_debounce(9)

debounce SATA phy status

## NAME

sata\_link\_debounce - debounce SATA phy status

## SYNOPSIS

**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

## 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.

LOCKING: Kernel thread context (may sleep)

## RETURN

0 on success, -errno on failure.

## AUTHOR

**Jeff Garzik**

Author.

## COPYRIGHT
