2
* this header holds data structures as dictated by spec
8
unsigned short config; /* lots of obsolete bit flags */
9
unsigned short cyls; /* Obsolete, "physical" cyls */
10
unsigned short reserved2; /* reserved (word 2) */
11
unsigned short heads; /* Obsolete, "physical" heads */
12
unsigned short track_bytes; /* unformatted bytes per track */
13
unsigned short sector_bytes; /* unformatted bytes per sector */
14
unsigned short sectors; /* Obsolete, "physical" sectors per track */
15
unsigned short vendor0; /* vendor unique */
16
unsigned short vendor1; /* vendor unique */
17
unsigned short vendor2; /* Retired vendor unique */
18
unsigned char serial_no[20]; /* 0 = not_specified */
19
unsigned short buf_type; /* Retired */
20
unsigned short buf_size; /* Retired, 512 byte increments
23
unsigned short ecc_bytes; /* for r/w long cmds; 0 = not_specified */
24
unsigned char fw_rev[8]; /* 0 = not_specified */
25
unsigned char model[40]; /* 0 = not_specified */
26
unsigned char max_multsect; /* 0=not_implemented */
27
unsigned char vendor3; /* vendor unique */
28
unsigned short dword_io; /* 0=not_implemented; 1=implemented */
29
unsigned char vendor4; /* vendor unique */
30
unsigned char capability; /* (upper byte of word 49)
36
unsigned short reserved50; /* reserved (word 50) */
37
unsigned char vendor5; /* Obsolete, vendor unique */
38
unsigned char tPIO; /* Obsolete, 0=slow, 1=medium, 2=fast */
39
unsigned char vendor6; /* Obsolete, vendor unique */
40
unsigned char tDMA; /* Obsolete, 0=slow, 1=medium, 2=fast */
41
unsigned short field_valid; /* (word 53)
43
* 1: eide_ok words 64-70
44
* 0: cur_ok words 54-58
46
unsigned short cur_cyls; /* Obsolete, logical cylinders */
47
unsigned short cur_heads; /* Obsolete, l heads */
48
unsigned short cur_sectors; /* Obsolete, l sectors per track */
49
unsigned short cur_capacity0; /* Obsolete, l total sectors on drive */
50
unsigned short cur_capacity1; /* Obsolete, (2 words, misaligned int) */
51
unsigned char multsect; /* current multiple sector count */
52
unsigned char multsect_valid; /* when (bit0==1) multsect is ok */
53
unsigned int lba_capacity; /* Obsolete, total number of sectors */
54
unsigned short dma_1word; /* Obsolete, single-word dma info */
55
unsigned short dma_mword; /* multiple-word dma info */
56
unsigned short eide_pio_modes; /* bits 0:mode3 1:mode4 */
57
unsigned short eide_dma_min; /* min mword dma cycle time (ns) */
58
unsigned short eide_dma_time; /* recommended mword dma cycle time (ns) */
59
unsigned short eide_pio; /* min cycle time (ns), no IORDY */
60
unsigned short eide_pio_iordy; /* min cycle time (ns), with IORDY */
61
unsigned short words69_70[2]; /* reserved words 69-70
62
* future command overlap and queuing
64
/* HDIO_GET_IDENTITY currently returns only words 0 through 70 */
65
unsigned short words71_74[4]; /* reserved words 71-74
66
* for IDENTIFY PACKET DEVICE command
68
unsigned short queue_depth; /* (word 75)
70
* 4:0 Maximum queue depth -1
72
unsigned short words76_79[4]; /* reserved words 76-79 */
73
unsigned short major_rev_num; /* (word 80) */
74
unsigned short minor_rev_num; /* (word 81) */
75
unsigned short command_set_1; /* (word 82) supported
81
* 10: Host Protected Area
83
* 8: SERVICE Interrupt
84
* 7: Release Interrupt
88
* 3: Power Management Feature Set
89
* 2: Removable Feature Set
90
* 1: Security Feature Set
91
* 0: SMART Feature Set
93
unsigned short command_set_2; /* (word 83)
98
* 11: Device Configuration Overlay
99
* 10: 48-bit Address Feature Set
100
* 9: Automatic Acoustic Management
101
* 8: SET MAX security
102
* 7: reserved 1407DT PARTIES
103
* 6: SetF sub-command Power-Up
104
* 5: Power-Up in Standby Feature Set
105
* 4: Removable Media Notification
108
* 1: READ/WRITE DMA QUEUED
109
* 0: Download MicroCode
111
unsigned short cfsse; /* (word 84)
112
* cmd set-feature supported extensions
116
* 5: General Purpose Logging
117
* 4: Streaming Feature Set
118
* 3: Media Card Pass Through
119
* 2: Media Serial Number Valid
120
* 1: SMART selt-test supported
121
* 0: SMART error logging
123
unsigned short cfs_enable_1; /* (word 85)
124
* command set-feature enabled
130
* 10: Host Protected Area
132
* 8: SERVICE Interrupt
133
* 7: Release Interrupt
137
* 3: Power Management Feature Set
138
* 2: Removable Feature Set
139
* 1: Security Feature Set
140
* 0: SMART Feature Set
142
unsigned short cfs_enable_2; /* (word 86)
143
* command set-feature enabled
146
* 13: FLUSH CACHE EXT
148
* 11: Device Configuration Overlay
149
* 10: 48-bit Address Feature Set
150
* 9: Automatic Acoustic Management
151
* 8: SET MAX security
152
* 7: reserved 1407DT PARTIES
153
* 6: SetF sub-command Power-Up
154
* 5: Power-Up in Standby Feature Set
155
* 4: Removable Media Notification
158
* 1: READ/WRITE DMA QUEUED
159
* 0: Download MicroCode
161
unsigned short csf_default; /* (word 87)
162
* command set-feature default
166
* 5: General Purpose Logging enabled
167
* 4: Valid CONFIGURE STREAM executed
168
* 3: Media Card Pass Through enabled
169
* 2: Media Serial Number Valid
170
* 1: SMART selt-test supported
171
* 0: SMART error logging
173
unsigned short dma_ultra; /* (word 88) */
174
unsigned short trseuc; /* time required for security erase */
175
unsigned short trsEuc; /* time required for enhanced erase */
176
unsigned short CurAPMvalues; /* current APM values */
177
unsigned short mprc; /* master password revision code */
178
unsigned short hw_config; /* hardware config (word 93)
196
unsigned short acoustic; /* (word 94)
197
* 15:8 Vendor's recommended value
200
unsigned short msrqs; /* min stream request size */
201
unsigned short sxfert; /* stream transfer time */
202
unsigned short sal; /* stream access latency */
203
unsigned int spg; /* stream performance granularity */
204
unsigned long long lba_capacity_2;/* 48-bit total number of sectors */
205
unsigned short words104_125[22];/* reserved words 104-125 */
206
unsigned short last_lun; /* (word 126) */
207
unsigned short word127; /* (word 127) Feature Set
208
* Removable Media Notification
210
* 1:0 00 = not supported
215
unsigned short dlf; /* (word 128)
216
* device lock function
218
* 8 security level 1:max 0:high
227
unsigned short csfo; /* (word 129)
228
* current set features options
235
unsigned short words130_155[26];/* reserved vendor words 130-155 */
236
unsigned short word156; /* reserved vendor word 156 */
237
unsigned short words157_159[3];/* reserved vendor words 157-159 */
238
unsigned short cfa_power; /* (word 160) CFA Power Mode
239
* 15 word 160 supported
245
unsigned short words161_175[15];/* Reserved for CFA */
246
unsigned short words176_205[30];/* Current Media Serial Number */
247
unsigned short words206_254[49];/* reserved words 206-254 */
248
unsigned short integrity_word; /* (word 255)
254
struct request_sense {
255
#if defined(CONFIG_BIG_ENDIAN)
258
#elif defined(CONFIG_LITTLE_ENDIAN)
263
#if defined(CONFIG_BIG_ENDIAN)
268
#elif defined(CONFIG_LITTLE_ENDIAN)
284
struct atapi_capacity {