SCSICmds_MODE_Definitions.h Reference

Declared in
SCSICmds_MODE_Definitions.h

Overview

This file contains all definitions for the data returned from the MODE_SENSE_6 and MODE_SENSE_10 commands.

Included Headers

  • <IOKit/IOTypes.h>

  • <CoreFoundation/CoreFoundation.h>

Data Types

See the Overview section above for header-level documentation.

DASDModeParameterBlockDescriptor

typedef struct DASDModeParameterBlockDescriptor {
      UInt32 NUMBER_OF_BLOCKS;
      UInt8 DENSITY_CODE;
      UInt8 BLOCK_LENGTH[3];
} DASDModeParameterBlockDescriptor;
Discussion

Direct Access Storage Device mode parameter block descriptor.

Availability
  • Available in OS X v10.3 and later.
Declared In
SCSICmds_MODE_Definitions.h

LongLBAModeParameterBlockDescriptor

typedef struct LongLBAModeParameterBlockDescriptor {
      UInt64 NUMBER_OF_BLOCKS;
      UInt8 DENSITY_CODE;
      UInt8 RESERVED[3];
      UInt32 BLOCK_LENGTH;
} LongLBAModeParameterBlockDescriptor;
Discussion

Long LBA mode parameter block descriptor.

Availability
  • Available in OS X v10.3 and later.
Declared In
SCSICmds_MODE_Definitions.h

ModePageFormatHeader

typedef struct ModePageFormatHeader {
      UInt8 PS_PAGE_CODE;
      UInt8 PAGE_LENGTH;
} ModePageFormatHeader;
Discussion

Mode Page format header.

Availability
  • Available in OS X v10.3 and later.
Declared In
SCSICmds_MODE_Definitions.h

ModeParameterBlockDescriptor

typedef struct ModeParameterBlockDescriptor {
      UInt8 DENSITY_CODE;
      UInt8 NUMBER_OF_BLOCKS[3];
      UInt8 RESERVED;
      UInt8 BLOCK_LENGTH[3];
} ModeParameterBlockDescriptor;
Discussion

General mode parameter block descriptor.

Availability
  • Available in OS X v10.3 and later.
Declared In
SCSICmds_MODE_Definitions.h

SBCModePageCaching

typedef struct SBCModePageCaching {
      ModePageFormatHeader header;
      UInt8 flags;
      UInt8 DEMAND_READ_WRITE_RETENTION_PRIORITY;
      UInt16 DISABLE_PREFETCH_TRANSFER_LENGTH;
      UInt16 MINIMUM_PREFETCH;
      UInt16 MAXIMUM_PREFETCH;
      UInt16 MAXIMUM_PREFETCH_CEILING;
      UInt8 flags2;
      UInt8 NUMBER_OF_CACHE_SEGMENTS;
      UInt16 CACHE_SEGMENT_SIZE;
      UInt8 RESERVED;
      UInt8 NON_CACHE_SEGMENT_SIZE[3];
} SBCModePageCaching;
Discussion

Caching Mode Page (PAGE CODE 0x08) format.

Availability
  • Available in OS X v10.3 and later.
Declared In
SCSICmds_MODE_Definitions.h

SBCModePageFlexibleDisk

typedef struct SBCModePageFlexibleDisk {
      ModePageFormatHeader header;
      UInt16 TRANSFER_RATE;
      UInt8 NUMBER_OF_HEADS;
      UInt8 SECTORS_PER_TRACK;
      UInt16 DATA_BYTES_PER_SECTOR;
      UInt16 NUMBER_OF_CYLINDERS;
      UInt16 STARTING_CYLINDER_WRITE_PRECOMPENSATION;
      UInt16 STARTING_CYLINDER_REDUCED_WRITE_CURRENT;
      UInt16 DEVICE_STEP_RATE;
      UInt8 DEVICE_STEP_PULSE_WIDTH;
      UInt16 HEAD_SETTLE_DELAY;
      UInt8 MOTOR_ON_DELAY;
      UInt8 MOTOR_OFF_DELAY;
      UInt8 TRDY_SSN_MO;
      UInt8 SPC;
      UInt8 WRITE_COMPENSATION;
      UInt8 HEAD_LOAD_DELAY;
      UInt8 HEAD_UNLOAD_DELAY;
      UInt8 PIN_34_PIN_2;
      UInt8 PIN_4_PIN_1;
      UInt16 MEDIUM_ROTATION_RATE;
      UInt8 RESERVED[2];
} SBCModePageFlexibleDisk;
Discussion

