1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>scsi_mode_select</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="SCSI Interfaces Guide"><link rel="up" href="mid_layer.html#scsi_lib.c" title="drivers/scsi/scsi_lib.c"><link rel="prev" href="API-scsi-execute.html" title="scsi_execute"><link rel="next" href="API-scsi-mode-sense.html" title="scsi_mode_sense"></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">scsi_mode_select</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-scsi-execute.html">Prev</a>&#160;</td><th width="60%" align="center">drivers/scsi/scsi_lib.c</th><td width="20%" align="right">&#160;<a accesskey="n" href="API-scsi-mode-sense.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-scsi-mode-select"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>scsi_mode_select &#8212; 
2     issue a mode select
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">scsi_mode_select </b>(</code></td><td>struct scsi_device * <var class="pdparam">sdev</var>, </td></tr><tr><td>&#160;</td><td>int <var class="pdparam">pf</var>, </td></tr><tr><td>&#160;</td><td>int <var class="pdparam">sp</var>, </td></tr><tr><td>&#160;</td><td>int <var class="pdparam">modepage</var>, </td></tr><tr><td>&#160;</td><td>unsigned char * <var class="pdparam">buffer</var>, </td></tr><tr><td>&#160;</td><td>int <var class="pdparam">len</var>, </td></tr><tr><td>&#160;</td><td>int <var class="pdparam">timeout</var>, </td></tr><tr><td>&#160;</td><td>int <var class="pdparam">retries</var>, </td></tr><tr><td>&#160;</td><td>struct scsi_mode_data * <var class="pdparam">data</var>, </td></tr><tr><td>&#160;</td><td>struct scsi_sense_hdr * <var class="pdparam">sshdr</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">&#160;</div></div></div><div class="refsect1"><a name="idp1123861148"></a><h2>Arguments</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="parameter"><code>sdev</code></em></span></dt><dd><p>
4     SCSI device to be queried
5    </p></dd><dt><span class="term"><em class="parameter"><code>pf</code></em></span></dt><dd><p>
6     Page format bit (1 == standard, 0 == vendor specific)
7    </p></dd><dt><span class="term"><em class="parameter"><code>sp</code></em></span></dt><dd><p>
8     Save page bit (0 == don't save, 1 == save)
9    </p></dd><dt><span class="term"><em class="parameter"><code>modepage</code></em></span></dt><dd><p>
10     mode page being requested
11    </p></dd><dt><span class="term"><em class="parameter"><code>buffer</code></em></span></dt><dd><p>
12     request buffer (may not be smaller than eight bytes)
13    </p></dd><dt><span class="term"><em class="parameter"><code>len</code></em></span></dt><dd><p>
14     length of request buffer.
15    </p></dd><dt><span class="term"><em class="parameter"><code>timeout</code></em></span></dt><dd><p>
16     command timeout
17    </p></dd><dt><span class="term"><em class="parameter"><code>retries</code></em></span></dt><dd><p>
18     number of retries before failing
19    </p></dd><dt><span class="term"><em class="parameter"><code>data</code></em></span></dt><dd><p>
20     returns a structure abstracting the mode header data
21    </p></dd><dt><span class="term"><em class="parameter"><code>sshdr</code></em></span></dt><dd><p>
22     place to put sense data (or NULL if no sense to be collected).
23     must be SCSI_SENSE_BUFFERSIZE big.
24    </p></dd></dl></div></div><div class="refsect1"><a name="idp1123871836"></a><h2>Description</h2><p>
25   Returns zero if successful; negative error number or scsi
26   status on error
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-scsi-execute.html">Prev</a>&#160;</td><td width="20%" align="center"><a accesskey="u" href="mid_layer.html#scsi_lib.c">Up</a></td><td width="40%" align="right">&#160;<a accesskey="n" href="API-scsi-mode-sense.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">scsi_execute</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">scsi_mode_sense</span></td></tr></table></div></body></html>
28