Sophie

Sophie

distrib > CentOS > 6 > i386 > by-pkgid > 2c51d8eb79f8810ada971ee8c30ce1e5 > files > 1868

kernel-doc-2.6.32-71.14.1.el6.noarch.rpm

<?xml version="1.0" encoding="ANSI_X3.4-1968" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968" /><title>pci_create_slot</title><meta name="generator" content="DocBook XSL Stylesheets V1.75.2" /><link rel="home" href="index.html" title="The Linux Kernel API" /><link rel="up" href="ch09s05.html" title="PCI Support Library" /><link rel="prev" href="re407.html" title="pci_rescan_bus" /><link rel="next" href="re409.html" title="pci_renumber_slot" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"><span>pci_create_slot</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="re407.html">Prev</a>&#160;</td><th width="60%" align="center">PCI Support Library</th><td width="20%" align="right">&#160;<a accesskey="n" href="re409.html">Next</a></td></tr></table><hr /></div><div class="refentry" title="pci_create_slot"><a id="API-pci-create-slot"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>pci_create_slot &#8212; 
  create or increment refcount for physical PCI slot
 </p></div><div class="refsynopsisdiv" title="Synopsis"><h2>Synopsis</h2><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">struct pci_slot * <b class="fsfunc">pci_create_slot </b>(</code></td><td>struct pci_bus * <var class="pdparam">parent</var>, </td></tr><tr><td>&#160;</td><td>int <var class="pdparam">slot_nr</var>, </td></tr><tr><td>&#160;</td><td>const char * <var class="pdparam">name</var>, </td></tr><tr><td>&#160;</td><td>struct hotplug_slot * <var class="pdparam">hotplug</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">&#160;</div></div></div><div class="refsect1" title="Arguments"><a id="id2680906"></a><h2>Arguments</h2><div class="variablelist"><dl><dt><span class="term"><em class="parameter"><code>parent</code></em></span></dt><dd><p>
     struct pci_bus of parent bridge
    </p></dd><dt><span class="term"><em class="parameter"><code>slot_nr</code></em></span></dt><dd><p>
     PCI_SLOT(pci_dev-&gt;devfn) or -1 for placeholder
    </p></dd><dt><span class="term"><em class="parameter"><code>name</code></em></span></dt><dd><p>
     user visible string presented in /sys/bus/pci/slots/&lt;name&gt;
    </p></dd><dt><span class="term"><em class="parameter"><code>hotplug</code></em></span></dt><dd><p>
     set if caller is hotplug driver, NULL otherwise
    </p></dd></dl></div></div><div class="refsect1" title="Description"><a id="id2680988"></a><h2>Description</h2><p>
   PCI slots have first class attributes such as address, speed, width,
   and a <span class="structname">struct pci_slot</span> is used to manage them. This interface will
   either return a new <span class="structname">struct pci_slot</span> to the caller, or if the pci_slot
   already exists, its refcount will be incremented.
   </p><p>

   Slots are uniquely identified by a <em class="parameter"><code>pci_bus</code></em>, <em class="parameter"><code>slot_nr</code></em> tuple.
   </p><p>

   There are known platforms with broken firmware that assign the same
   name to multiple slots. Workaround these broken platforms by renaming
   the slots on behalf of the caller. If firmware assigns name N to
</p></div><div class="refsect1" title="multiple slots"><a id="id2681030"></a><h2>multiple slots</h2><p>
   </p><p>

   The first slot is assigned N
   The second slot is assigned N-1
   The third slot is assigned N-2
   etc.
</p></div><div class="refsect1" title="Placeholder slots"><a id="id2681044"></a><h2>Placeholder slots</h2><p>
   In most cases, <em class="parameter"><code>pci_bus</code></em>, <em class="parameter"><code>slot_nr</code></em> will be sufficient to uniquely identify
   a slot. There is one notable exception - pSeries (rpaphp), where the
   <em class="parameter"><code>slot_nr</code></em> cannot be determined until a device is actually inserted into
   the slot. In this scenario, the caller may pass -1 for <em class="parameter"><code>slot_nr</code></em>.
   </p><p>

   The following semantics are imposed when the caller passes <em class="parameter"><code>slot_nr</code></em> ==
   -1. First, we no longer check for an existing <code class="constant">struct</code> pci_slot, as there
   may be many slots with <em class="parameter"><code>slot_nr</code></em> of -1.  The other change in semantics is
   user-visible, which is the 'address' parameter presented in sysfs will
</p></div><div class="refsect1" title="consist solely of a dddd"><a id="id2681105"></a><h2>consist solely of a dddd</h2><p>
   bb tuple, where dddd is the PCI domain of the
   <code class="constant">struct</code> pci_bus and bb is the bus number. In other words, the devfn of
   the 'placeholder' slot will not be displayed.
</p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="re407.html">Prev</a>&#160;</td><td width="20%" align="center"><a accesskey="u" href="ch09s05.html">Up</a></td><td width="40%" align="right">&#160;<a accesskey="n" href="re409.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span>pci_rescan_bus</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>pci_renumber_slot</span></td></tr></table></div></body></html>