Important: The information in this document is obsolete and should not be used for new development.
SCSI Manager Parameter Block Header
You use the SCSI Manager parameter block to pass information to theSCSIActionfunction. Because many of the functions that you access throughSCSIActionrequire additional information, the parameter block consists of a common header (SCSIPBHdr) followed by function-specific fields, if any. This section describes the parameter block header common to allSCSIActionfunctions. The function-specific extensions are described in the following sections.The SCSI Manager parameter block header is defined by the
SCSI_PBdata type.
#define SCSIPBHdr \ struct SCSIHdr *qLink; \ SInt16 scsiReserved1; \ UInt16 scsiPBLength; \ UInt8 scsiFunctionCode; \ UInt8 scsiReserved2; \ OSErr scsiResult; \ DeviceIdent scsiDevice; \ CallbackProc scsiCompletion;\ UInt32 scsiFlags; \ UInt8 *scsiDriverStorage;\ Ptr scsiXPTprivate; \ SInt32 scsiReserved3; struct SCSI_PB { SCSIPBHdr }; typedef struct SCSI_PB SCSI_PB;
Field Description
qLink- A pointer to the next entry in the request queue. This field is used internally by the SCSI Manager and must be set to 0 when the parameter block is initialized. The SCSI Manager functions always set this field to 0 before returning, so you do not need to set it to 0 again before reusing a parameter block.
scsiPBLength- The size of the parameter block, in bytes, including the parameter block header.
scsiFunctionCode- A function selector code that specifies the service being requested. Table 4-2 on page 4-39 lists these codes.
scsiResult- The result code returned by the XPT or SIM when the function completes. The value
scsiRequestInProgressindicates that the request is still in progress or queued.scsiDevice- A 4-byte value that uniquely identifies the target device for a request. The
DeviceIdentdata type designates the bus number, target SCSI ID, and logical unit number (LUN).scsiCompletion- A pointer to a completion routine.
scsiFlags- Flags indicating the transfer direction and any special handling required for this request.
scsiDirectionMaskA bit field that specifies transfer direction, using these constants:
scsiDirectionInData inscsiDirectionOutData outscsiDirectionNoneNo data phase expectedscsiDisableAutosenseDisable the automaticREQUEST SENSEfeature.scsiCDBLinkedThe parameter block contains a linked CDB. This option may not be supported by all SIMs.scsiQEnableEnable target queue actions. This option may not be supported by all SIMs.scsiCDBIsPointerSet if thescsiCDBfield of a SCSI I/O parameter block contains a pointer. If clear, thescsiCDBfield contains the actual CDB. In either case, thescsiCDBLengthfield contains the number of bytes in the SCSI command descriptor block.scsiInitiateSyncDataSet if the SIM should attempt to initiate a synchronous data transfer by sending theSDTRmessage. If successful, the device normally remains in the synchronous transfer mode until it is reset or until you specify asynchronous mode by setting thescsiDisableSyncDataflag. BecauseSDTRnegotiation occurs every time this flag is set, you should set it only when negotiation is actually needed.scsiDisableSyncDataDisable synchronous data transfer. The SIM sends anSDTRmessage with a REQ/ACK offset of 0 to indicate asynchronous data transfer mode. You should set this flag only when negotiation is actually needed.scsiSIMQHeadPlace the parameter block at the head of the SIM queue. This can be used to insert error handling at the head of a frozen queue.scsiSIMQFreezeFreeze the SIM queue after completing this transaction. See "Error Recovery Techniques" on page 4-10 for information about using this flag.scsiSIMQNoFreezeDisable SIM queue freezing for this transaction.scsiDoDisconnectExplicitly allow device to disconnect.scsiDontDisconnectExplicitly prohibit device disconnection. If this flag and thescsiDoDisconnectflag are both 0, the SIM determines whether to allow or prohibit disconnection, based on performance criteria.scsiDataReadyForDMAData buffer is locked and non-cacheable.scsiDataPhysicalData buffer address is physical.scsiSensePhysicalAutosense data pointer is physical.scsiDriverStorage- A pointer to the device driver's private storage. This field is not affected or used by the SCSI Manager.