Go to the documentation of this file.
4 #include <linux/types.h>
10 #define HDIO_DRIVE_CMD_HDR_SIZE (4 * sizeof(__u8))
11 #define HDIO_DRIVE_HOB_HDR_SIZE (8 * sizeof(__u8))
12 #define HDIO_DRIVE_TASK_HDR_SIZE (8 * sizeof(__u8))
14 #define IDE_DRIVE_TASK_NO_DATA 0
16 #define IDE_DRIVE_TASK_INVALID -1
17 #define IDE_DRIVE_TASK_SET_XFER 1
18 #define IDE_DRIVE_TASK_IN 2
19 #define IDE_DRIVE_TASK_OUT 3
21 #define IDE_DRIVE_TASK_RAW_WRITE 4
26 #define IDE_TASKFILE_STD_IN_FLAGS 0xFE
27 #define IDE_HOB_STD_IN_FLAGS 0x3C
29 #define IDE_TASKFILE_STD_OUT_FLAGS 0xFE
30 #define IDE_HOB_STD_OUT_FLAGS 0x3C
107 #define TASKFILE_NO_DATA 0x0000
109 #define TASKFILE_IN 0x0001
110 #define TASKFILE_MULTI_IN 0x0002
112 #define TASKFILE_OUT 0x0004
113 #define TASKFILE_MULTI_OUT 0x0008
114 #define TASKFILE_IN_OUT 0x0010
116 #define TASKFILE_IN_DMA 0x0020
117 #define TASKFILE_OUT_DMA 0x0040
118 #define TASKFILE_IN_DMAQ 0x0080
119 #define TASKFILE_OUT_DMAQ 0x0100
122 #define TASKFILE_P_IN 0x0200
123 #define TASKFILE_P_OUT 0x0400
124 #define TASKFILE_P_IN_DMA 0x0800
125 #define TASKFILE_P_OUT_DMA 0x1000
126 #define TASKFILE_P_IN_DMAQ 0x2000
127 #define TASKFILE_P_OUT_DMAQ 0x4000
128 #define TASKFILE_48 0x8000
129 #define TASKFILE_INVALID 0x7fff
138 #define CFA_REQ_EXT_ERROR_CODE 0x03
142 #define WIN_SRST 0x08
143 #define WIN_DEVICE_RESET 0x08
147 #define WIN_RECAL 0x10
148 #define WIN_RESTORE WIN_RECAL
152 #define WIN_READ 0x20
153 #define WIN_READ_ONCE 0x21
154 #define WIN_READ_LONG 0x22
155 #define WIN_READ_LONG_ONCE 0x23
156 #define WIN_READ_EXT 0x24
157 #define WIN_READDMA_EXT 0x25
158 #define WIN_READDMA_QUEUED_EXT 0x26
159 #define WIN_READ_NATIVE_MAX_EXT 0x27
163 #define WIN_MULTREAD_EXT 0x29
167 #define WIN_WRITE 0x30
168 #define WIN_WRITE_ONCE 0x31
169 #define WIN_WRITE_LONG 0x32
170 #define WIN_WRITE_LONG_ONCE 0x33
171 #define WIN_WRITE_EXT 0x34
172 #define WIN_WRITEDMA_EXT 0x35
173 #define WIN_WRITEDMA_QUEUED_EXT 0x36
174 #define WIN_SET_MAX_EXT 0x37
175 #define CFA_WRITE_SECT_WO_ERASE 0x38
176 #define WIN_MULTWRITE_EXT 0x39
180 #define WIN_WRITE_VERIFY 0x3C
184 #define WIN_VERIFY 0x40
185 #define WIN_VERIFY_ONCE 0x41
186 #define WIN_VERIFY_EXT 0x42
190 #define WIN_FORMAT 0x50
194 #define WIN_INIT 0x60
198 #define WIN_SEEK 0x70
200 #define CFA_TRANSLATE_SECTOR 0x87
201 #define WIN_DIAGNOSE 0x90
202 #define WIN_SPECIFY 0x91
203 #define WIN_DOWNLOAD_MICROCODE 0x92
204 #define WIN_STANDBYNOW2 0x94
205 #define WIN_STANDBY2 0x96
206 #define WIN_SETIDLE2 0x97
207 #define WIN_CHECKPOWERMODE2 0x98
208 #define WIN_SLEEPNOW2 0x99
212 #define WIN_PACKETCMD 0xA0
213 #define WIN_PIDENTIFY 0xA1
214 #define WIN_QUEUED_SERVICE 0xA2
215 #define WIN_SMART 0xB0
216 #define CFA_ERASE_SECTORS 0xC0
217 #define WIN_MULTREAD 0xC4
218 #define WIN_MULTWRITE 0xC5
219 #define WIN_SETMULT 0xC6
220 #define WIN_READDMA_QUEUED 0xC7
221 #define WIN_READDMA 0xC8
222 #define WIN_READDMA_ONCE 0xC9
223 #define WIN_WRITEDMA 0xCA
224 #define WIN_WRITEDMA_ONCE 0xCB
225 #define WIN_WRITEDMA_QUEUED 0xCC
226 #define CFA_WRITE_MULTI_WO_ERASE 0xCD
227 #define WIN_GETMEDIASTATUS 0xDA
228 #define WIN_ACKMEDIACHANGE 0xDB
229 #define WIN_POSTBOOT 0xDC
230 #define WIN_PREBOOT 0xDD
231 #define WIN_DOORLOCK 0xDE
232 #define WIN_DOORUNLOCK 0xDF
233 #define WIN_STANDBYNOW1 0xE0
234 #define WIN_IDLEIMMEDIATE 0xE1
235 #define WIN_STANDBY 0xE2
236 #define WIN_SETIDLE1 0xE3
237 #define WIN_READ_BUFFER 0xE4
238 #define WIN_CHECKPOWERMODE1 0xE5
239 #define WIN_SLEEPNOW1 0xE6
240 #define WIN_FLUSH_CACHE 0xE7
241 #define WIN_WRITE_BUFFER 0xE8
242 #define WIN_WRITE_SAME 0xE9
244 #define WIN_FLUSH_CACHE_EXT 0xEA
245 #define WIN_IDENTIFY 0xEC
246 #define WIN_MEDIAEJECT 0xED
247 #define WIN_IDENTIFY_DMA 0xEE
248 #define WIN_SETFEATURES 0xEF
249 #define EXABYTE_ENABLE_NEST 0xF0
250 #define WIN_SECURITY_SET_PASS 0xF1
251 #define WIN_SECURITY_UNLOCK 0xF2
252 #define WIN_SECURITY_ERASE_PREPARE 0xF3
253 #define WIN_SECURITY_ERASE_UNIT 0xF4
254 #define WIN_SECURITY_FREEZE_LOCK 0xF5
255 #define WIN_SECURITY_DISABLE 0xF6
256 #define WIN_READ_NATIVE_MAX 0xF8
257 #define WIN_SET_MAX 0xF9
258 #define DISABLE_SEAGATE 0xFB
262 #define SMART_READ_VALUES 0xD0
263 #define SMART_READ_THRESHOLDS 0xD1
264 #define SMART_AUTOSAVE 0xD2
265 #define SMART_SAVE 0xD3
266 #define SMART_IMMEDIATE_OFFLINE 0xD4
267 #define SMART_READ_LOG_SECTOR 0xD5
268 #define SMART_WRITE_LOG_SECTOR 0xD6
269 #define SMART_WRITE_THRESHOLDS 0xD7
270 #define SMART_ENABLE 0xD8
271 #define SMART_DISABLE 0xD9
272 #define SMART_STATUS 0xDA
273 #define SMART_AUTO_OFFLINE 0xDB
277 #define SMART_LCYL_PASS 0x4F
278 #define SMART_HCYL_PASS 0xC2
281 #define SETFEATURES_EN_8BIT 0x01
282 #define SETFEATURES_EN_WCACHE 0x02
283 #define SETFEATURES_DIS_DEFECT 0x04
284 #define SETFEATURES_EN_APM 0x05
285 #define SETFEATURES_EN_SAME_R 0x22
286 #define SETFEATURES_DIS_MSN 0x31
287 #define SETFEATURES_DIS_RETRY 0x33
288 #define SETFEATURES_EN_AAM 0x42
289 #define SETFEATURES_RW_LONG 0x44
290 #define SETFEATURES_SET_CACHE 0x54
291 #define SETFEATURES_DIS_RLA 0x55
292 #define SETFEATURES_EN_RI 0x5D
293 #define SETFEATURES_EN_SI 0x5E
294 #define SETFEATURES_DIS_RPOD 0x66
295 #define SETFEATURES_DIS_ECC 0x77
296 #define SETFEATURES_DIS_8BIT 0x81
297 #define SETFEATURES_DIS_WCACHE 0x82
298 #define SETFEATURES_EN_DEFECT 0x84
299 #define SETFEATURES_DIS_APM 0x85
300 #define SETFEATURES_EN_ECC 0x88
301 #define SETFEATURES_EN_MSN 0x95
302 #define SETFEATURES_EN_RETRY 0x99
303 #define SETFEATURES_EN_RLA 0xAA
304 #define SETFEATURES_PREFETCH 0xAB
305 #define SETFEATURES_EN_REST 0xAC
306 #define SETFEATURES_4B_RW_LONG 0xBB
307 #define SETFEATURES_DIS_AAM 0xC2
308 #define SETFEATURES_EN_RPOD 0xCC
309 #define SETFEATURES_DIS_RI 0xDD
310 #define SETFEATURES_EN_SAME_M 0xDD
311 #define SETFEATURES_DIS_SI 0xDE
315 #define SECURITY_SET_PASSWORD 0xBA
316 #define SECURITY_UNLOCK 0xBB
317 #define SECURITY_ERASE_PREPARE 0xBC
318 #define SECURITY_ERASE_UNIT 0xBD
319 #define SECURITY_FREEZE_LOCK 0xBE
320 #define SECURITY_DISABLE_PASSWORD 0xBF
331 #define HDIO_GETGEO 0x0301
332 #define HDIO_GET_UNMASKINTR 0x0302
333 #define HDIO_GET_MULTCOUNT 0x0304
334 #define HDIO_GET_QDMA 0x0305
336 #define HDIO_SET_XFER 0x0306
338 #define HDIO_OBSOLETE_IDENTITY 0x0307
339 #define HDIO_GET_KEEPSETTINGS 0x0308
340 #define HDIO_GET_32BIT 0x0309
341 #define HDIO_GET_NOWERR 0x030a
342 #define HDIO_GET_DMA 0x030b
343 #define HDIO_GET_NICE 0x030c
344 #define HDIO_GET_IDENTITY 0x030d
345 #define HDIO_GET_WCACHE 0x030e
346 #define HDIO_GET_ACOUSTIC 0x030f
347 #define HDIO_GET_ADDRESS 0x0310
349 #define HDIO_GET_BUSSTATE 0x031a
350 #define HDIO_TRISTATE_HWIF 0x031b
351 #define HDIO_DRIVE_RESET 0x031c
352 #define HDIO_DRIVE_TASKFILE 0x031d
353 #define HDIO_DRIVE_TASK 0x031e
354 #define HDIO_DRIVE_CMD 0x031f
355 #define HDIO_DRIVE_CMD_AEB HDIO_DRIVE_TASK
358 #define HDIO_SET_MULTCOUNT 0x0321
359 #define HDIO_SET_UNMASKINTR 0x0322
360 #define HDIO_SET_KEEPSETTINGS 0x0323
361 #define HDIO_SET_32BIT 0x0324
362 #define HDIO_SET_NOWERR 0x0325
363 #define HDIO_SET_DMA 0x0326
364 #define HDIO_SET_PIO_MODE 0x0327
366 #define HDIO_SCAN_HWIF 0x0328
367 #define HDIO_UNREGISTER_HWIF 0x032a
369 #define HDIO_SET_NICE 0x0329
370 #define HDIO_SET_WCACHE 0x032b
371 #define HDIO_SET_ACOUSTIC 0x032c
372 #define HDIO_SET_BUSSTATE 0x032d
373 #define HDIO_SET_QDMA 0x032e
374 #define HDIO_SET_ADDRESS 0x032f
389 #define __NEW_HD_DRIVE_ID
650 #define IDE_NICE_DSC_OVERLAP (0)
651 #define IDE_NICE_ATAPI_OVERLAP (1)
652 #define IDE_NICE_1 (3)
654 #define IDE_NICE_0 (2)
655 #define IDE_NICE_2 (4)