⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 scsilib.html

📁 Vxworks API操作系统和驱动程序设计API。压缩的HTML文件
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<html><head><!-- /vobs/wpwr/docs/vxworks/ref/scsiLib.html - generated by refgen from scsiLib.c --> <title> scsiLib </title></head><body bgcolor="#FFFFFF"> <hr><a name="top"></a><p align=right><a href="libIndex.htm"><i>VxWorks API Reference :  OS Libraries</i></a></p></blockquote><h1>scsiLib</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>scsiLib</strong> - Small Computer System Interface (SCSI) library </p></blockquote><h4>ROUTINES</h4><blockquote><p><p><b><a href="./scsiLib.html#scsiPhysDevDelete">scsiPhysDevDelete</a>(&nbsp;)</b>  -  delete a SCSI physical-device structure<br><b><a href="./scsiLib.html#scsiPhysDevCreate">scsiPhysDevCreate</a>(&nbsp;)</b>  -  create a SCSI physical device structure<br><b><a href="./scsiLib.html#scsiPhysDevIdGet">scsiPhysDevIdGet</a>(&nbsp;)</b>  -  return a pointer to a <b>SCSI_PHYS_DEV</b> structure<br><b><a href="./scsiLib.html#scsiAutoConfig">scsiAutoConfig</a>(&nbsp;)</b>  -  configure all devices connected to a SCSI controller<br><b><a href="./scsiLib.html#scsiShow">scsiShow</a>(&nbsp;)</b>  -  list the physical devices attached to a SCSI controller<br><b><a href="./scsiLib.html#scsiBlkDevCreate">scsiBlkDevCreate</a>(&nbsp;)</b>  -  define a logical partition on a SCSI block device<br><b><a href="./scsiLib.html#scsiBlkDevInit">scsiBlkDevInit</a>(&nbsp;)</b>  -  initialize fields in a SCSI logical partition<br><b><a href="./scsiLib.html#scsiBlkDevShow">scsiBlkDevShow</a>(&nbsp;)</b>  -  show the <b>BLK_DEV</b> structures on a specified physical device<br><b><a href="./scsiLib.html#scsiBusReset">scsiBusReset</a>(&nbsp;)</b>  -  pulse the reset signal on the SCSI bus<br><b><a href="./scsiLib.html#scsiIoctl">scsiIoctl</a>(&nbsp;)</b>  -  perform a device-specific I/O control function<br><b><a href="./scsiLib.html#scsiFormatUnit">scsiFormatUnit</a>(&nbsp;)</b>  -  issue a <b>FORMAT_UNIT</b> command to a SCSI device<br><b><a href="./scsiLib.html#scsiModeSelect">scsiModeSelect</a>(&nbsp;)</b>  -  issue a <b>MODE_SELECT</b> command to a SCSI device<br><b><a href="./scsiLib.html#scsiModeSense">scsiModeSense</a>(&nbsp;)</b>  -  issue a <b>MODE_SENSE</b> command to a SCSI device<br><b><a href="./scsiLib.html#scsiReadCapacity">scsiReadCapacity</a>(&nbsp;)</b>  -  issue a <b>READ_CAPACITY</b> command to a SCSI device<br><b><a href="./scsiLib.html#scsiRdSecs">scsiRdSecs</a>(&nbsp;)</b>  -  read sector(s) from a SCSI block device<br><b><a href="./scsiLib.html#scsiWrtSecs">scsiWrtSecs</a>(&nbsp;)</b>  -  write sector(s) to a SCSI block device<br><b><a href="./scsiLib.html#scsiTestUnitRdy">scsiTestUnitRdy</a>(&nbsp;)</b>  -  issue a <b>TEST_UNIT_READY</b> command to a SCSI device<br><b><a href="./scsiLib.html#scsiInquiry">scsiInquiry</a>(&nbsp;)</b>  -  issue an INQUIRY command to a SCSI device<br><b><a href="./scsiLib.html#scsiReqSense">scsiReqSense</a>(&nbsp;)</b>  -  issue a <b>REQUEST_SENSE</b> command to a SCSI device and read results<br><p></blockquote><h4>DESCRIPTION</h4><blockquote><p>The purpose of this library is to switch SCSI function calls (the common SCSI-1 and SCSI-2 calls listed above) to either <b><a href="./scsi1Lib.html#top">scsi1Lib</a></b> or <b><a href="./scsi2Lib.html#top">scsi2Lib</a></b>, depending upon the SCSI configuration in the Board Support Package (BSP).The normal usage is to configure SCSI-2. However, SCSI-1 is configuredwhen device incompatibilities exist. VxWorks can be configured with either SCSI-1 or SCSI-2, but not both SCSI-1 and SCSI-2 simultaneously.<p>For more information about SCSI-1 functionality, refer to <b><a href="./scsi1Lib.html#top">scsi1Lib</a></b>. For more information about SCSI-2, refer to <b><a href="./scsi2Lib.html#top">scsi2Lib</a></b>.<p></blockquote><h4>INCLUDE FILES</h4><blockquote><p><b>scsiLib.h</b>, <b>scsi1Lib.h</b>, <b>scsi2Lib.h</b><p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./dosFsLib.html#top">dosFsLib</a></b>, <b><a href="./rt11FsLib.html#top">rt11FsLib</a></b>, <b><a href="./rawFsLib.html#top">rawFsLib</a></b>, <b><a href="./scsi1Lib.html#top">scsi1Lib</a></b>, <b><a href="./scsi2Lib.html#top">scsi2Lib</a></b>,<i>VxWorks Programmer's Guide: I/O System, Local File Systems </i><hr><a name="scsiPhysDevDelete"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>scsiPhysDevDelete(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>scsiPhysDevDelete(&nbsp;)</strong> - delete a SCSI physical-device structure</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS scsiPhysDevDelete    (    SCSI_PHYS_DEV * pScsiPhysDev /* ptr to SCSI physical device info */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine deletes a specified SCSI physical-device structure.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if <b>pScsiPhysDev</b> is NULL or <b>SCSI_BLK_DEVs</b> havebeen created on the device.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./scsiLib.html#top">scsiLib</a></b><hr><a name="scsiPhysDevCreate"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>scsiPhysDevCreate(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>scsiPhysDevCreate(&nbsp;)</strong> - create a SCSI physical device structure</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>SCSI_PHYS_DEV * scsiPhysDevCreate    (    SCSI_CTRL * pScsiCtrl,      /* ptr to SCSI controller info */    int         devBusId,       /* device's SCSI bus ID */    int         devLUN,         /* device's logical unit number */    int         reqSenseLength, /* length of REQUEST SENSE data dev returns */    int         devType,        /* type of SCSI device */    BOOL        removable,      /* whether medium is removable */    int         numBlocks,      /* number of blocks on device */    int         blockSize       /* size of a block in bytes */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine enables access to a SCSI device and must be the first routineinvoked. It must be called once for each physical device on the SCSI bus.<p>If <i>reqSenseLength</i> is NULL (0), one or more <b>REQUEST_SENSE</b>commands are issued to the device to determine the number of bytes ofsense data it typically returns.  Note that if the device returns variableamounts of sense data depending on its state, you must consult the devicemanual to determine the maximum amount of sense data that can bereturned.<p>If <i>devType</i> is NONE (-1), an INQUIRY command is issued todetermine the device type; as an added benefit, it acquires the device'smake and model number.  The <b><a href="./scsiLib.html#scsiShow">scsiShow</a>(&nbsp;)</b> routine displays this information.Common values of <i>devType</i> can be found in <b>scsiLib.h</b> or in the SCSIspecification.<p>If <i>numBlocks</i> or <i>blockSize</i> are specified as NULL (0), a <b>READ_CAPACITY</b>command is issued to determine those values.  This occursonly for device types that support <b>READ_CAPACITY</b>.<p></blockquote><h4>RETURNS</h4><blockquote><p>A pointer to the created <b>SCSI_PHYS_DEV</b> structure, or NULL if theroutine is unable to create the physical-device structure.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./scsiLib.html#top">scsiLib</a></b><hr><a name="scsiPhysDevIdGet"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>scsiPhysDevIdGet(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>scsiPhysDevIdGet(&nbsp;)</strong> - return a pointer to a <b>SCSI_PHYS_DEV</b> structure</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>SCSI_PHYS_DEV * scsiPhysDevIdGet    (    SCSI_CTRL * pScsiCtrl,    /* ptr to SCSI controller info */    int         devBusId,     /* device's SCSI bus ID */    int         devLUN        /* device's logical unit number */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine returns a pointer to the <b>SCSI_PHYS_DEV</b> structure of the SCSIphysical device located at a specified bus ID (<i>devBusId</i>) and logicalunit number (<i>devLUN</i>) and attached to a specified SCSI controller(<i>pScsiCtrl</i>).<p></blockquote><h4>RETURNS</h4><blockquote><p>A pointer to the specified <b>SCSI_PHYS_DEV</b> structure, or NULL if thestructure does not exist.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./scsiLib.html#top">scsiLib</a></b><hr><a name="scsiAutoConfig"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>scsiAutoConfig(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>scsiAutoConfig(&nbsp;)</strong> - configure all devices connected to a SCSI controller</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS scsiAutoConfig    (    SCSI_CTRL * pScsiCtrl     /* ptr to SCSI controller info */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine cycles through all valid SCSI bus IDs and logical unitnumbers (LUNs), attempting a <b><a href="./scsiLib.html#scsiPhysDevCreate">scsiPhysDevCreate</a>(&nbsp;)</b> with default parameterson each.  All devices which support the INQUIRY command areconfigured.  The <b><a href="./scsiLib.html#scsiShow">scsiShow</a>(&nbsp;)</b> routine can be used to find the system tableof SCSI physical devices attached to a specified SCSI controller.  Inaddition, <b><a href="./scsiLib.html#scsiPhysDevIdGet">scsiPhysDevIdGet</a>(&nbsp;)</b> can be used programmatically to get apointer to the <b>SCSI_PHYS_DEV</b> structure associated with the device at aspecified SCSI bus ID and LUN.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if <i>pScsiCtrl</i> and the global variable <b>pSysScsiCtrl</b>are both NULL.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./scsiLib.html#top">scsiLib</a></b><hr><a name="scsiShow"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>scsiShow(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>scsiShow(&nbsp;)</strong> - list the physical devices attached to a SCSI controller</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS scsiShow    (    SCSI_CTRL * pScsiCtrl     /* ptr to SCSI controller info */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine displays the SCSI bus ID, logical unit number (LUN), vendor ID,product ID, firmware revision (rev.), device type, number of blocks,block size in bytes, and a pointer to the associated <b>SCSI_PHYS_DEV</b>structure for each physical SCSI device known to be attached to a specifiedSCSI controller.<p></blockquote><h4>NOTE</h4><blockquote><p><p>If <i>pScsiCtrl</i> is NULL, the value of the global variable <b>pSysScsiCtrl</b>is used, unless it is also NULL.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if both <i>pScsiCtrl</i> and <b>pSysScsiCtrl</b> are NULL.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./scsiLib.html#top">scsiLib</a></b><hr><a name="scsiBlkDevCreate"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>scsiBlkDevCreate(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>scsiBlkDevCreate(&nbsp;)</strong> - define a logical partition on a SCSI block device</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>BLK_DEV * scsiBlkDevCreate    (    SCSI_PHYS_DEV * pScsiPhysDev, /* ptr to SCSI physical device info */    int             numBlocks,    /* number of blocks in block device */    int             blockOffset   /* address of first block in volume */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine creates and initializes a <b>BLK_DEV</b> structure, whichdescribes a logical partition on a SCSI physical-block device.  A logicalpartition is an array of contiguously addressed blocks; it can be completelydescribed by the number of blocks and the address of the first block inthe partition.  In normal configurations partitions do not overlap, althoughsuch a condition is not an error.<p></blockquote><h4>NOTE</h4><blockquote><p><p>If <i>numBlocks</i> is 0, the rest of device is used.<p></blockquote><h4>RETURNS</h4><blockquote><p>A pointer to the created <b>BLK_DEV</b>, or NULL if parameters exceedphysical device boundaries, if the physical device is not a block device, orif memory is insufficient for the structures.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./scsiLib.html#top">scsiLib</a></b><hr><a name="scsiBlkDevInit"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>scsiBlkDevInit(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>scsiBlkDevInit(&nbsp;)</strong> - initialize fields in a SCSI logical partition</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void scsiBlkDevInit    (    SCSI_BLK_DEV * pScsiBlkDev,  /* ptr to SCSI block dev. struct */    int            blksPerTrack, /* blocks per track */    int            nHeads        /* number of heads */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine specifies the disk-geometry parameters required by certainfile systems (for example, dosFs).  It is called after a <b>SCSI_BLK_DEV</b>structure is created with <b><a href="./scsiLib.html#scsiBlkDevCreate">scsiBlkDevCreate</a>(&nbsp;)</b>, but before calling a file systeminitialization routine.  It is generally required only for removable-mediadevices.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./scsiLib.html#top">scsiLib</a></b><hr><a name="scsiBlkDevShow"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>scsiBlkDevShow(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>scsiBlkDevShow(&nbsp;)</strong> - show the <b>BLK_DEV</b> structures on a specified physical device</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void scsiBlkDevShow    (    SCSI_PHYS_DEV * pScsiPhysDev /* ptr to SCSI physical device info */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine displays all of the <b>BLK_DEV</b> structures created on a specifiedphysical device.  This routine is called by <b><a href="./scsiLib.html#scsiShow">scsiShow</a>(&nbsp;)</b> but may also be

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -