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 theSCSIAction
function. Because many of the functions that you access throughSCSIAction
require 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 allSCSIAction
functions. The function-specific extensions are described in the following sections.The SCSI Manager parameter block header is defined by the
SCSI_PB
data 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
scsiRequestInProgress
indicates that the request is still in progress or queued.scsiDevice
- A 4-byte value that uniquely identifies the target device for a request. The
DeviceIdent
data 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.
scsiDirectionMask
A bit field that specifies transfer direction, using these constants:
scsiDirectionIn
Data inscsiDirectionOut
Data outscsiDirectionNone
No data phase expectedscsiDisableAutosense
Disable the automaticREQUEST SENSE
feature.scsiCDBLinked
The parameter block contains a linked CDB. This option may not be supported by all SIMs.scsiQEnable
Enable target queue actions. This option may not be supported by all SIMs.scsiCDBIsPointer
Set if thescsiCDB
field of a SCSI I/O parameter block contains a pointer. If clear, thescsiCDB
field contains the actual CDB. In either case, thescsiCDBLength
field contains the number of bytes in the SCSI command descriptor block.scsiInitiateSyncData
Set if the SIM should attempt to initiate a synchronous data transfer by sending theSDTR
message. If successful, the device normally remains in the synchronous transfer mode until it is reset or until you specify asynchronous mode by setting thescsiDisableSyncData
flag. BecauseSDTR
negotiation occurs every time this flag is set, you should set it only when negotiation is actually needed.scsiDisableSyncData
Disable synchronous data transfer. The SIM sends anSDTR
message with a REQ/ACK offset of 0 to indicate asynchronous data transfer mode. You should set this flag only when negotiation is actually needed.scsiSIMQHead
Place 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.scsiSIMQFreeze
Freeze the SIM queue after completing this transaction. See "Error Recovery Techniques" on page 4-10 for information about using this flag.scsiSIMQNoFreeze
Disable SIM queue freezing for this transaction.scsiDoDisconnect
Explicitly allow device to disconnect.scsiDontDisconnect
Explicitly prohibit device disconnection. If this flag and thescsiDoDisconnect
flag are both 0, the SIM determines whether to allow or prohibit disconnection, based on performance criteria.scsiDataReadyForDMA
Data buffer is locked and non-cacheable.scsiDataPhysical
Data buffer address is physical.scsiSensePhysical
Autosense 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.