1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>fc_remote_port_add</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="Transport_classes.html#Fibre_Channel_transport" title="Fibre Channel transport"><link rel="prev" href="API-fc-remove-host.html" title="fc_remove_host"><link rel="next" href="API-fc-remote-port-delete.html" title="fc_remote_port_delete"></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">fc_remote_port_add</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-fc-remove-host.html">Prev</a> </td><th width="60%" align="center">Fibre Channel transport</th><td width="20%" align="right"> <a accesskey="n" href="API-fc-remote-port-delete.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-fc-remote-port-add"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>fc_remote_port_add — 2 notify fc transport of the existence of a remote FC port. 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">struct fc_rport * <b class="fsfunc">fc_remote_port_add </b>(</code></td><td>struct Scsi_Host * <var class="pdparam">shost</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">channel</var>, </td></tr><tr><td> </td><td>struct fc_rport_identifiers * <var class="pdparam">ids</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idp1124392988"></a><h2>Arguments</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="parameter"><code>shost</code></em></span></dt><dd><p> 4 scsi host the remote port is connected to. 5 </p></dd><dt><span class="term"><em class="parameter"><code>channel</code></em></span></dt><dd><p> 6 Channel on shost port connected to. 7 </p></dd><dt><span class="term"><em class="parameter"><code>ids</code></em></span></dt><dd><p> 8 The world wide names, fc address, and FC4 port 9 roles for the remote port. 10 </p></dd></dl></div></div><div class="refsect1"><a name="idp1124396732"></a><h2>Description</h2><p> 11 The LLDD calls this routine to notify the transport of the existence 12 of a remote port. The LLDD provides the unique identifiers (wwpn,wwn) 13 of the port, it's FC address (port_id), and the FC4 roles that are 14 active for the port. 15 </p><p> 16 17 For ports that are FCP targets (aka scsi targets), the FC transport 18 maintains consistent target id bindings on behalf of the LLDD. 19 A consistent target id binding is an assignment of a target id to 20 a remote port identifier, which persists while the scsi host is 21 attached. The remote port can disappear, then later reappear, and 22 it's target id assignment remains the same. This allows for shifts 23 in FC addressing (if binding by wwpn or wwnn) with no apparent 24 changes to the scsi subsystem which is based on scsi host number and 25 target id values. Bindings are only valid during the attachment of 26 the scsi host. If the host detaches, then later re-attaches, target 27 id bindings may change. 28 </p><p> 29 30 This routine is responsible for returning a remote port structure. 31 The routine will search the list of remote ports it maintains 32 internally on behalf of consistent target id mappings. If found, the 33 remote port structure will be reused. Otherwise, a new remote port 34 structure will be allocated. 35 </p><p> 36 37 Whenever a remote port is allocated, a new fc_remote_port class 38 device is created. 39 </p><p> 40 41 Should not be called from interrupt context. 42</p></div><div class="refsect1"><a name="idp1124399300"></a><h2>Notes</h2><p> 43 This routine assumes no locks are held on entry. 44</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-fc-remove-host.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="Transport_classes.html#Fibre_Channel_transport">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="API-fc-remote-port-delete.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">fc_remove_host</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">fc_remote_port_delete</span></td></tr></table></div></body></html> 45