'\" t .\" Title: sata_link_debounce .\" Author: .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: July 2017 .\" Manual: libata Library .\" Source: Kernel Hackers Manual 4.12.2 .\" Language: English .\" .TH "SATA_LINK_DEBOUNCE" "9" "July 2017" "Kernel Hackers Manual 4\&.12\&" "libata Library" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" sata_link_debounce \- debounce SATA phy status .SH "SYNOPSIS" .HP \w'int\ sata_link_debounce('u .BI "int sata_link_debounce(struct\ ata_link\ *\ " "link" ", const\ unsigned\ long\ *\ " "params" ", unsigned\ long\ " "deadline" ");" .SH "ARGUMENTS" .PP \fIstruct ata_link * link\fR .RS 4 ATA link to debounce SATA phy status for .RE .PP \fIconst unsigned long * params\fR .RS 4 timing parameters { interval, duration, timeout } in msec .RE .PP \fIunsigned long deadline\fR .RS 4 deadline jiffies for the operation .RE .SH "DESCRIPTION" .PP Make sure SStatus of \fIlink\fR reaches stable state, determined by holding the same value where DET is not 1 for \fIduration\fR polled every \fIinterval\fR, before \fItimeout\fR\&. 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\&. .PP \fItimeout\fR is further limited by \fIdeadline\fR\&. The sooner of the two is used\&. .PP LOCKING: Kernel thread context (may sleep) .SH "RETURN" .PP 0 on success, \-errno on failure\&. .SH "AUTHOR" .PP \fBJeff Garzik\fR .RS 4 Author. .RE .SH "COPYRIGHT" .br