Flexible Disk Mode Page (PAGE CODE 0x05) format.

Availability
  • Available in OS X v10.3 and later.
Declared In
SCSICmds_MODE_Definitions.h

SBCModePageFormatDevice

typedef struct SBCModePageFormatDevice {
      ModePageFormatHeader header;
      UInt16 TRACKS_PER_ZONE;
      UInt16 ALTERNATE_SECTORS_PER_ZONE;
      UInt16 ALTERNATE_TRACKS_PER_ZONE;
      UInt16 ALTERNATE_TRACKS_PER_LOGICAL_UNIT;
      UInt16 SECTORS_PER_TRACK;
      UInt16 DATA_BYTES_PER_PHYSICAL_SECTOR;
      UInt16 INTERLEAVE;
      UInt16 TRACK_SKEW_FACTOR;
      UInt16 CYLINDER_SKEW_FACTOR;
      UInt8 SSEC_HSEC_RMB_SURF;
      UInt8 RESERVED[3];
} SBCModePageFormatDevice;
Discussion

Format Device Mode Page (PAGE CODE 0x03) format.

Availability
  • Available in OS X v10.3 and later.
Declared In
SCSICmds_MODE_Definitions.h

SBCModePageRigidDiskGeometry

typedef struct SBCModePageRigidDiskGeometry {
      ModePageFormatHeader header;
      UInt8 NUMBER_OF_CYLINDERS[3];
      UInt8 NUMBER_OF_HEADS;
      UInt8 STARTING_CYLINDER_WRITE_PRECOMPENSATION[3];
      UInt8 STARTING_CYLINDER_REDUCED_WRITE_CURRENT[3];
      UInt16 DEVICE_STEP_RATE;
      UInt8 LANDING_ZONE_CYLINDER[3];
      UInt8 RPL;
      UInt8 ROTATIONAL_OFFSET;
      UInt8 RESERVED;
      UInt16 MEDIUM_ROTATION_RATE;
      UInt8 RESERVED1[2];
} SBCModePageRigidDiskGeometry;
Discussion

Rigid Disk Geometry Mode Page (PAGE CODE 0x04) format.

Availability
  • Available in OS X v10.3 and later.
Declared In
SCSICmds_MODE_Definitions.h

SPCModePagePowerCondition

typedef struct SPCModePagePowerCondition {
      ModePageFormatHeader header;
      UInt8 RESERVED;
      UInt8 IDLE_STANDBY;
      UInt32 IDLE_CONDITION_TIMER;
      UInt32 STANDBY_CONDITION_TIMER;
} SPCModePagePowerCondition;
Discussion

Power Conditions Mode Page (PAGE CODE 0x1A) format.

Availability
  • Available in OS X v10.3 and later.
Declared In
SCSICmds_MODE_Definitions.h

SPCModeParameterHeader10

typedef struct SPCModeParameterHeader10 {
      UInt16 MODE_DATA_LENGTH;
      UInt8 MEDIUM_TYPE;
      UInt8 DEVICE_SPECIFIC_PARAMETER;
      UInt8 LONGLBA;
      UInt8 RESERVED;
      UInt16 BLOCK_DESCRIPTOR_LENGTH;
} SPCModeParameterHeader10;
Discussion

Mode Parameter Header for the MODE_SENSE_10 command.

Availability
  • Available in OS X v10.3 and later.
Declared In
SCSICmds_MODE_Definitions.h

SPCModeParameterHeader6

typedef struct SPCModeParameterHeader6 {
      UInt8 MODE_DATA_LENGTH;
      UInt8 MEDIUM_TYPE;
      UInt8 DEVICE_SPECIFIC_PARAMETER;
      UInt8 BLOCK_DESCRIPTOR_LENGTH;
} SPCModeParameterHeader6;
Discussion

Mode Parameter Header for the MODE_SENSE_6 command.

Availability
  • Available in OS X v10.3 and later.
Declared In
SCSICmds_MODE_Definitions.h

Constants

