Chameleon

Chameleon Svn Source Tree

Root/branches/mozodojo/i386/include/IOKit/scsi/SCSICmds_READ_CAPACITY_Definitions.h

1/*
2 * Copyright (c) 1998-2009 Apple Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
11 * file.
12 *
13 * The Original Code and all software distributed under the License are
14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
20 *
21 * @APPLE_LICENSE_HEADER_END@
22 */
23
24#ifndef _IOKIT_SCSI_CMDS_READ_CAPACITY_H_
25#define _IOKIT_SCSI_CMDS_READ_CAPACITY_H_
26
27
28#if KERNEL
29#include <IOKit/IOTypes.h>
30#else
31#include <CoreFoundation/CoreFoundation.h>
32#endif
33
34
35/*! @header SCSI Request Sense Definitions
36@discussion
37This file contains all definitions for the data returned from
38the READ CAPACITY 10 (0x25) and READ CAPACITY 16 (0x9E) commands.
39*/
40
41/*!
42@enum READ CAPACITY Payload Sizes
43@discussion
44Sizes of the payload for the READ CAPACITY 10 and
45READ CAPACITY 16 commands.
46@constant kREPORT_CAPACITY_DataSize
47Data size for a READ_CAPACITY command.
48@constant kREPORT_CAPACITY_16_DataSize
49Data size for a READ_CAPACITY_16 command.
50*/
51enum
52{
53kREPORT_CAPACITY_DataSize= 8,
54kREPORT_CAPACITY_16_DataSize= 32
55};
56
57
58/*!
59@constant kREPORT_CAPACITY_MaximumLBA
60@discussion
61Maximum LBA supported via READ CAPACITY 10 command.
62*/
63#define kREPORT_CAPACITY_MaximumLBA0xFFFFFFFFUL
64
65
66/*!
67@constant kREPORT_CAPACITY_16_MaximumLBA
68@discussion
69Maximum LBA supported via READ CAPACITY 16 command.
70*/
71#define kREPORT_CAPACITY_16_MaximumLBA0xFFFFFFFFFFFFFFFFULL
72
73
74/*!
75@struct SCSI_Capacity_Data
76@discussion
77Capacity return structure for READ CAPACITY 10 command.
78*/
79typedef struct SCSI_Capacity_Data
80{
81UInt32RETURNED_LOGICAL_BLOCK_ADDRESS;
82UInt32BLOCK_LENGTH_IN_BYTES;
83} SCSI_Capacity_Data;
84
85
86/*!
87@struct SCSI_Capacity_Data_Long
88@discussion
89Capacity return structure for READ CAPACITY 16 command.
90*/
91typedef struct SCSI_Capacity_Data_Long
92{
93UInt64RETURNED_LOGICAL_BLOCK_ADDRESS;
94UInt32BLOCK_LENGTH_IN_BYTES;
95UInt8RTO_EN_PROT_EN;
96UInt8Reserved[19];
97} SCSI_Capacity_Data_Long;
98
99
100/*!
101@enum RTO_EN definitions
102@discussion
103Values for the REFERENCE TAG OWN (RTO_EN) bit in the
104READ CAPACITY Long Data structure.
105@constant kREAD_CAPACITY_RTO_Enabled
106Reference Tag Own enabled.
107@constant kREAD_CAPACITY_RTO_Disabled
108Reference Tag Own disabled.
109@constant kREAD_CAPACITY_RTO_Mask
110Mask to use when checking the RTO_EN_PROT_EN field.
111*/
112enum
113{
114kREAD_CAPACITY_RTO_Enabled= 0x02,
115kREAD_CAPACITY_RTO_Disabled= 0x00,
116kREAD_CAPACITY_RTO_Mask= 0x02
117};
118
119
120/*!
121@enum PROTECTION INFORMATION definitions
122@discussion
123Values for the PROTECTION INFORMATION (PROT_EN) bit in the
124READ CAPACITY Long Data structure.
125@constant kREAD_CAPACITY_PROT_Enabled
126Protection Information enabled.
127@constant kREAD_CAPACITY_PROT_Disabled
128Protection Information disabled.
129@constant kREAD_CAPACITY_PROT_Mask
130Mask to use when checking the RTO_EN_PROT_EN field.
131*/
132
133enum
134{
135kREAD_CAPACITY_PROT_Enabled= 0x01,
136kREAD_CAPACITY_PROT_Disabled= 0x00,
137kREAD_CAPACITY_PROT_Mask= 0x01
138};
139
140
141#endif/* _IOKIT_SCSI_CMDS_READ_CAPACITY_H_ */
142

Archive Download this file

Revision: 1232