Mac OS X Reference Library Apple Developer
Search

SCSICmds_READ_CAPACITY_Definitions.h

Includes:
<IOKit/IOTypes.h>
<CoreFoundation/CoreFoundation.h>

Overview

This file contains all definitions for the data returned from the READ CAPACITY 10 (0x25) and READ CAPACITY 16 (0x9E) commands.



Typedefs

SCSI_Capacity_Data
SCSI_Capacity_Data_Long

SCSI_Capacity_Data



typedef struct SCSI_Capacity_Data { 
    UInt32 RETURNED_LOGICAL_BLOCK_ADDRESS; 
    UInt32 BLOCK_LENGTH_IN_BYTES; 
} SCSI_Capacity_Data;  
Discussion

Capacity return structure for READ CAPACITY 10 command.


SCSI_Capacity_Data_Long



typedef struct SCSI_Capacity_Data_Long { 
    UInt64 RETURNED_LOGICAL_BLOCK_ADDRESS; 
    UInt32 BLOCK_LENGTH_IN_BYTES; 
    UInt8 RTO_EN_PROT_EN; 
    UInt8 Reserved[19]; 
} SCSI_Capacity_Data_Long;  
Discussion

Capacity return structure for READ CAPACITY 16 command.

Enumerated Types

PROTECTION INFORMATION definitions
READ CAPACITY Payload Sizes
RTO_EN definitions

PROTECTION INFORMATION definitions



enum { 
    kREAD_CAPACITY_PROT_Enabled = 0x01, 
    kREAD_CAPACITY_PROT_Disabled = 0x00, 
    kREAD_CAPACITY_PROT_Mask = 0x01 
};  
Constants
kREAD_CAPACITY_PROT_Enabled

Protection Information enabled.

kREAD_CAPACITY_PROT_Disabled

Protection Information disabled.

kREAD_CAPACITY_PROT_Mask

Mask to use when checking the RTO_EN_PROT_EN field.

Discussion

Values for the PROTECTION INFORMATION (PROT_EN) bit in the READ CAPACITY Long Data structure.


READ CAPACITY Payload Sizes



enum { 
    kREPORT_CAPACITY_DataSize = 8, 
    kREPORT_CAPACITY_16_DataSize = 32 
};  
Constants
kREPORT_CAPACITY_DataSize

Data size for a READ_CAPACITY command.

kREPORT_CAPACITY_16_DataSize

Data size for a READ_CAPACITY_16 command.

Discussion

Sizes of the payload for the READ CAPACITY 10 and READ CAPACITY 16 commands.


RTO_EN definitions



enum { 
    kREAD_CAPACITY_RTO_Enabled = 0x02, 
    kREAD_CAPACITY_RTO_Disabled = 0x00, 
    kREAD_CAPACITY_RTO_Mask = 0x02 
};  
Constants
kREAD_CAPACITY_RTO_Enabled

Reference Tag Own enabled.

kREAD_CAPACITY_RTO_Disabled

Reference Tag Own disabled.

kREAD_CAPACITY_RTO_Mask

Mask to use when checking the RTO_EN_PROT_EN field.

Discussion

Values for the REFERENCE TAG OWN (RTO_EN) bit in the READ CAPACITY Long Data structure.

Macro Definitions

kREPORT_CAPACITY_16_MaximumLBA
kREPORT_CAPACITY_MaximumLBA

kREPORT_CAPACITY_16_MaximumLBA



#define kREPORT_CAPACITY_16_MaximumLBA 0xFFFFFFFFFFFFFFFFULL 
Discussion

Maximum LBA supported via READ CAPACITY 16 command.


kREPORT_CAPACITY_MaximumLBA



#define kREPORT_CAPACITY_MaximumLBA 0xFFFFFFFFUL 
Discussion

Maximum LBA supported via READ CAPACITY 10 command.

 

Did this document help you? Yes It's good, but... Not helpful...

Last Updated: 2010-07-29