See the Overview section above for header-level documentation.

Caching flags bitfields

enum {
   kSBCModePageCaching_RCD_Bit = 0,
   kSBCModePageCaching_MF_Bit = 1,
   kSBCModePageCaching_WCE_Bit = 2,
   kSBCModePageCaching_SIZE_Bit = 3,
   kSBCModePageCaching_DISC_Bit = 4,
   kSBCModePageCaching_CAP_Bit = 5,
   kSBCModePageCaching_ABPF_Bit = 6,
   kSBCModePageCaching_IC_Bit = 7,
   kSBCModePageCaching_RCD_Mask = (
   1 << kSBCModePageCaching_RCD_Bit),
   kSBCModePageCaching_MF_Mask = (
   1 << kSBCModePageCaching_MF_Bit),
   kSBCModePageCaching_WCE_Mask = (
   1 << kSBCModePageCaching_WCE_Bit),
   kSBCModePageCaching_SIZE_Mask = (
   1 << kSBCModePageCaching_SIZE_Bit),
   kSBCModePageCaching_DISC_Mask = (
   1 << kSBCModePageCaching_DISC_Bit),
   kSBCModePageCaching_CAP_Mask = (
   1 << kSBCModePageCaching_CAP_Bit),
   kSBCModePageCaching_ABPF_Mask = (
   1 << kSBCModePageCaching_ABPF_Bit),
   kSBCModePageCaching_IC_Mask = (
   1 << kSBCModePageCaching_IC_Bit)
};
Constants
kSBCModePageCaching_RCD_Bit

RCD Bit definition.

Available in OS X v10.3 and later.

Declared in SCSICmds_MODE_Definitions.h.

kSBCModePageCaching_MF_Bit

MF Bit definition.

Available in OS X v10.3 and later.

Declared in SCSICmds_MODE_Definitions.h.

kSBCModePageCaching_WCE_Bit

WCE Bit definition.

Available in OS X v10.3 and later.

Declared in SCSICmds_MODE_Definitions.h.

kSBCModePageCaching_SIZE_Bit

SIZE Bit definition.

Available in OS X v10.3 and later.

Declared in SCSICmds_MODE_Definitions.h.

kSBCModePageCaching_DISC_Bit

DISC Bit definition.

Available in OS X v10.3 and later.

Declared in SCSICmds_MODE_Definitions.h.

kSBCModePageCaching_CAP_Bit

CAP Bit definition.

Available in OS X v10.3 and later.

Declared in SCSICmds_MODE_Definitions.h.

kSBCModePageCaching_ABPF_Bit

ABPF Bit definition.

Available in OS X v10.3 and later.

Declared in SCSICmds_MODE_Definitions.h.

kSBCModePageCaching_IC_Bit

IC Bit definition.

Available in OS X v10.3 and later.

Declared in SCSICmds_MODE_Definitions.h.

kSBCModePageCaching_RCD_Mask

Mask for use with flags field.

Available in OS X v10.3 and later.

Declared in SCSICmds_MODE_Definitions.h.

kSBCModePageCaching_MF_Mask

Mask for use with flags field.

Available in OS X v10.3 and later.

Declared in SCSICmds_MODE_Definitions.h.

kSBCModePageCaching_WCE_Mask

Mask for use with flags field.

Available in OS X v10.3 and later.

Declared in SCSICmds_MODE_Definitions.h.

kSBCModePageCaching_SIZE_Mask

Mask for use with flags field.

Available in OS X v10.3 and later.

Declared in SCSICmds_MODE_Definitions.h.

kSBCModePageCaching_DISC_Mask

Mask for use with flags field.

Available in OS X v10.3 and later.

Declared in SCSICmds_MODE_Definitions.h.

kSBCModePageCaching_CAP_Mask

Mask for use with flags field.

Available in OS X v10.3 and later.

Declared in SCSICmds_MODE_Definitions.h.

kSBCModePageCaching_ABPF_Mask

Mask for use with flags field.

Available in OS X v10.3 and later.

Declared in SCSICmds_MODE_Definitions.h.

kSBCModePageCaching_IC_Mask

Mask for use with flags field.

Available in OS X v10.3 and later.

Declared in SCSICmds_MODE_Definitions.h.

Discussion

