IOSCSIProtocolInterface.h

Overview

This file contains definitions for the IOSCSIProtocolInterface class, SCSI Protocol Features used by this interface, and additional constants used by this interface.



Classes

IOSCSIProtocolInterface


Typedefs

SCSIProtocolFeature
SCSIProtocolPowerState

SCSIProtocolFeature


typedef UInt32 SCSIProtocolFeature;  
Discussion

Typedef for SCSIProtocolFeature, a 32-bit quantity.


SCSIProtocolPowerState


typedef UInt32 SCSIProtocolPowerState;  
Discussion

Typedef for SCSIProtocolPowerState, a 32-bit quantity.

Enumerated Types

SCSI Protocol Features
SCSI Protocol Interface Device Notification values
SCSI Protocol Power States

SCSI Protocol Features


enum {   
    kSCSIProtocolFeature_ACA = 1,   
    kSCSIProtocolFeature_CPUInDiskMode = 2,   
    kSCSIProtocolFeature_ProtocolSpecificPolling = 3,   
    kSCSIProtocolFeature_ProtocolSpecificSleepCommand = 4,   
    kSCSIProtocolFeature_GetMaximumLogicalUnitNumber = 5,   
    kSCSIProtocolFeature_MaximumReadBlockTransferCount = 6,   
    kSCSIProtocolFeature_MaximumWriteBlockTransferCount = 7,   
    kSCSIProtocolFeature_MaximumReadTransferByteCount = 8,   
    kSCSIProtocolFeature_MaximumWriteTransferByteCount = 9,   
    kSCSIProtocolFeature_SubmitDefaultInquiryData = 10,   
    kSCSIProtocolFeature_ProtocolAlwaysReportsAutosenseData = 11,   
    kSCSIProtocolFeature_ProtocolSpecificPowerOff = 12,   
    kSCSIProtocolFeature_ProtocolSpecificPowerControl = 13,   
    kSCSIProtocolFeature_ProtocolSpecificAsyncNotification = 14  
};  
Constants
kSCSIProtocolFeature_ACA

Not yet used.

kSCSIProtocolFeature_CPUInDiskMode

Used to determine if the SCSI Protocol Services Driver supports a CPU which is in target disk mode.

kSCSIProtocolFeature_ProtocolSpecificPolling

Used to determine if the SCSI Protocol Services Driver supports protocol specific polling for media. This is used for low-power polling specifically for ATAPI devices on ATA buses

kSCSIProtocolFeature_ProtocolSpecificSleepCommand

Used to determine if the SCSI Protocol Services Driver supports protocol specific sleep commands to a drive. This is used for sleeping drives specifically ATAPI devices on ATA buses.

kSCSIProtocolFeature_GetMaximumLogicalUnitNumber

If the SCSI Protocol Services Driver supports logical units, it will report the maximum addressable ID that it supports in the UInt32 pointer that is passed in as the serviceValue. If only one unit is supported, the driver should return false for this query.

kSCSIProtocolFeature_MaximumReadBlockTransferCount

If the SCSI Protocol Services Driver has a maximum number of blocks that can be transfered in a read request, it will return true to this query and return the block count in the UInt32 pointer that is passed in as the serviceValue.

kSCSIProtocolFeature_MaximumWriteBlockTransferCount

If the SCSI Protocol Services Driver has a maximum number of blocks that can be transferred in a write request, it will return true to this query and return the block count in the UInt32 pointer that is passed in as the serviceValue.

kSCSIProtocolFeature_MaximumReadTransferByteCount

If the SCSI Protocol Services Driver has a maximum byte count that can be transferred in a read request, it will return true to this query and return the byte count in the UInt64 pointer that is passed in as the serviceValue.

kSCSIProtocolFeature_MaximumWriteTransferByteCount

If the SCSI Protocol Services Driver has a maximum byte count that can be transferred in a write request, it will return true to this query and return the byte count in the UInt64 pointer that is passed in as the serviceValue.

kSCSIProtocolFeature_SubmitDefaultInquiryData

If the SCSI Protocol Services Driver needs any extra information to make any negotiation settings from the standard INQUIRY data, this will be called to set that appropriately. The serviceValue will point to a SCSICmd_INQUIRY_StandardData buffer. The size of the buffer depends on the SCSI Device Characteristics dictionary for the device or bus. If there is no kIOPropertySCSIInquiryLengthKey value set in the dictionary or if it doesn't exist, then the size of the data will be the size of the full amount of Inquiry retrieved from the device.

kSCSIProtocolFeature_ProtocolAlwaysReportsAutosenseData

If the SCSI Protocol Services Driver always reports available autosense data when a kSCSITaskStatus_CHECK_CONDITION is set, then the protocol layer should return true. E.g. FireWire transport drivers should respond true to this.

kSCSIProtocolFeature_ProtocolSpecificPowerOff

If the SCSI Protocol Services Driver supports removing the power to the drive, then the protocol layer should return true. This is used for aggressive power management, specifically for ATAPI devices on ATA buses.

kSCSIProtocolFeature_ProtocolSpecificPowerControl

Used to determine if the SCSI Protocol Services Driver supports switching the power to the drive on and off. This is used for aggressive power management, specifically for SATAPI devices on AHCI buses.

