📄 ds sw.htm
字号:
</p><p></p><hr><p>
</p><h3>
17.2.4 The ctlr_type, ctlr_name, and ctlr_num Members
</h3>
<p>
<a name="nx_id_745"></a>
<a name="nx_id_746"></a>
<a name="nx_id_747"></a>
The
<tt>ctlr_type</tt>
member specifies
the controller type.
The
<tt>ctlr_name</tt>
member specifies
the controller name.
The
<tt>ctlr_num</tt>
member specifies
the controller number.
</p><p>
The
<tt>ctlr_type</tt>
member is not currently used by the autoconfiguration software.
</p><p>
The controller name consists of a character string, for example,
<tt>fb</tt>
(for graphics frame buffer controller).
</p><p>
Driver writers are unlikely to use the
<tt>ctlr_name</tt>
member.
Driver writers often use the
<tt>ctlr_num</tt>
member as an index to identify which instance of the controller the
request is for.
The
<tt>/dev/none</tt>
device driver illustrates the use of the
<tt>ctlr_num</tt>
member.
<a name="busname1"></a>
</p><p></p><hr><p align="center">
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/Digital_UNIX_Bookshelf.html"><img src="DS%20sw_files/BOOKSHELF.GIF" alt="[Return to Library]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/TOC.html"><img src="DS%20sw_files/TOC.GIF" alt="[Contents]" border="0"></a>
<a href="#DeviceAutoconfig"><img src="DS%20sw_files/REW.GIF" alt="[Previous Chapter]" border="0"></a>
<a href="#ctlrtype"><img src="DS%20sw_files/PREV.GIF" alt="[Previous Section]" border="0"></a>
<a href="#rctlr"><img src="DS%20sw_files/NEXT.GIF" alt="[Next Section]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut25.html"><img src="DS%20sw_files/FF.GIF" alt="[Next Chapter]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/INDEX.html"><img src="DS%20sw_files/INDEX.GIF" alt="[Index]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/HELP.html"><img src="DS%20sw_files/HELP.GIF" alt="[Help]" border="0"></a>
</p><p></p><hr><p>
</p><h3>
17.2.5 The bus_name and bus_num Members
</h3>
<p>
<a name="nx_id_748"></a>
<a name="nx_id_749"></a>
The
<tt>bus_name</tt>
member specifies
the name of the bus to which this controller is connected.
The
<tt>bus_num</tt>
member specifies
the number of the bus to which the controller is connected.
</p><p>
The bus name consists of a character string, for example,
<tt>pci</tt>
(for PCI bus).
</p><p>
The bus number consists of one of the following:
</p><ul>
<p></p><li>
A number, such as 0 (zero), 1, 2, and so forth
<p>
Thus, pci1 specifies a bus with a bus number of 1.
</p><p></p></li><li>
A wildcard character (a question mark (?)) that represents the bus
number, for example:
<p>
<tt>pci?</tt>
</p><p></p></li><li>
An asterisk (*) to indicate that the bus connects to any bus, for
example:
<p>
<tt>pci *</tt>
</p></li></ul><p>
</p><p>
Device driver writers seldom need to reference these members in
their device drivers.
However, bus adapter driver writers might reference these members in
their bus adapter code.
<a name="rctlr"></a>
</p><p></p><hr><p align="center">
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/Digital_UNIX_Bookshelf.html"><img src="DS%20sw_files/BOOKSHELF.GIF" alt="[Return to Library]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/TOC.html"><img src="DS%20sw_files/TOC.GIF" alt="[Contents]" border="0"></a>
<a href="#DeviceAutoconfig"><img src="DS%20sw_files/REW.GIF" alt="[Previous Chapter]" border="0"></a>
<a href="#busname1"><img src="DS%20sw_files/PREV.GIF" alt="[Previous Section]" border="0"></a>
<a href="#slot1"><img src="DS%20sw_files/NEXT.GIF" alt="[Next Section]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut25.html"><img src="DS%20sw_files/FF.GIF" alt="[Next Chapter]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/INDEX.html"><img src="DS%20sw_files/INDEX.GIF" alt="[Index]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/HELP.html"><img src="DS%20sw_files/HELP.GIF" alt="[Help]" border="0"></a>
</p><p></p><hr><p>
</p><h3>
17.2.6 The rctlr Member
</h3>
<p>
<a name="nx_id_750"></a>
The
<tt>rctlr</tt>
member specifies
the remote controller number (for example, the SCSI ID).
<a name="slot1"></a>
</p><p></p><hr><p align="center">
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/Digital_UNIX_Bookshelf.html"><img src="DS%20sw_files/BOOKSHELF.GIF" alt="[Return to Library]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/TOC.html"><img src="DS%20sw_files/TOC.GIF" alt="[Contents]" border="0"></a>
<a href="#DeviceAutoconfig"><img src="DS%20sw_files/REW.GIF" alt="[Previous Chapter]" border="0"></a>
<a href="#rctlr"><img src="DS%20sw_files/PREV.GIF" alt="[Previous Section]" border="0"></a>
<a href="#alive1"><img src="DS%20sw_files/NEXT.GIF" alt="[Next Section]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut25.html"><img src="DS%20sw_files/FF.GIF" alt="[Next Chapter]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/INDEX.html"><img src="DS%20sw_files/INDEX.GIF" alt="[Index]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/HELP.html"><img src="DS%20sw_files/HELP.GIF" alt="[Help]" border="0"></a>
</p><p></p><hr><p>
</p><h3>
17.2.7 The slot Member
</h3>
<p>
<a name="nx_id_751"></a>
The
<tt>slot</tt>
member specifies
the bus slot or node number.
The kernel can set this member to the value
-1
if there are no slots.
<a name="alive1"></a>
</p><p></p><hr><p align="center">
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/Digital_UNIX_Bookshelf.html"><img src="DS%20sw_files/BOOKSHELF.GIF" alt="[Return to Library]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/TOC.html"><img src="DS%20sw_files/TOC.GIF" alt="[Contents]" border="0"></a>
<a href="#DeviceAutoconfig"><img src="DS%20sw_files/REW.GIF" alt="[Previous Chapter]" border="0"></a>
<a href="#slot1"><img src="DS%20sw_files/PREV.GIF" alt="[Previous Section]" border="0"></a>
<a href="#pname1"><img src="DS%20sw_files/NEXT.GIF" alt="[Next Section]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut25.html"><img src="DS%20sw_files/FF.GIF" alt="[Next Chapter]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/INDEX.html"><img src="DS%20sw_files/INDEX.GIF" alt="[Index]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/HELP.html"><img src="DS%20sw_files/HELP.GIF" alt="[Help]" border="0"></a>
</p><p></p><hr><p>
</p><h3>
17.2.8 The alive Member
</h3>
<p>
<a name="nx_id_752"></a>
The
<tt>alive</tt>
member specifies
a flag word to indicate the current status of the controller.
The autoconfiguration software sets the
<tt>alive</tt>
member to the
<tt>ALV_ALIVE</tt>
bit if the controller is present on the system.
The autoconfiguration software obtains this and the other alive bits in
the file
<tt>devdriver.h</tt>.
<a name="nx_id_753"></a>
The following list shows the valid alive bits that bus adapter drivers
can use:
</p><p>
<a name="nx_id_754"></a>
<a name="nx_id_755"></a>
<a name="nx_id_756"></a>
<a name="nx_id_757"></a>
<a name="nx_id_758"></a>
<a name="nx_id_759"></a>
<a name="nx_id_760"></a>
<a name="nx_id_761"></a>
<table border="4" cellpadding="4">
<tbody><tr>
<td align="left" valign="top">
<tt>ALV_FREE</tt>
</td>
<td align="left" valign="top">
The controller is not yet processed.
</td>
</tr>
<tr>
<td align="left" valign="top">
<tt>ALV_ALIVE</tt>
</td>
<td align="left" valign="top">
The controller is alive and configured.
</td>
</tr>
<tr>
<td align="left" valign="top">
<tt>ALV_PRES</tt>
</td>
<td align="left" valign="top">
The controller is present but not yet configured.
</td>
</tr>
<tr>
<td align="left" valign="top">
<tt>ALV_NOCNFG</tt>
</td>
<td align="left" valign="top">
The controller is not to be configured.
</td>
</tr>
<tr>
<td align="left" valign="top">
<tt>ALV_LOADABLE</tt>
</td>
<td align="left" valign="top">
The controller is present and resolved as dynamically configured.
</td>
</tr>
<tr>
<td align="left" valign="top">
<tt>ALV_NOSIZER</tt>
</td>
<td align="left" valign="top">
The
<tt>sizer</tt>
program should ignore these
<tt>controller</tt>
structures.
This bit is set for dynamically configured drivers.
It indicates that this
<tt>controller</tt>
structure is not part of the static configuration.
</td>
</tr>
<tr>
<td align="left" valign="top">
<tt>ALV_RONLY</tt>
</td>
<td align="left" valign="top">
The
device is read only.
This bit is set for statically configured drivers if the corresponding entry is
specified in the
<tt>sysconfigtab</tt>
file fragment.
This bit is not supported for dynamically configured drivers.
</td>
</tr>
<tr>
<td align="left" valign="top">
<tt>ALV_WONLY</tt>
</td>
<td align="left" valign="top">
The
device is write only.
This bit is set for statically configured drivers if the corresponding entry is
specified in the
<tt>sysconfigtab</tt>
file fragment.
This bit is not supported for dynamically configured drivers.
</td>
</tr>
</tbody></table></p><p>
<a name="pname1"></a>
</p><p></p><hr><p align="center">
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/Digital_UNIX_Bookshelf.html"><img src="DS%20sw_files/BOOKSHELF.GIF" alt="[Return to Library]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/TOC.html"><img src="DS%20sw_files/TOC.GIF" alt="[Contents]" border="0"></a>
<a href="#DeviceAutoconfig"><img src="DS%20sw_files/REW.GIF" alt="[Previous Chapter]" border="0"></a>
<a href="#alive1"><img src="DS%20sw_files/PREV.GIF" alt="[Previous Section]" border="0"></a>
<a href="#intr1"><img src="DS%20sw_files/NEXT.GIF" alt="[Next Section]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut25.html"><img src="DS%20sw_files/FF.GIF" alt="[Next Chapter]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/INDEX.html"><img src="DS%20sw_files/INDEX.GIF" alt="[Index]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/HELP.html"><img src="DS%20sw_files/HELP.GIF" alt="[Help]" border="0"></a>
</p><p></p><hr><p>
</p><h3>
17.2.9 The pname and port Members
</h3>
<p>
<a name="nx_id_762"></a>
<a name="nx_id_763"></a>
The
<tt>pname</tt>
member specifies
a pointer to the port name for this controller, if applicable.
The
<tt>port</tt>
member specifies
a pointer to the
<tt>port</tt>
structure for this controller, if applicable.
</p><p>
Device driver writers do not reference these members in their device
drivers.
However, bus adapter writers use the
<tt>port</tt>
structure to implement the initialization for a class of devices or
controllers that have common characteristics.
<a name="intr1"></a>
</p><p></p><hr><p align="center">
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/Digital_UNIX_Bookshelf.html"><img src="DS%20sw_files/BOOKSHELF.GIF" alt="[Return to Library]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/TOC.html"><img src="DS%20sw_files/TOC.GIF" alt="[Contents]" border="0"></a>
<a href="#DeviceAutoconfig"><img src="DS%20sw_files/REW.GIF" alt="[Previous Chapter]" border="0"></a>
<a href="#pname1"><img src="DS%20sw_files/PREV.GIF" alt="[Previous Section]" border="0"></a>
<a href="#addr"><img src="DS%20sw_files/NEXT.GIF" alt="[Next Section]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut25.html"><img src="DS%20sw_files/FF.GIF" alt="[Next Chapter]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/INDEX.html"><img src="DS%20sw_files/INDEX.GIF" alt="[Index]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/HELP.html"><img src="DS%20sw_files/HELP.GIF" alt="[Help]" border="0"></a>
</p><p></p><hr><p>
</p><h3>
17.2.10 The intr Member
</h3>
<p>
<a name="nx_id_764"></a>
The
<tt>intr</tt>
member specifies
an array that contains one or more entry points for the controller
interrupt handlers.
</p><p>
For device drivers,
the
<tt>intr</tt>
members of these data structures would be set up indirectly through calls
to the
<tt>handler_add</tt>
interface.
<a name="addr"></a>
</p><p></p><hr><p align="center">
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/Digital_UNIX_Bookshelf.html"><img src="DS%20sw_files/BOOKSHELF.GIF" alt="[Return to Library]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/TOC.html"><img src="DS%20sw_files/TOC.GIF" alt="[Contents]" border="0"></a>
<a href="#DeviceAutoconfig"><img src="DS%20sw_files/REW.GIF" alt="[Previous Chapter]" border="0"></a>
<a href="#intr1"><img src="DS%20sw_files/PREV.GIF" alt="[Previous Section]" border="0"></a>
<a href="#flags"><img src="DS%20sw_files/NEXT.GIF" alt="[Next Section]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut25.html"><img src="DS%20sw_files/FF.GIF" alt="[Next Chapter]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/INDEX.html"><img src="DS%20sw_files/INDEX.GIF" alt="[Index]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/HELP.html"><img src="DS%20sw_files/HELP.GIF" alt="[Help]" border="0"></a>
</p><p></p><hr><p>
</p><h3>
17.2.11 The addr and addr2 Members
</h3>
<p>
<a name="nx_id_765"></a>
The
<tt>addr</tt>
member specifies
the address of the device registers or memory.
This address is the first control status register (CSR) for the CPU.
</p><p>
The
<tt>addr2</tt>
member specifies
an optional second virtual address for this controller.
This member is set if there are two CSR spaces.
<a name="nx_id_766"></a>
<a name="flags"></a>
</p><p></p><hr><p align="center">
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/Digital_UNIX_Bookshelf.html"><img src="DS%20sw_files/BOOKSHELF.GIF" alt="[Return to Library]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/TOC.html"><img src="DS%20sw_files/TOC.GIF" alt="[Contents
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -