1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>ata_exec_internal_sg</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 5. libata Core Internals"><link rel="prev" href="API-ata-dump-id.html" title="ata_dump_id"><link rel="next" href="API-ata-exec-internal.html" title="ata_exec_internal"></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_exec_internal_sg</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-ata-dump-id.html">Prev</a> </td><th width="60%" align="center">Chapter 5. libata Core Internals</th><td width="20%" align="right"> <a accesskey="n" href="API-ata-exec-internal.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-ata-exec-internal-sg"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ata_exec_internal_sg — 2 execute libata internal command 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">unsigned <b class="fsfunc">ata_exec_internal_sg </b>(</code></td><td>struct ata_device * <var class="pdparam">dev</var>, </td></tr><tr><td> </td><td>struct ata_taskfile * <var class="pdparam">tf</var>, </td></tr><tr><td> </td><td>const u8 * <var class="pdparam">cdb</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">dma_dir</var>, </td></tr><tr><td> </td><td>struct scatterlist * <var class="pdparam">sgl</var>, </td></tr><tr><td> </td><td>unsigned int <var class="pdparam">n_elem</var>, </td></tr><tr><td> </td><td>unsigned long <var class="pdparam">timeout</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idp1124067276"></a><h2>Arguments</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="parameter"><code>dev</code></em></span></dt><dd><p> 4 Device to which the command is sent 5 </p></dd><dt><span class="term"><em class="parameter"><code>tf</code></em></span></dt><dd><p> 6 Taskfile registers for the command and the result 7 </p></dd><dt><span class="term"><em class="parameter"><code>cdb</code></em></span></dt><dd><p> 8 CDB for packet command 9 </p></dd><dt><span class="term"><em class="parameter"><code>dma_dir</code></em></span></dt><dd><p> 10 Data transfer direction of the command 11 </p></dd><dt><span class="term"><em class="parameter"><code>sgl</code></em></span></dt><dd><p> 12 sg list for the data buffer of the command 13 </p></dd><dt><span class="term"><em class="parameter"><code>n_elem</code></em></span></dt><dd><p> 14 Number of sg entries 15 </p></dd><dt><span class="term"><em class="parameter"><code>timeout</code></em></span></dt><dd><p> 16 Timeout in msecs (0 for default) 17 </p></dd></dl></div></div><div class="refsect1"><a name="idp1124074892"></a><h2>Description</h2><p> 18 Executes libata internal command with timeout. <em class="parameter"><code>tf</code></em> contains 19 command on entry and result on return. Timeout and error 20 conditions are reported via return value. No recovery action 21 is taken after a command times out. It's caller's duty to 22 clean up after timeout. 23</p></div><div class="refsect1"><a name="idp1124076076"></a><h2>LOCKING</h2><p> 24 None. Should be called with kernel context, might sleep. 25</p></div><div class="refsect1"><a name="idp1124076724"></a><h2>RETURNS</h2><p> 26 Zero on success, AC_ERR_* mask on failure 27</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-dump-id.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="libataInt.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="API-ata-exec-internal.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">ata_dump_id</span> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> <span class="phrase">ata_exec_internal</span></td></tr></table></div></body></html> 28