1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>proc_scsi_write</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_proc.c" title="drivers/scsi/scsi_proc.c"><link rel="prev" href="API-scsi-remove-single-device.html" title="scsi_remove_single_device"><link rel="next" href="API-proc-scsi-open.html" title="proc_scsi_open"></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">proc_scsi_write</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-scsi-remove-single-device.html">Prev</a>&#160;</td><th width="60%" align="center">drivers/scsi/scsi_proc.c</th><td width="20%" align="right">&#160;<a accesskey="n" href="API-proc-scsi-open.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-proc-scsi-write"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>proc_scsi_write &#8212; 
2     handle writes to /proc/scsi/scsi
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">ssize_t <b class="fsfunc">proc_scsi_write </b>(</code></td><td>struct file * <var class="pdparam">file</var>, </td></tr><tr><td>&#160;</td><td>const char __user * <var class="pdparam">buf</var>, </td></tr><tr><td>&#160;</td><td>size_t <var class="pdparam">length</var>, </td></tr><tr><td>&#160;</td><td>loff_t * <var class="pdparam">ppos</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">&#160;</div></div></div><div class="refsect1"><a name="idp1124060596"></a><h2>Arguments</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="parameter"><code>file</code></em></span></dt><dd><p>
4     not used
5    </p></dd><dt><span class="term"><em class="parameter"><code>buf</code></em></span></dt><dd><p>
6     buffer to write
7    </p></dd><dt><span class="term"><em class="parameter"><code>length</code></em></span></dt><dd><p>
8     length of buf, at most PAGE_SIZE
9    </p></dd><dt><span class="term"><em class="parameter"><code>ppos</code></em></span></dt><dd><p>
10     not used
11    </p></dd></dl></div></div><div class="refsect1"><a name="idp1124065028"></a><h2>Description</h2><p>
12   this provides a legacy mechanism to add or remove devices by
13   Host, Channel, ID, and Lun.  To use,
14   <span class="quote">&#8220;<span class="quote">echo 'scsi add-single-device 0 1 2 3' &gt; /proc/scsi/scsi</span>&#8221;</span> or
15   <span class="quote">&#8220;<span class="quote">echo 'scsi remove-single-device 0 1 2 3' &gt; /proc/scsi/scsi</span>&#8221;</span> with
16   <span class="quote">&#8220;<span class="quote">0 1 2 3</span>&#8221;</span> replaced by the Host, Channel, Id, and Lun.
17</p></div><div class="refsect1"><a name="idp1124066540"></a><h2>Note</h2><p>
18   this seems to be aimed at parallel SCSI. Most modern busses (USB,
19   SATA, Firewire, Fibre Channel, etc) dynamically assign these values to
20   provide a unique identifier and nothing more.
21</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-remove-single-device.html">Prev</a>&#160;</td><td width="20%" align="center"><a accesskey="u" href="mid_layer.html#scsi_proc.c">Up</a></td><td width="40%" align="right">&#160;<a accesskey="n" href="API-proc-scsi-open.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">scsi_remove_single_device</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">proc_scsi_open</span></td></tr></table></div></body></html>
22