📄 scsimgrlib.html
字号:
<html><head><!-- /vobs/wpwr/docs/vxworks/ref/scsiMgrLib.html - generated by refgen from scsiMgrLib.c --> <title> scsiMgrLib </title></head><body bgcolor="#FFFFFF"> <hr><a name="top"></a><p align=right><a href="libIndex.html"><i>VxWorks Reference Manual : Libraries</i></a></p></blockquote><h1>scsiMgrLib</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>scsiMgrLib</strong> - SCSI manager library (SCSI-2) </p></blockquote><h4>ROUTINES</h4><blockquote><p><p><b><i><a href="./scsiMgrLib.html#scsiMgrEventNotify">scsiMgrEventNotify</a></i>( )</b> - notify the SCSI manager of a SCSI (controller) event<br><b><i><a href="./scsiMgrLib.html#scsiMgrBusReset">scsiMgrBusReset</a></i>( )</b> - handle a controller-bus reset event <br><b><i><a href="./scsiMgrLib.html#scsiMgrCtrlEvent">scsiMgrCtrlEvent</a></i>( )</b> - send an event to the SCSI controller state machine<br><b><i><a href="./scsiMgrLib.html#scsiMgrThreadEvent">scsiMgrThreadEvent</a></i>( )</b> - send an event to the thread state machine<br><b><i><a href="./scsiMgrLib.html#scsiMgrShow">scsiMgrShow</a></i>( )</b> - show status information for the SCSI manager<br><p></blockquote><h4>DESCRIPTION</h4><blockquote><p>This SCSI-2 library implements the SCSI manager. The purpose of the SCSImanager is to manage SCSI threads between requesting VxWorks tasks and theSCSI controller. The SCSI manager handles SCSI events and SCSI threadsbut allocation and de-allocation of SCSI threads is not the manager'sresponsiblity. SCSI thread management includes despatching threads andscheduling multiple threads (which are performed by the SCSI manager, plusallocation and de-allocation of threads (which are performed by routines in<b><a href="./scsi2Lib.html#top">scsi2Lib</a></b>).<p>The SCSI manager is spawned as a VxWorks task upon initializationof the SCSI interface within VxWorks. The entry point of the SCSI manager taskis <b><i>scsiMgr</i>( )</b>. The SCSI manager task is usually spawned during initialization of the SCSI controller driver. The driver's <b><i>xxxCtrlCreateScsi2</i>( )</b> routine is typically responsible for such SCSI interfaceinitializations.<p>Once the SCSI manager has been initialized, it is ready to handle SCSIrequests from VxWorks tasks. The SCSI manager has the following resposibilities:<p><ul><li>It processes requests from client tasks. </li><li>It activates a SCSI transaction thread by appending it to the targetdevice's wait queue and allocating a specified time periodto execute a transaction.</li><li>It handles timeout events which cause threads to be aborted.</li><li>It receives event notifications from the SCSI driver interrupt serviceroutine (ISR) and processes the event.</li><li>It responds to events generated by the controller hardware, such asdisconnection and information transfer requests.</li><li>It replies to clients when their requests have completed oraborted. </ul><p><p>One SCSI manager task must be spawned per SCSI controller. Thus, if a particular hardware platform contains more than one SCSI controller thenthat number of SCSI manager tasks must be spawned by the controller-driverintialization routine.<p></blockquote><h4>INCLUDE FILES</h4><blockquote><p><b>scsiLib.h</b>, <b>scsi2Lib.h</b><p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./scsiMgrLib.html#top">scsiMgrLib</a></b>, <b><a href="./scsiLib.html#top">scsiLib</a></b>, <b><a href="./scsi2Lib.html#top">scsi2Lib</a></b>, <b><a href="./scsiCommonLib.html#top">scsiCommonLib</a></b>, <b><a href="./scsiDirectLib.html#top">scsiDirectLib</a></b>, <b><a href="./scsiSeqLib.html#top">scsiSeqLib</a></b>, <b><a href="./scsiCtrlLib.html#top">scsiCtrlLib</a></b>, < >American National Standard for Information Systems - Small Computer"< >System Interface (SCSI-2), ANSI X3T9, "<i>VxWorks Programmer's Guide: I/O System, Local File Systems</i><hr><a name="scsiMgrEventNotify"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>scsiMgrEventNotify</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>scsiMgrEventNotify</i>( )</strong> - notify the SCSI manager of a SCSI (controller) event</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS scsiMgrEventNotify ( SCSI_CTRL * pScsiCtrl, /* pointer to SCSI controller structure */ SCSI_EVENT * pEvent, /* pointer to the SCSI event */ int eventSize /* size of the event information */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine posts an event message on the appropriate SCSI manager queue,then notifies the SCSI manager that there is a message to be accepted.<p></blockquote><h4>NOTE</h4><blockquote><p><p>This routine should not be called by application programs.<p>No access serialization is required, because event messages are onlyposted by the SCSI controller ISR. See the reference entry for <b><i>scsiBusResetNotify</i>( )</b>.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if the SCSI manager's event queue is full.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./scsiMgrLib.html#top">scsiMgrLib</a></b>, <b><i>scsiBusResetNotify</i>( )</b><hr><a name="scsiMgrBusReset"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>scsiMgrBusReset</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>scsiMgrBusReset</i>( )</strong> - handle a controller-bus reset event </p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void scsiMgrBusReset ( SCSI_CTRL * pScsiCtrl /* SCSI ctrlr on which bus reset */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine resets in turn: each attached physical device, each target,and the controller-finite-state machine. In practice, this routine implements the SCSI hard reset option.<p></blockquote><h4>NOTE</h4><blockquote><p><p>This routine does not physically reset the SCSI bus; see <b><i><a href="./scsiLib.html#scsiBusReset">scsiBusReset</a></i>( )</b>.This routine should not be called by application programs.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./scsiMgrLib.html#top">scsiMgrLib</a></b><hr><a name="scsiMgrCtrlEvent"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>scsiMgrCtrlEvent</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>scsiMgrCtrlEvent</i>( )</strong> - send an event to the SCSI controller state machine</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void scsiMgrCtrlEvent ( SCSI_CTRL * pScsiCtrl, SCSI_EVENT_TYPE eventType )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine is called by the thread driver whenever selection,reselection, or disconnection occurs or when a thread is activated.It manages a simple finite-state machine for the SCSI controller.<p></blockquote><h4>NOTE</h4><blockquote><p><p>This function should not be called by application programs.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./scsiMgrLib.html#top">scsiMgrLib</a></b><hr><a name="scsiMgrThreadEvent"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>scsiMgrThreadEvent</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>scsiMgrThreadEvent</i>( )</strong> - send an event to the thread state machine</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void scsiMgrThreadEvent ( SCSI_THREAD * pThread, SCSI_THREAD_EVENT_TYPE eventType )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine forwards an event to the thread's physical device. If the event is completion or deferral, it frees up the tag which was allocated when the thread was activated and either completes or defers the thread.<p></blockquote><h4>NOTE</h4><blockquote><p><p>This function should not be called by application programs.<p>The thread passed into this function does not have to be an active clientthread (it may be an identification thread).<p>If the thread has no corresponding physical device, this routine doesnothing. (This occassionally occurs if an unexpected disconnectionor bus reset happens when an identification thread has not yet identifiedwhich physical device it corresponds to.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./scsiMgrLib.html#top">scsiMgrLib</a></b><hr><a name="scsiMgrShow"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>scsiMgrShow</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>scsiMgrShow</i>( )</strong> - show status information for the SCSI manager</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void scsiMgrShow ( SCSI_CTRL * pScsiCtrl, /* SCSI controller to use */ BOOL showPhysDevs, /* TRUE => show phys dev details */ BOOL showThreads, /* TRUE => show thread details */ BOOL showFreeThreads /* TRUE => show free thread IDs */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine shows the current state of the SCSI manager for the specifiedcontroller, including the total number of threads created and the number ofthreads currently free.<p>Optionally, this routine also shows details for all created physical devices on this controller and all threads for which SCSI requests are outstanding.It also shows the IDs of all free threads.<p></blockquote><h4>NOTE</h4><blockquote><p>The information displayed is volatile; this routine is best used whenthere is no activity on the SCSI bus. Threads allocated by a client butfor which there are no outstanding SCSI requests are not shown.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./scsiMgrLib.html#top">scsiMgrLib</a></b></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -