Advanced Search
Apple Developer Connection
Member Login Log In | Not a Member? Contact ADC

Previous Book Contents Book Index Next

Inside Macintosh: Devices /
Chapter 4 - SCSI Manager 4.3 / SCSI Manager 4.3 Reference
Data Structures

SCSI Manager Parameter Block Header

You use the SCSI Manager parameter block to pass information to the SCSIAction function. Because many of the functions that you access through SCSIAction 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 all SCSIAction 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
typedef struct SCSI_PB SCSI_PB;
Field Description
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.
The size of the parameter block, in bytes, including the parameter block header.
A function selector code that specifies the service being requested. Table 4-2 on page 4-39 lists these codes.
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.
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).
A pointer to a completion routine.
Flags indicating the transfer direction and any special handling required for this request.
A bit field that specifies transfer direction, using these constants:

scsiDirectionIn Data in
scsiDirectionOut Data out
scsiDirectionNone No data phase expected

Disable the automatic REQUEST SENSE feature.
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.
Set if the scsiCDB field of a SCSI I/O parameter block contains a pointer. If clear, the scsiCDB field contains the actual CDB. In either case, the scsiCDBLength field contains the number of bytes in the SCSI command descriptor block.
Set if the SIM should attempt to initiate a synchronous data transfer by sending the SDTR message. If successful, the device normally remains in the synchronous transfer mode until it is reset or until you specify asynchronous mode by setting the scsiDisableSyncData flag. Because SDTR negotiation occurs every time this flag is set, you should set it only when negotiation is actually needed.
Disable synchronous data transfer. The SIM sends an SDTR 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.
Freeze the SIM queue after completing this transaction. See "Error Recovery Techniques" on page 4-10 for information about using this flag.
Disable SIM queue freezing for this transaction.
Explicitly allow device to disconnect.
Explicitly prohibit device disconnection. If this flag and the scsiDoDisconnect flag are both 0, the SIM determines whether to allow or prohibit disconnection, based on performance criteria.
Data buffer is locked and non-cacheable.
Data buffer address is physical.
Autosense data pointer is physical.
A pointer to the device driver's private storage. This field is not affected or used by the SCSI Manager.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
3 JUL 1996

Get information on Apple products.
Visit the Apple Store online or at retail locations.

Copyright © 2004 Apple Computer, Inc.
All rights reserved. | Terms of use | Privacy Notice