| 1 | #ifndef _LINUX_HDREG_H
|
| 2 | #define _LINUX_HDREG_H
|
| 3 |
|
| 4 | #include <linux/types.h>
|
| 5 |
|
| 6 | |
| 7 | * Command Header sizes for IOCTL commands
|
| 8 |
|
| 9 |
|
| 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))
|
| 13 |
|
| 14 | #define IDE_DRIVE_TASK_NO_DATA 0
|
| 15 | #ifndef __KERNEL__
|
| 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
|
| 20 | #endif
|
| 21 | #define IDE_DRIVE_TASK_RAW_WRITE 4
|
| 22 |
|
| 23 | |
| 24 | * Define standard taskfile in/out register
|
| 25 |
|
| 26 | #define IDE_TASKFILE_STD_IN_FLAGS 0xFE
|
| 27 | #define IDE_HOB_STD_IN_FLAGS 0x3C
|
| 28 | #ifndef __KERNEL__
|
| 29 | #define IDE_TASKFILE_STD_OUT_FLAGS 0xFE
|
| 30 | #define IDE_HOB_STD_OUT_FLAGS 0x3C
|
| 31 |
|
| 32 | typedef unsigned char task_ioreg_t;
|
| 33 | typedef unsigned long sata_ioreg_t;
|
| 34 | #endif
|
| 35 |
|
| 36 | typedef union ide_reg_valid_s {
|
| 37 | unsigned all : 16;
|
| 38 | struct {
|
| 39 | unsigned data : 1;
|
| 40 | unsigned error_feature : 1;
|
| 41 | unsigned sector : 1;
|
| 42 | unsigned nsector : 1;
|
| 43 | unsigned lcyl : 1;
|
| 44 | unsigned hcyl : 1;
|
| 45 | unsigned select : 1;
|
| 46 | unsigned status_command : 1;
|
| 47 |
|
| 48 | unsigned data_hob : 1;
|
| 49 | unsigned error_feature_hob : 1;
|
| 50 | unsigned sector_hob : 1;
|
| 51 | unsigned nsector_hob : 1;
|
| 52 | unsigned lcyl_hob : 1;
|
| 53 | unsigned hcyl_hob : 1;
|
| 54 | unsigned select_hob : 1;
|
| 55 | unsigned control_hob : 1;
|
| 56 | } b;
|
| 57 | } ide_reg_valid_t;
|
| 58 |
|
| 59 | typedef struct ide_task_request_s {
|
| 60 | __u8 io_ports[8];
|
| 61 | __u8 hob_ports[8];
|
| 62 | ide_reg_valid_t out_flags;
|
| 63 | ide_reg_valid_t in_flags;
|
| 64 | int data_phase;
|
| 65 | int req_cmd;
|
| 66 | unsigned long out_size;
|
| 67 | unsigned long in_size;
|
| 68 | } ide_task_request_t;
|
| 69 |
|
| 70 | typedef struct ide_ioctl_request_s {
|
| 71 | ide_task_request_t *task_request;
|
| 72 | unsigned char *out_buffer;
|
| 73 | unsigned char *in_buffer;
|
| 74 | } ide_ioctl_request_t;
|
| 75 |
|
| 76 | struct hd_drive_cmd_hdr {
|
| 77 | __u8 command;
|
| 78 | __u8 sector_number;
|
| 79 | __u8 feature;
|
| 80 | __u8 sector_count;
|
| 81 | };
|
| 82 |
|
| 83 | #ifndef __KERNEL__
|
| 84 | typedef struct hd_drive_task_hdr {
|
| 85 | __u8 data;
|
| 86 | __u8 feature;
|
| 87 | __u8 sector_count;
|
| 88 | __u8 sector_number;
|
| 89 | __u8 low_cylinder;
|
| 90 | __u8 high_cylinder;
|
| 91 | __u8 device_head;
|
| 92 | __u8 command;
|
| 93 | } task_struct_t;
|
| 94 |
|
| 95 | typedef struct hd_drive_hob_hdr {
|
| 96 | __u8 data;
|
| 97 | __u8 feature;
|
| 98 | __u8 sector_count;
|
| 99 | __u8 sector_number;
|
| 100 | __u8 low_cylinder;
|
| 101 | __u8 high_cylinder;
|
| 102 | __u8 device_head;
|
| 103 | __u8 control;
|
| 104 | } hob_struct_t;
|
| 105 | #endif
|
| 106 |
|
| 107 | #define TASKFILE_NO_DATA 0x0000
|
| 108 |
|
| 109 | #define TASKFILE_IN 0x0001
|
| 110 | #define TASKFILE_MULTI_IN 0x0002
|
| 111 |
|
| 112 | #define TASKFILE_OUT 0x0004
|
| 113 | #define TASKFILE_MULTI_OUT 0x0008
|
| 114 | #define TASKFILE_IN_OUT 0x0010
|
| 115 |
|
| 116 | #define TASKFILE_IN_DMA 0x0020
|
| 117 | #define TASKFILE_OUT_DMA 0x0040
|
| 118 | #define TASKFILE_IN_DMAQ 0x0080
|
| 119 | #define TASKFILE_OUT_DMAQ 0x0100
|
| 120 |
|
| 121 | #ifndef __KERNEL__
|
| 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
|
| 130 | #endif
|
| 131 |
|
| 132 | #ifndef __KERNEL__
|
| 133 |
|
| 134 | #define WIN_NOP 0x00
|
| 135 | |
| 136 | * 0x01->0x02 Reserved
|
| 137 |
|
| 138 | #define CFA_REQ_EXT_ERROR_CODE 0x03
|
| 139 | |
| 140 | * 0x04->0x07 Reserved
|
| 141 |
|
| 142 | #define WIN_SRST 0x08
|
| 143 | #define WIN_DEVICE_RESET 0x08
|
| 144 | |
| 145 | * 0x09->0x0F Reserved
|
| 146 |
|
| 147 | #define WIN_RECAL 0x10
|
| 148 | #define WIN_RESTORE WIN_RECAL
|
| 149 | |
| 150 | * 0x10->0x1F Reserved
|
| 151 |
|
| 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
|
| 160 | |
| 161 | * 0x28
|
| 162 |
|
| 163 | #define WIN_MULTREAD_EXT 0x29
|
| 164 | |
| 165 | * 0x2A->0x2F Reserved
|
| 166 |
|
| 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
|
| 177 | |
| 178 | * 0x3A->0x3B Reserved
|
| 179 |
|
| 180 | #define WIN_WRITE_VERIFY 0x3C
|
| 181 | |
| 182 | * 0x3D->0x3F Reserved
|
| 183 |
|
| 184 | #define WIN_VERIFY 0x40
|
| 185 | #define WIN_VERIFY_ONCE 0x41
|
| 186 | #define WIN_VERIFY_EXT 0x42
|
| 187 | |
| 188 | * 0x43->0x4F Reserved
|
| 189 |
|
| 190 | #define WIN_FORMAT 0x50
|
| 191 | |
| 192 | * 0x51->0x5F Reserved
|
| 193 |
|
| 194 | #define WIN_INIT 0x60
|
| 195 | |
| 196 | * 0x61->0x5F Reserved
|
| 197 |
|
| 198 | #define WIN_SEEK 0x70
|
| 199 |
|
| 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
|
| 209 | |
| 210 | * 0x9A VENDOR
|
| 211 |
|
| 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
|
| 243 |
|
| 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
|
| 259 |
|
| 260 |
|
| 261 |
|
| 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
|
| 274 |
|
| 275 |
|
| 276 |
|
| 277 | #define SMART_LCYL_PASS 0x4F
|
| 278 | #define SMART_HCYL_PASS 0xC2
|
| 279 |
|
| 280 |
|
| 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
|
| 312 |
|
| 313 |
|
| 314 |
|
| 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
|
| 321 | #endif
|
| 322 |
|
| 323 | struct hd_geometry {
|
| 324 | unsigned char heads;
|
| 325 | unsigned char sectors;
|
| 326 | unsigned short cylinders;
|
| 327 | unsigned long start;
|
| 328 | };
|
| 329 |
|
| 330 |
|
| 331 | #define HDIO_GETGEO 0x0301
|
| 332 | #define HDIO_GET_UNMASKINTR 0x0302
|
| 333 | #define HDIO_GET_MULTCOUNT 0x0304
|
| 334 | #define HDIO_GET_QDMA 0x0305
|
| 335 |
|
| 336 | #define HDIO_SET_XFER 0x0306
|
| 337 |
|
| 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
|
| 348 |
|
| 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
|
| 356 |
|
| 357 |
|
| 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
|
| 365 | #ifndef __KERNEL__
|
| 366 | #define HDIO_SCAN_HWIF 0x0328
|
| 367 | #define HDIO_UNREGISTER_HWIF 0x032a
|
| 368 | #endif
|
| 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
|
| 375 |
|
| 376 |
|
| 377 | enum {
|
| 378 | BUSSTATE_OFF = 0,
|
| 379 | BUSSTATE_ON,
|
| 380 | BUSSTATE_TRISTATE
|
| 381 | };
|
| 382 |
|
| 383 |
|
| 384 |
|
| 385 |
|
| 386 |
|
| 387 |
|
| 388 |
|
| 389 | #define __NEW_HD_DRIVE_ID
|
| 390 |
|
| 391 | #ifndef __KERNEL__
|
| 392 | |
| 393 | * Structure returned by HDIO_GET_IDENTITY, as per ANSI NCITS ATA6 rev.1b spec.
|
| 394 | *
|
| 395 | * If you change something here, please remember to update fix_driveid() in
|
| 396 | * ide/probe.c.
|
| 397 |
|
| 398 | struct hd_driveid {
|
| 399 | unsigned short config;
|
| 400 | unsigned short cyls;
|
| 401 | unsigned short reserved2;
|
| 402 | unsigned short heads;
|
| 403 | unsigned short track_bytes;
|
| 404 | unsigned short sector_bytes;
|
| 405 | unsigned short sectors;
|
| 406 | unsigned short vendor0;
|
| 407 | unsigned short vendor1;
|
| 408 | unsigned short vendor2;
|
| 409 | unsigned char serial_no[20];
|
| 410 | unsigned short buf_type;
|
| 411 | unsigned short buf_size; |
| 412 | * 0 = not_specified
|
| 413 |
|
| 414 | unsigned short ecc_bytes;
|
| 415 | unsigned char fw_rev[8];
|
| 416 | unsigned char model[40];
|
| 417 | unsigned char max_multsect;
|
| 418 | unsigned char vendor3;
|
| 419 | unsigned short dword_io;
|
| 420 | unsigned char vendor4;
|
| 421 | unsigned char capability; |
| 422 | * 3: IORDYsup
|
| 423 | * 2: IORDYsw
|
| 424 | * 1: LBA
|
| 425 | * 0: DMA
|
| 426 |
|
| 427 | unsigned short reserved50;
|
| 428 | unsigned char vendor5;
|
| 429 | unsigned char tPIO;
|
| 430 | unsigned char vendor6;
|
| 431 | unsigned char tDMA;
|
| 432 | unsigned short field_valid; |
| 433 | * 2: ultra_ok word 88
|
| 434 | * 1: eide_ok words 64-70
|
| 435 | * 0: cur_ok words 54-58
|
| 436 |
|
| 437 | unsigned short cur_cyls;
|
| 438 | unsigned short cur_heads;
|
| 439 | unsigned short cur_sectors;
|
| 440 | unsigned short cur_capacity0;
|
| 441 | unsigned short cur_capacity1;
|
| 442 | unsigned char multsect;
|
| 443 | unsigned char multsect_valid;
|
| 444 | unsigned int lba_capacity;
|
| 445 | unsigned short dma_1word;
|
| 446 | unsigned short dma_mword;
|
| 447 | unsigned short eide_pio_modes;
|
| 448 | unsigned short eide_dma_min;
|
| 449 | unsigned short eide_dma_time;
|
| 450 | unsigned short eide_pio;
|
| 451 | unsigned short eide_pio_iordy;
|
| 452 | unsigned short words69_70[2]; |
| 453 | * future command overlap and queuing
|
| 454 |
|
| 455 | unsigned short words71_74[4]; |
| 456 | * for IDENTIFY PACKET DEVICE command
|
| 457 |
|
| 458 | unsigned short queue_depth; |
| 459 | * 15:5 reserved
|
| 460 | * 4:0 Maximum queue depth -1
|
| 461 |
|
| 462 | unsigned short words76_79[4];
|
| 463 | unsigned short major_rev_num;
|
| 464 | unsigned short minor_rev_num;
|
| 465 | unsigned short command_set_1; |
| 466 | * 15: Obsolete
|
| 467 | * 14: NOP command
|
| 468 | * 13: READ_BUFFER
|
| 469 | * 12: WRITE_BUFFER
|
| 470 | * 11: Obsolete
|
| 471 | * 10: Host Protected Area
|
| 472 | * 9: DEVICE Reset
|
| 473 | * 8: SERVICE Interrupt
|
| 474 | * 7: Release Interrupt
|
| 475 | * 6: look-ahead
|
| 476 | * 5: write cache
|
| 477 | * 4: PACKET Command
|
| 478 | * 3: Power Management Feature Set
|
| 479 | * 2: Removable Feature Set
|
| 480 | * 1: Security Feature Set
|
| 481 | * 0: SMART Feature Set
|
| 482 |
|
| 483 | unsigned short command_set_2; |
| 484 | * 15: Shall be ZERO
|
| 485 | * 14: Shall be ONE
|
| 486 | * 13: FLUSH CACHE EXT
|
| 487 | * 12: FLUSH CACHE
|
| 488 | * 11: Device Configuration Overlay
|
| 489 | * 10: 48-bit Address Feature Set
|
| 490 | * 9: Automatic Acoustic Management
|
| 491 | * 8: SET MAX security
|
| 492 | * 7: reserved 1407DT PARTIES
|
| 493 | * 6: SetF sub-command Power-Up
|
| 494 | * 5: Power-Up in Standby Feature Set
|
| 495 | * 4: Removable Media Notification
|
| 496 | * 3: APM Feature Set
|
| 497 | * 2: CFA Feature Set
|
| 498 | * 1: READ/WRITE DMA QUEUED
|
| 499 | * 0: Download MicroCode
|
| 500 |
|
| 501 | unsigned short cfsse; |
| 502 | * cmd set-feature supported extensions
|
| 503 | * 15: Shall be ZERO
|
| 504 | * 14: Shall be ONE
|
| 505 | * 13:6 reserved
|
| 506 | * 5: General Purpose Logging
|
| 507 | * 4: Streaming Feature Set
|
| 508 | * 3: Media Card Pass Through
|
| 509 | * 2: Media Serial Number Valid
|
| 510 | * 1: SMART selt-test supported
|
| 511 | * 0: SMART error logging
|
| 512 |
|
| 513 | unsigned short cfs_enable_1; |
| 514 | * command set-feature enabled
|
| 515 | * 15: Obsolete
|
| 516 | * 14: NOP command
|
| 517 | * 13: READ_BUFFER
|
| 518 | * 12: WRITE_BUFFER
|
| 519 | * 11: Obsolete
|
| 520 | * 10: Host Protected Area
|
| 521 | * 9: DEVICE Reset
|
| 522 | * 8: SERVICE Interrupt
|
| 523 | * 7: Release Interrupt
|
| 524 | * 6: look-ahead
|
| 525 | * 5: write cache
|
| 526 | * 4: PACKET Command
|
| 527 | * 3: Power Management Feature Set
|
| 528 | * 2: Removable Feature Set
|
| 529 | * 1: Security Feature Set
|
| 530 | * 0: SMART Feature Set
|
| 531 |
|
| 532 | unsigned short cfs_enable_2; |
| 533 | * command set-feature enabled
|
| 534 | * 15: Shall be ZERO
|
| 535 | * 14: Shall be ONE
|
| 536 | * 13: FLUSH CACHE EXT
|
| 537 | * 12: FLUSH CACHE
|
| 538 | * 11: Device Configuration Overlay
|
| 539 | * 10: 48-bit Address Feature Set
|
| 540 | * 9: Automatic Acoustic Management
|
| 541 | * 8: SET MAX security
|
| 542 | * 7: reserved 1407DT PARTIES
|
| 543 | * 6: SetF sub-command Power-Up
|
| 544 | * 5: Power-Up in Standby Feature Set
|
| 545 | * 4: Removable Media Notification
|
| 546 | * 3: APM Feature Set
|
| 547 | * 2: CFA Feature Set
|
| 548 | * 1: READ/WRITE DMA QUEUED
|
| 549 | * 0: Download MicroCode
|
| 550 |
|
| 551 | unsigned short csf_default; |
| 552 | * command set-feature default
|
| 553 | * 15: Shall be ZERO
|
| 554 | * 14: Shall be ONE
|
| 555 | * 13:6 reserved
|
| 556 | * 5: General Purpose Logging enabled
|
| 557 | * 4: Valid CONFIGURE STREAM executed
|
| 558 | * 3: Media Card Pass Through enabled
|
| 559 | * 2: Media Serial Number Valid
|
| 560 | * 1: SMART selt-test supported
|
| 561 | * 0: SMART error logging
|
| 562 |
|
| 563 | unsigned short dma_ultra;
|
| 564 | unsigned short trseuc;
|
| 565 | unsigned short trsEuc;
|
| 566 | unsigned short CurAPMvalues;
|
| 567 | unsigned short mprc;
|
| 568 | unsigned short hw_config; |
| 569 | * 15: Shall be ZERO
|
| 570 | * 14: Shall be ONE
|
| 571 | * 13:
|
| 572 | * 12:
|
| 573 | * 11:
|
| 574 | * 10:
|
| 575 | * 9:
|
| 576 | * 8:
|
| 577 | * 7:
|
| 578 | * 6:
|
| 579 | * 5:
|
| 580 | * 4:
|
| 581 | * 3:
|
| 582 | * 2:
|
| 583 | * 1:
|
| 584 | * 0: Shall be ONE
|
| 585 |
|
| 586 | unsigned short acoustic; |
| 587 | * 15:8 Vendor's recommended value
|
| 588 | * 7:0 current value
|
| 589 |
|
| 590 | unsigned short msrqs;
|
| 591 | unsigned short sxfert;
|
| 592 | unsigned short sal;
|
| 593 | unsigned int spg;
|
| 594 | unsigned long long lba_capacity_2;
|
| 595 | unsigned short words104_125[22];
|
| 596 | unsigned short last_lun;
|
| 597 | unsigned short word127; |
| 598 | * Removable Media Notification
|
| 599 | * 15:2 reserved
|
| 600 | * 1:0 00 = not supported
|
| 601 | * 01 = supported
|
| 602 | * 10 = reserved
|
| 603 | * 11 = reserved
|
| 604 |
|
| 605 | unsigned short dlf; |
| 606 | * device lock function
|
| 607 | * 15:9 reserved
|
| 608 | * 8 security level 1:max 0:high
|
| 609 | * 7:6 reserved
|
| 610 | * 5 enhanced erase
|
| 611 | * 4 expire
|
| 612 | * 3 frozen
|
| 613 | * 2 locked
|
| 614 | * 1 en/disabled
|
| 615 | * 0 capability
|
| 616 |
|
| 617 | unsigned short csfo; |
| 618 | * current set features options
|
| 619 | * 15:4 reserved
|
| 620 | * 3: auto reassign
|
| 621 | * 2: reverting
|
| 622 | * 1: read-look-ahead
|
| 623 | * 0: write cache
|
| 624 |
|
| 625 | unsigned short words130_155[26];
|
| 626 | unsigned short word156;
|
| 627 | unsigned short words157_159[3];
|
| 628 | unsigned short cfa_power; |
| 629 | * 15 word 160 supported
|
| 630 | * 14 reserved
|
| 631 | * 13
|
| 632 | * 12
|
| 633 | * 11:0
|
| 634 |
|
| 635 | unsigned short words161_175[15];
|
| 636 | unsigned short words176_205[30];
|
| 637 | unsigned short words206_254[49];
|
| 638 | unsigned short integrity_word; |
| 639 | * 15:8 Checksum
|
| 640 | * 7:0 Signature
|
| 641 |
|
| 642 | };
|
| 643 | #endif
|
| 644 |
|
| 645 | |
| 646 | * IDE "nice" flags. These are used on a per drive basis to determine
|
| 647 | * when to be nice and give more bandwidth to the other devices which
|
| 648 | * share the same IDE bus.
|
| 649 |
|
| 650 | #define IDE_NICE_DSC_OVERLAP (0)
|
| 651 | #define IDE_NICE_ATAPI_OVERLAP (1)
|
| 652 | #define IDE_NICE_1 (3)
|
| 653 | #ifndef __KERNEL__
|
| 654 | #define IDE_NICE_0 (2)
|
| 655 | #define IDE_NICE_2 (4)
|
| 656 | #endif
|
| 657 |
|
| 658 | #endif
|