1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>ata_wait_ready</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="libATA Developer's Guide"><link rel="up" href="libataInt.html" title="Chapter&#160;5.&#160;libata Core Internals"><link rel="prev" href="API-ata-down-xfermask-limit.html" title="ata_down_xfermask_limit"><link rel="next" href="API-ata-dev-same-device.html" title="ata_dev_same_device"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"><span class="phrase">ata_wait_ready</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-ata-down-xfermask-limit.html">Prev</a>&#160;</td><th width="60%" align="center">Chapter&#160;5.&#160;libata Core Internals</th><td width="20%" align="right">&#160;<a accesskey="n" href="API-ata-dev-same-device.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-ata-wait-ready"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ata_wait_ready &#8212; 
2     wait for link to become ready
3 </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">ata_wait_ready </b>(</code></td><td>struct ata_link * <var class="pdparam">link</var>, </td></tr><tr><td>&#160;</td><td>unsigned long <var class="pdparam">deadline</var>, </td></tr><tr><td>&#160;</td><td>int (*<var class="pdparam">check_ready</var>)
4     <code>(</code>struct ata_link *link<code>)</code><code>)</code>;</td></tr></table><div class="funcprototype-spacer">&#160;</div></div></div><div class="refsect1"><a name="idp1124171476"></a><h2>Arguments</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="parameter"><code>link</code></em></span></dt><dd><p>
5     link to be waited on
6    </p></dd><dt><span class="term"><em class="parameter"><code>deadline</code></em></span></dt><dd><p>
7     deadline jiffies for the operation
8    </p></dd><dt><span class="term"><em class="parameter"><code>check_ready</code></em></span></dt><dd><p>
9     callback to check link readiness
10    </p></dd></dl></div></div><div class="refsect1"><a name="idp1124175052"></a><h2>Description</h2><p>
11   Wait for <em class="parameter"><code>link</code></em> to become ready.  <em class="parameter"><code>check_ready</code></em> should return
12   positive number if <em class="parameter"><code>link</code></em> is ready, 0 if it isn't, -ENODEV if
13   link doesn't seem to be occupied, other errno for other error
14   conditions.
15   </p><p>
16
17   Transient -ENODEV conditions are allowed for
18   ATA_TMOUT_FF_WAIT.
19</p></div><div class="refsect1"><a name="idp1124176948"></a><h2>LOCKING</h2><p>
20   EH context.
21</p></div><div class="refsect1"><a name="idp1124177524"></a><h2>RETURNS</h2><p>
22   0 if <em class="parameter"><code>linke</code></em> is ready before <em class="parameter"><code>deadline</code></em>; otherwise, -errno.
23</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-ata-down-xfermask-limit.html">Prev</a>&#160;</td><td width="20%" align="center"><a accesskey="u" href="libataInt.html">Up</a></td><td width="40%" align="right">&#160;<a accesskey="n" href="API-ata-dev-same-device.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">ata_down_xfermask_limit</span>&#160;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&#160;<span class="phrase">ata_dev_same_device</span></td></tr></table></div></body></html>
24