Bit field definitions and masks for Caching flags field.

Caching flags2 bitfields

enum {
   // Bits 0:2 Reserved
   kSBCModePageCaching_VS1_Bit = 3,
   kSBCModePageCaching_VS2_Bit = 4,
   kSBCModePageCaching_DRA_Bit = 5,
   kSBCModePageCaching_LBCSS_Bit = 6,
   kSBCModePageCaching_FSW_Bit = 7,
   kSBCModePageCaching_VS1_Mask = (
   1 << kSBCModePageCaching_VS1_Bit),
   kSBCModePageCaching_VS2_Mask = (
   1 << kSBCModePageCaching_VS2_Bit),
   kSBCModePageCaching_DRA_Mask = (
   1 << kSBCModePageCaching_DRA_Bit),
   kSBCModePageCaching_LBCSS_Mask = (
   1 << kSBCModePageCaching_LBCSS_Bit),
   kSBCModePageCaching_FSW_Mask = (
   1 << kSBCModePageCaching_FSW_Bit)
};
Constants
kSBCModePageCaching_VS1_Bit

VS1 Bit definition.

Available in OS X v10.3 and later.

Declared in SCSICmds_MODE_Definitions.h.

kSBCModePageCaching_VS2_Bit

VS2 Bit definition.

Available in OS X v10.3 and later.

Declared in SCSICmds_MODE_Definitions.h.

kSBCModePageCaching_DRA_Bit

DRA Bit definition.

Available in OS X v10.3 and later.

Declared in SCSICmds_MODE_Definitions.h.

kSBCModePageCaching_LBCSS_Bit

LBCSS Bit definition.

Available in OS X v10.3 and later.

Declared in SCSICmds_MODE_Definitions.h.

kSBCModePageCaching_FSW_Bit

FSW Bit definition.

Available in OS X v10.3 and later.

Declared in SCSICmds_MODE_Definitions.h.

kSBCModePageCaching_VS1_Mask

Mask for use with flags2 field.

Available in OS X v10.3 and later.

Declared in SCSICmds_MODE_Definitions.h.

kSBCModePageCaching_VS2_Mask

Mask for use with flags2 field.

Available in OS X v10.3 and later.

Declared in SCSICmds_MODE_Definitions.h.

kSBCModePageCaching_DRA_Mask

Mask for use with flags2 field.

Available in OS X v10.3 and later.

Declared in SCSICmds_MODE_Definitions.h.

kSBCModePageCaching_LBCSS_Mask

Mask for use with flags2 field.

Available in OS X v10.3 and later.

Declared in SCSICmds_MODE_Definitions.h.

kSBCModePageCaching_FSW_Mask

Mask for use with flags2 field.

Available in OS X v10.3 and later.

Declared in SCSICmds_MODE_Definitions.h.

Discussion

Bit field definitions and masks for Caching flags2 field.

Demand Read/Write Retention masks

enum {
   kSBCModePageCaching_DEMAND_WRITE_Mask = 0x00FF,
   kSBCModePageCaching_DEMAND_READ_Mask = 0xFF00
};
Constants
kSBCModePageCaching_DEMAND_WRITE_Mask

Mask for the DEMAND_READ_WRITE_RETENTION_PRIORITY field.

Available in OS X v10.3 and later.

Declared in SCSICmds_MODE_Definitions.h.

kSBCModePageCaching_DEMAND_READ_Mask

Mask for the DEMAND_READ_WRITE_RETENTION_PRIORITY field.

Available in OS X v10.3 and later.

Declared in SCSICmds_MODE_Definitions.h.

Discussion

Demand Read/Write Retention masks.

Device Specific Parameter Bitfield definitions

enum {
   kModeSenseSBCDeviceSpecific_DPOFUABit = 4,
   kModeSenseSBCDeviceSpecific_WriteProtectBit = 7,
   kModeSenseSBCDeviceSpecific_DPOFUAMask = (
   1 << kModeSenseSBCDeviceSpecific_DPOFUABit),
   kModeSenseSBCDeviceSpecific_WriteProtectMask = (
   1 << kModeSenseSBCDeviceSpecific_WriteProtectBit)
};
Constants
kModeSenseSBCDeviceSpecific_DPOFUABit

