Important: The information in this document is obsolete and should not be used for new development.
SCSIExecIO
You use theSCSIExecIO
function to perform SCSI I/O operations.
OSErr SCSIAction(SCSIExecIOPB *scsiPB);
scsiPB
- A pointer to a SCSI I/O parameter block, which is described on page 4-23.
--> scsiPBLength UInt16 The size of the parameter block. This value must be equal to or greater than the scsiIOpbSize
for the SIM.--> scsiFunctionCode UInt8 The SCSIExecIO
function selector code (0x01).<-- scsiResult OSErr The returned result code. --> scsiDevice DeviceIdent The device identification record. --> scsiCompletion CallbackProc A pointer to a completion routine.
If this field is set tonil
, the function is executed synchronously.--> scsiFlags UInt32 Flags indicating the transfer direction and any special handling required for the request. See page 4-22 for descriptions of these flags. --> scsiDriverStorage UInt8 * Optional pointer to the device driver's private storage. <-- scsiResultFlags UInt16 Output flags that modify the
scsiResult
field. See page 4-24.--> scsiDataPtr UInt8 * A pointer to a data buffer or scatter/gather list. --> scsiDataLength UInt32 The amount of data to be transferred. --> scsiSensePtr UInt8 * A pointer to the autosense buffer. --> scsiSenseLength UInt8 The size of the autosense buffer. --> scsiCDBLength UInt8 The size of the CDB. --> scsiSGListCount UInt16 The number of elements in the scatter/gather list. <-- scsiSCSIstatus UInt8 Status returned by the SCSI device. <-- scsiSenseResidual SInt8 The autosense residual length. <-- scsiDataResidual SInt32 The data transfer residual length. --> scsiCDB CDB The CDB, or a pointer to the CDB, depending on the setting of the scsiCDBIsPointer
flag.--> scsiTimeout SInt32 The SCSI bus timeout period. --> scsiIOFlags UInt16 Additional I/O flags. See page 4-25. --> scsiSelectTimeout UInt16 Optional SELECT
timeout value.--> scsiDataType UInt8 The data type pointed to by the scsiDataPtr
field. See page 4-27.--> scsiTransferType UInt8 The transfer mode (polled or blind). See page 4-27. --> scsiHandshake[8] UInt16 Handshaking instructions. --> scsiCommandLink SCSI_IO * Optional pointer to a linked CDB. DESCRIPTION
TheSCSIExecIO
function sends a request to a SIM to carry out a SCSI transaction. The SIM performs all the actions necessary to fulfill the request, including arbitrating for the bus, selecting the device, sending the CDB, receiving or sending data, performing disconnect operations, and so on. The parameter block contains all the information required for the SIM to complete the SCSI request, including issuing aREQUEST SENSE
command if necessary.RESULT CODES