IOSCSICommand_Reference.h



Typedefs

SCSICDBInfo

typedef  struct  SCSICDBInfo  {

  UInt32  cdbFlags;

  UInt32  cdbTagMsg;
  UInt32  cdbTag;

  UInt32  cdbAbortMsg;

  UInt32  cdbLength;
  UInt8  cdb[16];
  
  UInt32  reserved[16];
}  SCSICDBInfo;

Fields specified here are set by IOSCSIDevice client, while others are set by the IOSCSIController class for use by the host adapter driver. The client should zero all fields of the structure prior to use.

Fields

NameDescription
cdbFlagsSee enum SCSICDBFlags for flag definitions.
cdbTagMsgThis field should be set to zero by the IOSCSIDevice client. If the SCSI device supports tag queuing then the IOSCSIController class will set this field to select simple (unordered) tags.
cdbTagThis field is set by the IOSCSIController class to tell the host adapter driver the SCSI tag value to assign to this IOSCSICommand.
cdbLengthSet by the IOSCSIDevice client to the length of the Command Descriptor Block (CDB).
cdbSet by the IOSCSIDevice client to command descriptor block the client wishes the target to execute.

SCSIResults

typedef  struct  SCSIResults  {
  IOReturn  returnCode;
  
  UInt32  bytesTransferred;

  UInt32  adapterStatus;  
  UInt8  scsiStatus;
  
  bool  requestSenseDone;
  UInt32  requestSenseLength;
}  SCSIResults;

Fields

NameDescription
returnCodeThe overall return code for the command. See iokit/iokit/IOReturn.h. This value is also returned as the getResults() return value.

Note: The exact subset of return codes a SCSI command will return is currently under review.
bytesTransferredThe total number of bytes transferred to/from the target device.
adapterStatusThis field provides additional adapter reported error information. The SCSI Family uses this information to determine whether the target rejected a negotiation attempt (either/or) wide or synchronous.
scsiStatusThe SCSI Status byte returned from the target device.
requestSenseDoneA boolean indicating whether sense data was obtained from the target device.
requestSenseLengthThe number of sense data bytes returned from the target device.

Structs

SCSITargetLun

typedef  struct  SCSITargetLun  {
  UInt8  target;
  UInt8  lun;
  UInt8  reserved[2];
}  SCSITargetLun;

Fields

NameDescription
targetThe SCSI Id for the SCSI device being selected.
lunThe SCSI Lun for the SCSI device being selected.

© 2000 Apple Computer, Inc. — (Last Updated 2/23/2000)