Bit to indicate DPO and FUA bits are accepted by the device server.

Available in OS X v10.6 and later.

Declared in SCSICmds_MODE_Definitions.h.

kModeSenseSBCDeviceSpecific_WriteProtectBit

Bit to indicate medium is write protected.

Available in OS X v10.3 and later.

Declared in SCSICmds_MODE_Definitions.h.

kModeSenseSBCDeviceSpecific_DPOFUAMask

Mask to test for kModeSenseSBCDeviceSpecific_DPOFUABit.

Available in OS X v10.6 and later.

Declared in SCSICmds_MODE_Definitions.h.

kModeSenseSBCDeviceSpecific_WriteProtectMask

Mask to test for kModeSenseSBCDeviceSpecific_WriteProtectBit.

Available in OS X v10.3 and later.

Declared in SCSICmds_MODE_Definitions.h.

Discussion

SBC definitions for Device Specific Parameter in the Mode Sense Header Block.

Long LBA Bitfield definitions

enum {
   kModeSenseParameterHeader10_LongLBABit = 0,
   kModeSenseParameterHeader10_LongLBAMask = (
   1 << kModeSenseParameterHeader10_LongLBABit),
};
Constants
kModeSenseParameterHeader10_LongLBABit

Bit to indicate Long LBA block descriptors follow.

Available in OS X v10.3 and later.

Declared in SCSICmds_MODE_Definitions.h.

kModeSenseParameterHeader10_LongLBAMask

Mask to test for kModeSenseParameterHeader10_LongLBABit.

Available in OS X v10.3 and later.

Declared in SCSICmds_MODE_Definitions.h.

Discussion

Long LBA Bitfield definitions for Mode Parameter Header for MODE_SENSE_10 command.

Mode Page Format bit definitions

enum {
   kModePageFormat_PS_Bit = 7,
   kModePageFormat_PAGE_CODE_Mask = 0x3F,
   kModePageFormat_PS_Mask = (
   1 << kModePageFormat_PS_Bit)
};
Constants
kModePageFormat_PS_Bit

Bit to indicate Parameters Saveable.

Available in OS X v10.3 and later.

Declared in SCSICmds_MODE_Definitions.h.

kModePageFormat_PAGE_CODE_Mask

Mask to obtain the PAGE_CODE from the PS_PAGE_CODE field.

Available in OS X v10.3 and later.

Declared in SCSICmds_MODE_Definitions.h.

kModePageFormat_PS_Mask

Mask to test for kModePageFormat_PS_Bit.

Available in OS X v10.3 and later.

Declared in SCSICmds_MODE_Definitions.h.

Discussion

Mode Page Format bit definitions.

PIN_34_PIN_2 bitfields

enum {
   kSBCModePageFlexibleDisk_PIN_2_Mask = 0x0F,
   kSBCModePageFlexibleDisk_PIN_34_Mask = 0xF0
};
Constants
kSBCModePageFlexibleDisk_PIN_2_Mask

Mask for use with PIN_34_PIN_2 field.

Available in OS X v10.3 and later.

Declared in SCSICmds_MODE_Definitions.h.

kSBCModePageFlexibleDisk_PIN_34_Mask

Mask for use with PIN_34_PIN_2 field.

Available in OS X v10.3 and later.

Declared in SCSICmds_MODE_Definitions.h.

Discussion

Bit field definitions and masks for Flexible Disk PIN_34_PIN_2 field.

PIN_4_PIN_1 bitfields

enum {
   kSBCModePageFlexibleDisk_PIN_1_Mask = 0x0F,
   kSBCModePageFlexibleDisk_PIN_4_Mask = 0xF0
};
Constants
kSBCModePageFlexibleDisk_PIN_1_Mask

Mask for use with PIN_4_PIN_1 field.

Available in OS X v10.3 and later.

Declared in SCSICmds_MODE_Definitions.h.

kSBCModePageFlexibleDisk_PIN_4_Mask

Mask for use with PIN_4_PIN_1 field.

Available in OS X v10.3 and later.

Declared in SCSICmds_MODE_Definitions.h.

Discussion

Bit field definitions and masks for Flexible Disk PIN_4_PIN_1 field.

Rigid Disk Geometry bitfields

