Mac Developer Library

Developer

IOSCSIProtocolInterface.h Reference

Options
Deployment Target:

On This Page

IOSCSIProtocolInterface.h Reference

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

Included Headers

  • <IOKit/storage/IOStorageDeviceCharacteristics.h>

  • <TargetConditionals.h>

  • <kern/thread.h>

  • <IOKit/IOLib.h>

  • <IOKit/IOService.h>

  • <IOKit/IOCommandGate.h>

  • <IOKit/IOWorkLoop.h>

  • <IOKit/scsi/SCSITask.h>

Data Types

See the Overview section above for header-level documentation.

  • Declaration

    Objective-C

    typedef UInt32 SCSIProtocolFeature;

    Discussion

    Typedef for SCSIProtocolFeature, a 32-bit quantity.

    Import Statement

    Objective-C

    #include <IOSCSIProtocolInterface.h>;

    Availability

    Available in OS X v10.0 and later.

  • Declaration

    Objective-C

    typedef UInt32 SCSIProtocolPowerState;

    Discussion

    Typedef for SCSIProtocolPowerState, a 32-bit quantity.

    Import Statement

    Objective-C

    #include <IOSCSIProtocolInterface.h>;

    Availability

    Available in OS X v10.6 and later.

Constants

See the Overview section above for header-level documentation.

  • Declaration

    Objective-C

    #define kCFBundleIdentifierKey "CFBundleIdentifier" #define kIOPropertyAutonomousSpinDownKey "Autonomous Spin Down" #define kIOPropertyDoNotPreventMediumRemovalKey "Do Not Prevent Medium Removal" #define kIOPropertyEjectRequireStartStopUnitKey "Eject Requires START_STOP_UNIT" #define kIOPropertyReadTimeOutDurationKey "Read Time Out Duration" #define kIOPropertyRetryCountKey "Retry Count" #define kIOPropertySCSIDeviceCharacteristicsKey "SCSI Device Characteristics" #define kIOPropertySCSIInquiryLengthKey "Inquiry Length" #define kIOPropertySCSIManualEjectKey "Manual Eject" #define kIOPropertyWriteTimeOutDurationKey "Write Time Out Duration" #define kIOSCSIArchitectureBundleIdentifierKey "com.apple.iokit.IOSCSIArchitectureModelFamily"

    Constants

    • kCFBundleIdentifierKey

      kCFBundleIdentifierKey

      Property key for CFBundleIdentifier.

      Available in OS X v10.6 and later.

    • kIOPropertyAutonomousSpinDownKey

      kIOPropertyAutonomousSpinDownKey

      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 respond poorly to our efforts to manually spin down or spin up the device when it is already in the desired state.

      Available in OS X v10.6 and later.

    • kIOPropertyDoNotPreventMediumRemovalKey

      kIOPropertyDoNotPreventMediumRemovalKey

      This key is used to indicate that the device either does not require or respond well to PREVENT_ALLOW_MEDIUM_REMOVAL. This property indicates that the PREVENT_ALLOW_MEDIUM_REMOVAL should not be used with the specified device.

      Available in OS X v10.9 and later.

    • kIOPropertyEjectRequireStartStopUnitKey

      kIOPropertyEjectRequireStartStopUnitKey

      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.

      Available in OS X v10.6 and later.

    • kIOPropertyReadTimeOutDurationKey

      kIOPropertyReadTimeOutDurationKey

      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.

      Available in OS X v10.2 and later.

    • kIOPropertyRetryCountKey

      kIOPropertyRetryCountKey

      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.

      Available in OS X v10.5 and later.

    • kIOPropertySCSIDeviceCharacteristicsKey

      kIOPropertySCSIDeviceCharacteristicsKey

      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.

      Available in OS X v10.1 and later.

    • kIOPropertySCSIInquiryLengthKey

      kIOPropertySCSIInquiryLengthKey

      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.

      Available in OS X v10.1 and later.

    • kIOPropertySCSIManualEjectKey

      kIOPropertySCSIManualEjectKey

      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.

      Available in OS X v10.1 and later.

    • kIOPropertyWriteTimeOutDurationKey

      kIOPropertyWriteTimeOutDurationKey

      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.

      Available in OS X v10.2 and later.

    • kIOSCSIArchitectureBundleIdentifierKey

      kIOSCSIArchitectureBundleIdentifierKey

      IOSCSIArchitectureModelFamily's CFBundle identifier.

      Available in OS X v10.6 and later.

  • Declaration

    Objective-C

    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, /*! */ kSCSIProtocolFeature_HierarchicalLogicalUnits = 15, /*! */ kSCSIProtocolFeature_MultiPathing = 16 };

    Constants

    • kSCSIProtocolFeature_ACA

      kSCSIProtocolFeature_ACA

      Not yet used.

      Available in OS X v10.0 and later.

    • kSCSIProtocolFeature_CPUInDiskMode

      kSCSIProtocolFeature_CPUInDiskMode

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

      Available in OS X v10.0 and later.

    • kSCSIProtocolFeature_ProtocolSpecificPolling

      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

      Available in OS X v10.6 and later.

    • kSCSIProtocolFeature_ProtocolSpecificSleepCommand

      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.

      Available in OS X v10.6 and later.

    • kSCSIProtocolFeature_GetMaximumLogicalUnitNumber

      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.

      Available in OS X v10.6 and later.

    • kSCSIProtocolFeature_MaximumReadBlockTransferCount

      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.

      Available in OS X v10.6 and later.

    • kSCSIProtocolFeature_MaximumWriteBlockTransferCount

      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.

      Available in OS X v10.6 and later.

    • kSCSIProtocolFeature_MaximumReadTransferByteCount

      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.

      Available in OS X v10.6 and later.

    • kSCSIProtocolFeature_MaximumWriteTransferByteCount

      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.

      Available in OS X v10.6 and later.

    • kSCSIProtocolFeature_SubmitDefaultInquiryData

      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.

      Available in OS X v10.6 and later.

    • kSCSIProtocolFeature_ProtocolAlwaysReportsAutosenseData

      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.

      Available in OS X v10.6 and later.

    • kSCSIProtocolFeature_ProtocolSpecificPowerOff

      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.

      Available in OS X v10.6 and later.

    • kSCSIProtocolFeature_ProtocolSpecificPowerControl

      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.

      Available in OS X v10.6 and later.

    • kSCSIProtocolFeature_ProtocolSpecificAsyncNotification

      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.

      Available in OS X v10.6 and later.

    • kSCSIProtocolFeature_HierarchicalLogicalUnits

      kSCSIProtocolFeature_HierarchicalLogicalUnits

      kSCSIProtocolFeature_HierarchicalLogicalUnits: If the SCSI Protocol Services layer supports hierarchical logical units, then the protocol services layer should report true and use IOSCSIProtocolServices::GetLogicalUnitBytes() to retrieve the full 8 bytes of LUN information.

      Available in OS X v10.7 and later.

    • kSCSIProtocolFeature_MultiPathing

      kSCSIProtocolFeature_MultiPathing

      kSCSIProtocolFeature_MultiPathing: If the SCSI Protocol Services layer supports multi-pathing, then the protocol services layer should report true. This is used to support multiple paths to a logical unit by creating a IOSCSIMultipathedLogicalUnit object.

      Available in OS X v10.7 and later.

    Discussion

    The list of SCSI Protocol Features currently supported.

  • Declaration

    Objective-C

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

    Constants

    • kSCSIProtocolNotification_DeviceRemoved

      kSCSIProtocolNotification_DeviceRemoved

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

      Available in OS X v10.0 and later.

    • kSCSIProtocolNotification_VerifyDeviceState

      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.

      Available in OS X v10.0 and later.

    • kSCSIServicesNotification_ExclusivityChanged

      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.

      Available in OS X v10.6 and later.

    Discussion

    Message values for SCSI Protocol Interface Device Notifications.

  • Declaration

    Objective-C

    enum { /*! */ kSCSIProtocolPowerStateOff = 0, /*! */ kSCSIProtocolPowerStateOn = 1 };

    Constants

    • kSCSIProtocolPowerStateOff

      kSCSIProtocolPowerStateOff

      Off power state.

      Available in OS X v10.6 and later.

    • kSCSIProtocolPowerStateOn

      kSCSIProtocolPowerStateOn

      On power state.

      Available in OS X v10.6 and later.

    Discussion

    The list of SCSI Protocol Power States.