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

    typedef UInt32 SCSIProtocolFeature;

    Discussion

    Typedef for SCSIProtocolFeature, a 32-bit quantity.

    Import Statement

  • Declaration

    typedef UInt32 SCSIProtocolPowerState;

    Discussion

    Typedef for SCSIProtocolPowerState, a 32-bit quantity.

    Import Statement

Constants

See the Overview section above for header-level documentation.

  • Declaration

    #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

      Property key for CFBundleIdentifier.

    • 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.

    • 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.

    • 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.

    • 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.

    • 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.

    • 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.

    • 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.

    • 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.

    • 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.

    • kIOSCSIArchitectureBundleIdentifierKey

      IOSCSIArchitectureModelFamily's CFBundle identifier.

  • Declaration

    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

      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.

    • 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.

    • 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.

    Discussion

    The list of SCSI Protocol Features currently supported.

  • Declaration

    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.

  • Declaration

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

    Constants

    • kSCSIProtocolPowerStateOff

      Off power state.

    • kSCSIProtocolPowerStateOn

      On power state.

    Discussion

    The list of SCSI Protocol Power States.