1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>sata_link_scr_lpm</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="libataExt.html" title="Chapter 4. libata Library"><link rel="prev" href="API-sata-link-resume.html" title="sata_link_resume"><link rel="next" href="API-ata-std-prereset.html" title="ata_std_prereset"></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">sata_link_scr_lpm</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-sata-link-resume.html">Prev</a> </td><th width="60%" align="center">Chapter 4. libata Library</th><td width="20%" align="right"> <a accesskey="n" href="API-ata-std-prereset.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-sata-link-scr-lpm"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sata_link_scr_lpm — 2 manipulate SControl IPM and SPM fields 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">sata_link_scr_lpm </b>(</code></td><td>struct ata_link * <var class="pdparam">link</var>, </td></tr><tr><td> </td><td>enum ata_lpm_policy <var class="pdparam">policy</var>, </td></tr><tr><td> </td><td>bool <var class="pdparam">spm_wakeup</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idp1123636996"></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> 4 ATA link to manipulate SControl for 5 </p></dd><dt><span class="term"><em class="parameter"><code>policy</code></em></span></dt><dd><p> 6 LPM policy to configure 7 </p></dd><dt><span class="term"><em class="parameter"><code>spm_wakeup</code></em></span></dt><dd><p> 8 initiate LPM transition to active state 9 </p></dd></dl></div></div><div class="refsect1"><a name="idp1123640580"></a><h2>Description</h2><p> 10 Manipulate the IPM field of the SControl register of <em class="parameter"><code>link</code></em> 11 according to <em class="parameter"><code>policy</code></em>. If <em class="parameter"><code>policy</code></em> is ATA_LPM_MAX_POWER and 12 <em class="parameter"><code>spm_wakeup</code></em> is <code class="constant">true</code>, the SPM field is manipulated to wake up 13 the link. This function also clears PHYRDY_CHG before 14 returning. 15</p></div><div class="refsect1"><a name="idp1123642820"></a><h2>LOCKING</h2><p> 16 EH context. 17</p></div><div class="refsect1"><a name="idp1123643396"></a><h2>RETURNS</h2><p> 18 0 on succes, -errno otherwise. 19</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-sata-link-resume.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="libataExt.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="API-ata-std-prereset.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">sata_link_resume</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_std_prereset</span></td></tr></table></div></body></html> 20