kSCSIProtocolFeature_ProtocolSpecificAsyncNotification

Used to determine if the SCSI Protocol Services Driver supports asynchronous notifications from the drive. This is used to prevent polling for media, specifically for SATAPI devices on AHCI buses.

Discussion

The list of SCSI Protocol Features currently supported.


SCSI Protocol Interface Device Notification values


enum { 
    kSCSIProtocolNotification_DeviceRemoved = 0x69000010, 
    kSCSIProtocolNotification_VerifyDeviceState = 0x69000020, 
    kSCSIServicesNotification_ExclusivityChanged = 0x69000030 
};  
Constants
kSCSIProtocolNotification_DeviceRemoved

Private message sent between a SCSI protocol service provider and SCSI application layer driver to indicate device removal.

kSCSIProtocolNotification_VerifyDeviceState

Private message sent between a SCSI protocol service provider and SCSI application layer driver to indicate device state may have changed and the device state should be re-verified by the SCSI Application Layer driver. An example would be a bus reset which clears the tray locking state of an ATAPI device.

kSCSIServicesNotification_ExclusivityChanged

Message sent when a change in exclusivity state occurs. Usually in response to acquiring/releasing exclusive access to a device via a user client.

Discussion

Message values for SCSI Protocol Interface Device Notifications.


SCSI Protocol Power States


enum {  
    kSCSIProtocolPowerStateOff = 0,   
    kSCSIProtocolPowerStateOn = 1 
};  
Constants
kSCSIProtocolPowerStateOff

Off power state.

kSCSIProtocolPowerStateOn

On power state.

Discussion

The list of SCSI Protocol Power States.

Macro Definitions

kCFBundleIdentifierKey
kIOPropertyAutonomousSpinDownKey
kIOPropertyEjectRequireStartStopUnitKey
kIOPropertyReadTimeOutDurationKey
kIOPropertyRetryCountKey
kIOPropertySCSIDeviceCharacteristicsKey
kIOPropertySCSIInquiryLengthKey
kIOPropertySCSIManualEjectKey
kIOPropertyWriteTimeOutDurationKey
kIOSCSIArchitectureBundleIdentifierKey

kCFBundleIdentifierKey


#define kCFBundleIdentifierKey "CFBundleIdentifier" 
Discussion

Property key for CFBundleIdentifier.


kIOPropertyAutonomousSpinDownKey


#define kIOPropertyAutonomousSpinDownKey "Autonomous Spin Down" 
Discussion

This key is used to indicate that the device is known to have its own internal logic for idle disk spin down. This key is used to mark device which respon poorly to our efforts to manually spin down or spin up the device when it is already in the desired state.


kIOPropertyEjectRequireStartStopUnitKey


#define kIOPropertyEjectRequireStartStopUnitKey "Eject Requires START_STOP_UNIT" 
Discussion

This key is used to indicate that while the device may have failed PREVENT_ALLOW_MEDIUM REMOVAL it still requires a START_STOP_UNIT to eject/unload media.


kIOPropertyReadTimeOutDurationKey


#define kIOPropertyReadTimeOutDurationKey "Read Time Out Duration" 
Discussion

This key is used to define the Read Time Out for a particular device. This property overrides all of the protocol defaults. This property is a value, in milliseconds.


kIOPropertyRetryCountKey


#define kIOPropertyRetryCountKey "Retry Count" 
Discussion

This key is used to define the number of Read/Write retries for a particular device. This property overrides all of the protocol defaults. The value is a UInt32 corresponding to the number of retries.


kIOPropertySCSIDeviceCharacteristicsKey


#define kIOPropertySCSIDeviceCharacteristicsKey "SCSI Device Characteristics" 
Discussion

This key is used to define SCSI Device Characteristics for a particular device. It is the key for the dictionary containing the keys of characteristics. These keys are only defined between the SCSI Protocol Layer and the SCSI Applicaiton Layer. Some properties may be copied from this dictionary to the more generic Device Characteristics or Protocol Characteristics dictionaries.


kIOPropertySCSIInquiryLengthKey


#define kIOPropertySCSIInquiryLengthKey "Inquiry Length" 
Discussion

This key is used to define a default INQUIRY length to issue to the device. The value is a UInt32 corresponding to the number of bytes to request in the INQUIRY command.


kIOPropertySCSIManualEjectKey


#define kIOPropertySCSIManualEjectKey "Manual Eject" 
Discussion

This key is used to indicate that the device is known to be a manual ejectable media device. This property overrides all of the driver checks for determining this capability. This property is a string, although if it exists it should always be true.


kIOPropertyWriteTimeOutDurationKey


#define kIOPropertyWriteTimeOutDurationKey "Write Time Out Duration" 
Discussion

This key is used to define the Write Time Out for a particular device. This property overrides all of the protocol defaults. This property is a value, in milliseconds.


kIOSCSIArchitectureBundleIdentifierKey


#define kIOSCSIArchitectureBundleIdentifierKey "com.apple.iokit.IOSCSIArchitectureModelFamily" 
Discussion

IOSCSIArchitectureModelFamily's CFBundle identifier.

 

 

Last Updated: 2009-10-14