Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Devices /
Chapter 4 - SCSI Manager 4.3 / SCSI Manager 4.3 Reference
SCSI Manager 4.3 Functions / Client Functions


SCSIExecIO

You use the SCSIExecIO 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.
-->scsiPBLengthUInt16The size of the parameter block. This value must be equal to or greater than the scsiIOpbSize for the SIM.
-->scsiFunctionCodeUInt8The SCSIExecIO function selector code (0x01).
<--scsiResultOSErrThe returned result code.
-->scsiDeviceDeviceIdentThe device identification record.
-->scsiCompletionCallbackProcA pointer to a completion routine.
If this field is set to nil, the function is executed synchronously.
-->scsiFlagsUInt32Flags indicating the transfer direction and any special handling required for the request. See page 4-22 for descriptions of these flags.
-->scsiDriverStorageUInt8 *Optional pointer to the device driver's private storage.
<--scsiResultFlagsUInt16Output flags that modify the scsiResult field. See page 4-24.
-->scsiDataPtrUInt8 *A pointer to a data buffer or scatter/gather list.
-->scsiDataLengthUInt32The amount of data to be transferred.
-->scsiSensePtrUInt8 *A pointer to the autosense buffer.
-->scsiSenseLengthUInt8The size of the autosense buffer.
-->scsiCDBLengthUInt8The size of the CDB.
-->scsiSGListCountUInt16The number of elements in the scatter/gather list.
<--scsiSCSIstatusUInt8Status returned by the SCSI device.
<--scsiSenseResidualSInt8The autosense residual length.
<--scsiDataResidualSInt32The data transfer residual length.
-->scsiCDBCDBThe CDB, or a pointer to the CDB, depending on the setting of the scsiCDBIsPointer flag.
-->scsiTimeoutSInt32The SCSI bus timeout period.
-->scsiIOFlagsUInt16Additional I/O flags. See page 4-25.
-->scsiSelectTimeoutUInt16Optional SELECT timeout value.
-->scsiDataTypeUInt8The data type pointed to by the scsiDataPtr field. See page 4-27.
-->scsiTransferTypeUInt8The transfer mode (polled or blind). See page 4-27.
-->scsiHandshake[8]UInt16Handshaking instructions.
-->scsiCommandLinkSCSI_IO *Optional pointer to a linked CDB.
    

DESCRIPTION
The SCSIExecIO 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 a REQUEST SENSE command if necessary.

RESULT CODES
noErr0No error
scsiRequestInProgress1Parameter block request is in progress
scsiCDBLengthInvalid-7863The CDB length supplied is not supported by this SIM; typically this means it was too big
scsiTransferTypeInvalid-7864The scsiTransferType requested is not supported by this SIM
scsiDataTypeInvalid-7865SIM does not support the requested scsiDataType
scsiIDInvalid-7866The initiator ID is invalid
scsiLUNInvalid-7867The logical unit number is invalid
scsiTIDInvalid-7868The target ID is invalid
scsiBusInvalid-7869The bus ID is invalid
scsiRequestInvalid-7870The parameter block request is invalid
scsiFunctionNotAvailable-7871The requested function is not supported by this SIM
scsiPBLengthError-7872The parameter block length supplied was too small for this SIM
scsiQLinkInvalid-7881The qLink field was not 0
scsiNoSuchXref-7882No driver has been cross-referenced with this device
scsiDeviceConflict-7883Attempt to register more than one driver to a device
scsiNoHBA-7884No HBA detected
scsiDeviceNotThere-7885SCSI device not installed or available
scsiProvideFail-7886Unable to provide the requested service
scsiBusy-7887SCSI subsystem is busy
scsiTooManyBuses-7888SIM registration failed because the XPT registry is full
scsiCDBReceived-7910The SCSI CDB was received
scsiNoNexus-7911Nexus is not established
scsiTerminated-7912Parameter block request terminated by the host
scsiBDRsent-7913A SCSI bus device reset (BDR) message was sent to the target
scsiWrongDirection-7915Data phase was in an unexpected direction
scsiSequenceFail-7916Target bus phase sequence failure
scsiUnexpectedBusFree-7917Unexpected bus free phase
scsiDataRunError-7918Data overrun/underrun error
scsiAutosenseFailed-7920Automatic REQUEST SENSE command failed
scsiParityError-7921An uncorrectable parity error occurred
scsiSCSIBusReset-7922Execution of this parameter block was halted because of a SCSI bus reset
scsiMessageRejectReceived-7923REJECT message received
scsiIdentifyMessageRejected-7924The target issued a REJECT message in response to the IDENTIFY message; the LUN probably does not exist
scsiCommandTimeout-7925The timeout value for this parameter block was exceeded and the parameter block was aborted
scsiSelectTimeout-7926Target selection timeout
scsiUnableToTerminate-7927Unable to terminate I/O parameter block request
scsiNonZeroStatus-7932The target returned non-zero status upon completion of the request
scsiUnableToAbort-7933Unable to abort parameter block request
scsiRequestAborted-7934Parameter block request aborted by the host

Previous Book Contents Book Index Next

© Apple Computer, Inc.
3 JUL 1996