1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>__shost_for_each_device</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_device.h" title="include/scsi/scsi_device.h"><link rel="prev" href="API-shost-for-each-device.html" title="shost_for_each_device"><link rel="next" href="API-scsi-device-type.html" title="scsi_device_type"></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">__shost_for_each_device</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-shost-for-each-device.html">Prev</a> </td><th width="60%" align="center">include/scsi/scsi_device.h</th><td width="20%" align="right"> <a accesskey="n" href="API-scsi-device-type.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API---shost-for-each-device"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>__shost_for_each_device — 2 iterate over all devices of a host (UNLOCKED) 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"> <b class="fsfunc">__shost_for_each_device </b>(</code></td><td> <var class="pdparam">sdev</var>, </td></tr><tr><td> </td><td> <var class="pdparam">shost</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idp1121200628"></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 the <span class="structname">struct scsi_device</span> to use as a cursor 5 </p></dd><dt><span class="term"><em class="parameter"><code>shost</code></em></span></dt><dd><p> 6 the <span class="structname">struct scsi_host</span> to iterate over 7 </p></dd></dl></div></div><div class="refsect1"><a name="idp1121203652"></a><h2>Description</h2><p> 8 Iterator that returns each device attached to <em class="parameter"><code>shost</code></em>. It does _not_ 9 take a reference on the scsi_device, so the whole loop must be 10 protected by shost->host_lock. 11</p></div><div class="refsect1"><a name="idp1121204868"></a><h2>Note</h2><p> 12 The only reason to use this is because you need to access the 13 device list in interrupt context. Otherwise you really want to use 14 shost_for_each_device instead. 15</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-shost-for-each-device.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="mid_layer.html#scsi_device.h">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="API-scsi-device-type.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">shost_for_each_device</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">scsi_device_type</span></td></tr></table></div></body></html> 16