enum {
   kSBCModePageRigidDiskGeometry_RPL_Mask = 0x03
};
Constants
kSBCModePageRigidDiskGeometry_RPL_Mask

Mask for use with the RPL field.

Available in OS X v10.3 and later.

Declared in SCSICmds_MODE_Definitions.h.

Discussion

Bit field masks for Rigid Disk Geometry structure fields.

SBC Mode Pages

enum {
   kSBCModePageFormatDeviceCode = 0x03,
   kSBCModePageRigidDiskGeometryCode = 0x04,
   kSBCModePageFlexibleDiskCode = 0x05,
   kSBCModePageCachingCode = 0x08
};
Constants
kSBCModePageFormatDeviceCode

Format Device Mode Page value.

Available in OS X v10.3 and later.

Declared in SCSICmds_MODE_Definitions.h.

kSBCModePageRigidDiskGeometryCode

Rigid Disk Geometry Page value.

Available in OS X v10.3 and later.

Declared in SCSICmds_MODE_Definitions.h.

kSBCModePageFlexibleDiskCode

Flexible Disk Page value.

Available in OS X v10.3 and later.

Declared in SCSICmds_MODE_Definitions.h.

kSBCModePageCachingCode

Caching Page value.

Available in OS X v10.3 and later.

Declared in SCSICmds_MODE_Definitions.h.

Discussion

SBC Mode Page definitions.

SPC bitfields

enum {
   kSBCModePageFlexibleDisk_SPC_Mask = 0x0F
};
Constants
kSBCModePageFlexibleDisk_SPC_Mask

Mask for use with SPC field.

Available in OS X v10.3 and later.

Declared in SCSICmds_MODE_Definitions.h.

Discussion

Bit field definitions and masks for Flexible Disk SPC field.

SPC Mode Pages

enum {
   kSPCModePagePowerConditionCode = 0x1A,
   kSPCModePageAllPagesCode = 0x3F
};
Constants
kSPCModePagePowerConditionCode

Power Conditions Mode Page value.

Available in OS X v10.3 and later.

Declared in SCSICmds_MODE_Definitions.h.

kSPCModePageAllPagesCode

All Mode Pages value.

Available in OS X v10.5 and later.

Declared in SCSICmds_MODE_Definitions.h.

Discussion

SPC Mode Page definitions.

TRDY_SSN_MO bitfields

enum {
   // Bits 0:4 Reserved
   kSBCModePageFlexibleDisk_MO_Bit = 5,
   kSBCModePageFlexibleDisk_SSN_Bit = 6,
   kSBCModePageFlexibleDisk_TRDY_Bit = 7,
   kSBCModePageFlexibleDisk_MO_Mask = (
   1 << kSBCModePageFlexibleDisk_MO_Bit),
   kSBCModePageFlexibleDisk_SSN_Mask = (
   1 << kSBCModePageFlexibleDisk_SSN_Bit),
   kSBCModePageFlexibleDisk_TRDY_Mask = (
   1 << kSBCModePageFlexibleDisk_TRDY_Bit)
};
Constants
kSBCModePageFlexibleDisk_MO_Bit

MO Bit definition.

Available in OS X v10.3 and later.

Declared in SCSICmds_MODE_Definitions.h.

kSBCModePageFlexibleDisk_SSN_Bit

SSN Bit definition.

Available in OS X v10.3 and later.

Declared in SCSICmds_MODE_Definitions.h.

kSBCModePageFlexibleDisk_TRDY_Bit

TRDY Bit definition.

Available in OS X v10.3 and later.

Declared in SCSICmds_MODE_Definitions.h.

kSBCModePageFlexibleDisk_MO_Mask

Mask for use with TRDY_SSN_MO field.

Available in OS X v10.3 and later.

Declared in SCSICmds_MODE_Definitions.h.

kSBCModePageFlexibleDisk_SSN_Mask

Mask for use with TRDY_SSN_MO field.

Available in OS X v10.3 and later.

Declared in SCSICmds_MODE_Definitions.h.

kSBCModePageFlexibleDisk_TRDY_Mask

Mask for use with TRDY_SSN_MO field.

Available in OS X v10.3 and later.

Declared in SCSICmds_MODE_Definitions.h.

Discussion

Bit field definitions and masks for Flexible Disk TRDY_SSN_MO field.