source: svn/trunk/newcon3bcm2_21bu/toolchain/mips-linux-uclibc/include/linux/hdreg.h

Last change on this file was 2, checked in by jglee, 11 years ago

first commit

  • Property svn:executable set to *
File size: 22.5 KB
Line 
1#ifndef _LINUX_HDREG_H
2#define _LINUX_HDREG_H
3
4#include <asm/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_INVALID          -1
15#define IDE_DRIVE_TASK_NO_DATA          0
16#define IDE_DRIVE_TASK_SET_XFER         1
17
18#define IDE_DRIVE_TASK_IN               2
19
20#define IDE_DRIVE_TASK_OUT              3
21#define IDE_DRIVE_TASK_RAW_WRITE        4
22
23/*
24 * Define standard taskfile in/out register
25 */
26#define IDE_TASKFILE_STD_OUT_FLAGS      0xFE
27#define IDE_TASKFILE_STD_IN_FLAGS       0xFE
28#define IDE_HOB_STD_OUT_FLAGS           0x3C
29#define IDE_HOB_STD_IN_FLAGS            0x3C
30
31typedef unsigned char task_ioreg_t;
32typedef unsigned long sata_ioreg_t;
33
34typedef union ide_reg_valid_s {
35        unsigned all                            : 16;
36        struct {
37                unsigned data                   : 1;
38                unsigned error_feature          : 1;
39                unsigned sector                 : 1;
40                unsigned nsector                : 1;
41                unsigned lcyl                   : 1;
42                unsigned hcyl                   : 1;
43                unsigned select                 : 1;
44                unsigned status_command         : 1;
45
46                unsigned data_hob               : 1;
47                unsigned error_feature_hob      : 1;
48                unsigned sector_hob             : 1;
49                unsigned nsector_hob            : 1;
50                unsigned lcyl_hob               : 1;
51                unsigned hcyl_hob               : 1;
52                unsigned select_hob             : 1;
53                unsigned control_hob            : 1;
54        } b;
55} ide_reg_valid_t;
56
57typedef struct ide_task_request_s {
58        task_ioreg_t    io_ports[8];
59        task_ioreg_t    hob_ports[8];
60        ide_reg_valid_t out_flags;
61        ide_reg_valid_t in_flags;
62        int             data_phase;
63        int             req_cmd;
64        unsigned long   out_size;
65        unsigned long   in_size;
66} ide_task_request_t;
67
68typedef struct ide_ioctl_request_s {
69        ide_task_request_t      *task_request;
70        unsigned char           *out_buffer;
71        unsigned char           *in_buffer;
72} ide_ioctl_request_t;
73
74struct hd_drive_cmd_hdr {
75        task_ioreg_t command;
76        task_ioreg_t sector_number;
77        task_ioreg_t feature;
78        task_ioreg_t sector_count;
79};
80
81typedef struct hd_drive_task_hdr {
82        task_ioreg_t data;
83        task_ioreg_t feature;
84        task_ioreg_t sector_count;
85        task_ioreg_t sector_number;
86        task_ioreg_t low_cylinder;
87        task_ioreg_t high_cylinder;
88        task_ioreg_t device_head;
89        task_ioreg_t command;
90} task_struct_t;
91
92typedef struct hd_drive_hob_hdr {
93        task_ioreg_t data;
94        task_ioreg_t feature;
95        task_ioreg_t sector_count;
96        task_ioreg_t sector_number;
97        task_ioreg_t low_cylinder;
98        task_ioreg_t high_cylinder;
99        task_ioreg_t device_head;
100        task_ioreg_t control;
101} hob_struct_t;
102
103#define TASKFILE_INVALID                0x7fff
104#define TASKFILE_48                     0x8000
105
106#define TASKFILE_NO_DATA                0x0000
107
108#define TASKFILE_IN                     0x0001
109#define TASKFILE_MULTI_IN               0x0002
110
111#define TASKFILE_OUT                    0x0004
112#define TASKFILE_MULTI_OUT              0x0008
113#define TASKFILE_IN_OUT                 0x0010
114
115#define TASKFILE_IN_DMA                 0x0020
116#define TASKFILE_OUT_DMA                0x0040
117#define TASKFILE_IN_DMAQ                0x0080
118#define TASKFILE_OUT_DMAQ               0x0100
119
120#define TASKFILE_P_IN                   0x0200
121#define TASKFILE_P_OUT                  0x0400
122#define TASKFILE_P_IN_DMA               0x0800
123#define TASKFILE_P_OUT_DMA              0x1000
124#define TASKFILE_P_IN_DMAQ              0x2000
125#define TASKFILE_P_OUT_DMAQ             0x4000
126
127/* ATA/ATAPI Commands pre T13 Spec */
128#define WIN_NOP                         0x00
129/*
130 *      0x01->0x02 Reserved
131 */
132#define CFA_REQ_EXT_ERROR_CODE          0x03 /* CFA Request Extended Error Code */
133/*
134 *      0x04->0x07 Reserved
135 */
136#define WIN_SRST                        0x08 /* ATAPI soft reset command */
137#define WIN_DEVICE_RESET                0x08
138/*
139 *      0x09->0x0F Reserved
140 */
141#define WIN_RECAL                       0x10
142#define WIN_RESTORE                     WIN_RECAL
143/*
144 *      0x10->0x1F Reserved
145 */
146#define WIN_READ                        0x20 /* 28-Bit */
147#define WIN_READ_ONCE                   0x21 /* 28-Bit without retries */
148#define WIN_READ_LONG                   0x22 /* 28-Bit */
149#define WIN_READ_LONG_ONCE              0x23 /* 28-Bit without retries */
150#define WIN_READ_EXT                    0x24 /* 48-Bit */
151#define WIN_READDMA_EXT                 0x25 /* 48-Bit */
152#define WIN_READDMA_QUEUED_EXT          0x26 /* 48-Bit */
153#define WIN_READ_NATIVE_MAX_EXT         0x27 /* 48-Bit */
154/*
155 *      0x28
156 */
157#define WIN_MULTREAD_EXT                0x29 /* 48-Bit */
158/*
159 *      0x2A->0x2F Reserved
160 */
161#define WIN_WRITE                       0x30 /* 28-Bit */
162#define WIN_WRITE_ONCE                  0x31 /* 28-Bit without retries */
163#define WIN_WRITE_LONG                  0x32 /* 28-Bit */
164#define WIN_WRITE_LONG_ONCE             0x33 /* 28-Bit without retries */
165#define WIN_WRITE_EXT                   0x34 /* 48-Bit */
166#define WIN_WRITEDMA_EXT                0x35 /* 48-Bit */
167#define WIN_WRITEDMA_QUEUED_EXT         0x36 /* 48-Bit */
168#define WIN_SET_MAX_EXT                 0x37 /* 48-Bit */
169#define CFA_WRITE_SECT_WO_ERASE         0x38 /* CFA Write Sectors without erase */
170#define WIN_MULTWRITE_EXT               0x39 /* 48-Bit */
171/*
172 *      0x3A->0x3B Reserved
173 */
174#define WIN_WRITE_VERIFY                0x3C /* 28-Bit */
175/*
176 *      0x3D->0x3F Reserved
177 */
178#define WIN_VERIFY                      0x40 /* 28-Bit - Read Verify Sectors */
179#define WIN_VERIFY_ONCE                 0x41 /* 28-Bit - without retries */
180#define WIN_VERIFY_EXT                  0x42 /* 48-Bit */
181/*
182 *      0x43->0x4F Reserved
183 */
184#define WIN_FORMAT                      0x50
185/*
186 *      0x51->0x5F Reserved
187 */
188#define WIN_INIT                        0x60
189/*
190 *      0x61->0x5F Reserved
191 */
192#define WIN_SEEK                        0x70 /* 0x70-0x7F Reserved */
193
194#define CFA_TRANSLATE_SECTOR            0x87 /* CFA Translate Sector */
195#define WIN_DIAGNOSE                    0x90
196#define WIN_SPECIFY                     0x91 /* set drive geometry translation */
197#define WIN_DOWNLOAD_MICROCODE          0x92
198#define WIN_STANDBYNOW2                 0x94
199#define WIN_STANDBY2                    0x96
200#define WIN_SETIDLE2                    0x97
201#define WIN_CHECKPOWERMODE2             0x98
202#define WIN_SLEEPNOW2                   0x99
203/*
204 *      0x9A VENDOR
205 */
206#define WIN_PACKETCMD                   0xA0 /* Send a packet command. */
207#define WIN_PIDENTIFY                   0xA1 /* identify ATAPI device   */
208#define WIN_QUEUED_SERVICE              0xA2
209#define WIN_SMART                       0xB0 /* self-monitoring and reporting */
210#define CFA_ERASE_SECTORS               0xC0
211#define WIN_MULTREAD                    0xC4 /* read sectors using multiple mode*/
212#define WIN_MULTWRITE                   0xC5 /* write sectors using multiple mode */
213#define WIN_SETMULT                     0xC6 /* enable/disable multiple mode */
214#define WIN_READDMA_QUEUED              0xC7 /* read sectors using Queued DMA transfers */
215#define WIN_READDMA                     0xC8 /* read sectors using DMA transfers */
216#define WIN_READDMA_ONCE                0xC9 /* 28-Bit - without retries */
217#define WIN_WRITEDMA                    0xCA /* write sectors using DMA transfers */
218#define WIN_WRITEDMA_ONCE               0xCB /* 28-Bit - without retries */
219#define WIN_WRITEDMA_QUEUED             0xCC /* write sectors using Queued DMA transfers */
220#define CFA_WRITE_MULTI_WO_ERASE        0xCD /* CFA Write multiple without erase */
221#define WIN_GETMEDIASTATUS              0xDA
222#define WIN_ACKMEDIACHANGE              0xDB /* ATA-1, ATA-2 vendor */
223#define WIN_POSTBOOT                    0xDC
224#define WIN_PREBOOT                     0xDD
225#define WIN_DOORLOCK                    0xDE /* lock door on removable drives */
226#define WIN_DOORUNLOCK                  0xDF /* unlock door on removable drives */
227#define WIN_STANDBYNOW1                 0xE0
228#define WIN_IDLEIMMEDIATE               0xE1 /* force drive to become "ready" */
229#define WIN_STANDBY                     0xE2 /* Set device in Standby Mode */
230#define WIN_SETIDLE1                    0xE3
231#define WIN_READ_BUFFER                 0xE4 /* force read only 1 sector */
232#define WIN_CHECKPOWERMODE1             0xE5
233#define WIN_SLEEPNOW1                   0xE6
234#define WIN_FLUSH_CACHE                 0xE7
235#define WIN_WRITE_BUFFER                0xE8 /* force write only 1 sector */
236#define WIN_WRITE_SAME                  0xE9 /* read ata-2 to use */
237        /* SET_FEATURES 0x22 or 0xDD */
238#define WIN_FLUSH_CACHE_EXT             0xEA /* 48-Bit */
239#define WIN_IDENTIFY                    0xEC /* ask drive to identify itself    */
240#define WIN_MEDIAEJECT                  0xED
241#define WIN_IDENTIFY_DMA                0xEE /* same as WIN_IDENTIFY, but DMA */
242#define WIN_SETFEATURES                 0xEF /* set special drive features */
243#define EXABYTE_ENABLE_NEST             0xF0
244#define WIN_SECURITY_SET_PASS           0xF1
245#define WIN_SECURITY_UNLOCK             0xF2
246#define WIN_SECURITY_ERASE_PREPARE      0xF3
247#define WIN_SECURITY_ERASE_UNIT         0xF4
248#define WIN_SECURITY_FREEZE_LOCK        0xF5
249#define WIN_SECURITY_DISABLE            0xF6
250#define WIN_READ_NATIVE_MAX             0xF8 /* return the native maximum address */
251#define WIN_SET_MAX                     0xF9
252#define DISABLE_SEAGATE                 0xFB
253
254/* WIN_SMART sub-commands */
255
256#define SMART_READ_VALUES               0xD0
257#define SMART_READ_THRESHOLDS           0xD1
258#define SMART_AUTOSAVE                  0xD2
259#define SMART_SAVE                      0xD3
260#define SMART_IMMEDIATE_OFFLINE         0xD4
261#define SMART_READ_LOG_SECTOR           0xD5
262#define SMART_WRITE_LOG_SECTOR          0xD6
263#define SMART_WRITE_THRESHOLDS          0xD7
264#define SMART_ENABLE                    0xD8
265#define SMART_DISABLE                   0xD9
266#define SMART_STATUS                    0xDA
267#define SMART_AUTO_OFFLINE              0xDB
268
269/* Password used in TF4 & TF5 executing SMART commands */
270
271#define SMART_LCYL_PASS                 0x4F
272#define SMART_HCYL_PASS                 0xC2
273
274/* WIN_SETFEATURES sub-commands */
275#define SETFEATURES_EN_8BIT     0x01    /* Enable 8-Bit Transfers */
276#define SETFEATURES_EN_WCACHE   0x02    /* Enable write cache */
277#define SETFEATURES_DIS_DEFECT  0x04    /* Disable Defect Management */
278#define SETFEATURES_EN_APM      0x05    /* Enable advanced power management */
279#define SETFEATURES_EN_SAME_R   0x22    /* for a region ATA-1 */
280#define SETFEATURES_DIS_MSN     0x31    /* Disable Media Status Notification */
281#define SETFEATURES_DIS_RETRY   0x33    /* Disable Retry */
282#define SETFEATURES_EN_AAM      0x42    /* Enable Automatic Acoustic Management */
283#define SETFEATURES_RW_LONG     0x44    /* Set Length of VS bytes */
284#define SETFEATURES_SET_CACHE   0x54    /* Set Cache segments to SC Reg. Val */
285#define SETFEATURES_DIS_RLA     0x55    /* Disable read look-ahead feature */
286#define SETFEATURES_EN_RI       0x5D    /* Enable release interrupt */
287#define SETFEATURES_EN_SI       0x5E    /* Enable SERVICE interrupt */
288#define SETFEATURES_DIS_RPOD    0x66    /* Disable reverting to power on defaults */
289#define SETFEATURES_DIS_ECC     0x77    /* Disable ECC byte count */
290#define SETFEATURES_DIS_8BIT    0x81    /* Disable 8-Bit Transfers */
291#define SETFEATURES_DIS_WCACHE  0x82    /* Disable write cache */
292#define SETFEATURES_EN_DEFECT   0x84    /* Enable Defect Management */
293#define SETFEATURES_DIS_APM     0x85    /* Disable advanced power management */
294#define SETFEATURES_EN_ECC      0x88    /* Enable ECC byte count */
295#define SETFEATURES_EN_MSN      0x95    /* Enable Media Status Notification */
296#define SETFEATURES_EN_RETRY    0x99    /* Enable Retry */
297#define SETFEATURES_EN_RLA      0xAA    /* Enable read look-ahead feature */
298#define SETFEATURES_PREFETCH    0xAB    /* Sets drive prefetch value */
299#define SETFEATURES_EN_REST     0xAC    /* ATA-1 */
300#define SETFEATURES_4B_RW_LONG  0xBB    /* Set Lenght of 4 bytes */
301#define SETFEATURES_DIS_AAM     0xC2    /* Disable Automatic Acoustic Management */
302#define SETFEATURES_EN_RPOD     0xCC    /* Enable reverting to power on defaults */
303#define SETFEATURES_DIS_RI      0xDD    /* Disable release interrupt ATAPI */
304#define SETFEATURES_EN_SAME_M   0xDD    /* for a entire device ATA-1 */
305#define SETFEATURES_DIS_SI      0xDE    /* Disable SERVICE interrupt ATAPI */
306
307/* WIN_SECURITY sub-commands */
308
309#define SECURITY_SET_PASSWORD           0xBA
310#define SECURITY_UNLOCK                 0xBB
311#define SECURITY_ERASE_PREPARE          0xBC
312#define SECURITY_ERASE_UNIT             0xBD
313#define SECURITY_FREEZE_LOCK            0xBE
314#define SECURITY_DISABLE_PASSWORD       0xBF
315
316struct hd_geometry {
317      unsigned char heads;
318      unsigned char sectors;
319      unsigned short cylinders;
320      unsigned long start;
321};
322
323/* BIG GEOMETRY - dying, used only by HDIO_GETGEO_BIG_RAW */
324struct hd_big_geometry {
325       unsigned char heads;
326       unsigned char sectors;
327       unsigned int cylinders;
328       unsigned long start;
329};
330
331/* hd/ide ctl's that pass (arg) ptrs to user space are numbered 0x030n/0x031n */
332#define HDIO_GETGEO             0x0301  /* get device geometry */
333#define HDIO_GET_UNMASKINTR     0x0302  /* get current unmask setting */
334#define HDIO_GET_MULTCOUNT      0x0304  /* get current IDE blockmode setting */
335#define HDIO_GET_QDMA           0x0305  /* get use-qdma flag */
336
337#define HDIO_SET_XFER           0x0306  /* set transfer rate via proc */
338
339#define HDIO_OBSOLETE_IDENTITY  0x0307  /* OBSOLETE, DO NOT USE: returns 142 bytes */
340#define HDIO_GET_KEEPSETTINGS   0x0308  /* get keep-settings-on-reset flag */
341#define HDIO_GET_32BIT          0x0309  /* get current io_32bit setting */
342#define HDIO_GET_NOWERR         0x030a  /* get ignore-write-error flag */
343#define HDIO_GET_DMA            0x030b  /* get use-dma flag */
344#define HDIO_GET_NICE           0x030c  /* get nice flags */
345#define HDIO_GET_IDENTITY       0x030d  /* get IDE identification info */
346#define HDIO_GET_WCACHE         0x030e  /* get write cache mode on|off */
347#define HDIO_GET_ACOUSTIC       0x030f  /* get acoustic value */
348#define HDIO_GET_ADDRESS        0x0310  /* */
349
350#define HDIO_GET_BUSSTATE       0x031a  /* get the bus state of the hwif */
351#define HDIO_TRISTATE_HWIF      0x031b  /* execute a channel tristate */
352#define HDIO_DRIVE_RESET        0x031c  /* execute a device reset */
353#define HDIO_DRIVE_TASKFILE     0x031d  /* execute raw taskfile */
354#define HDIO_DRIVE_TASK         0x031e  /* execute task and special drive command */
355#define HDIO_DRIVE_CMD          0x031f  /* execute a special drive command */
356#define HDIO_DRIVE_CMD_AEB      HDIO_DRIVE_TASK
357
358/* hd/ide ctl's that pass (arg) non-ptr values are numbered 0x032n/0x033n */
359#define HDIO_SET_MULTCOUNT      0x0321  /* change IDE blockmode */
360#define HDIO_SET_UNMASKINTR     0x0322  /* permit other irqs during I/O */
361#define HDIO_SET_KEEPSETTINGS   0x0323  /* keep ioctl settings on reset */
362#define HDIO_SET_32BIT          0x0324  /* change io_32bit flags */
363#define HDIO_SET_NOWERR         0x0325  /* change ignore-write-error flag */
364#define HDIO_SET_DMA            0x0326  /* change use-dma flag */
365#define HDIO_SET_PIO_MODE       0x0327  /* reconfig interface to new speed */
366#define HDIO_SCAN_HWIF          0x0328  /* register and (re)scan interface */
367#define HDIO_SET_NICE           0x0329  /* set nice flags */
368#define HDIO_UNREGISTER_HWIF    0x032a  /* unregister interface */
369#define HDIO_SET_WCACHE         0x032b  /* change write cache enable-disable */
370#define HDIO_SET_ACOUSTIC       0x032c  /* change acoustic behavior */
371#define HDIO_SET_BUSSTATE       0x032d  /* set the bus state of the hwif */
372#define HDIO_SET_QDMA           0x032e  /* change use-qdma flag */
373#define HDIO_SET_ADDRESS        0x032f  /* change lba addressing modes */
374
375/* bus states */
376enum {
377        BUSSTATE_OFF = 0,
378        BUSSTATE_ON,
379        BUSSTATE_TRISTATE
380};
381
382/* hd/ide ctl's that pass (arg) ptrs to user space are numbered 0x033n/0x033n */
383#define HDIO_GETGEO_BIG         0x330
384#define HDIO_GETGEO_BIG_RAW     0x331
385
386/* 0x338 is reserved - used to be HDIO_SET_IDE_SCSI */
387/* 0x339 is reserved - used to be HDIO_SET_SCSI_IDE */
388
389#define __NEW_HD_DRIVE_ID
390
391/*
392 * Structure returned by HDIO_GET_IDENTITY, as per ANSI NCITS ATA6 rev.1b spec.
393 *
394 * If you change something here, please remember to update fix_driveid() in
395 * ide/probe.c.
396 */
397struct hd_driveid {
398        unsigned short  config;         /* lots of obsolete bit flags */
399        unsigned short  cyls;           /* Obsolete, "physical" cyls */
400        unsigned short  reserved2;      /* reserved (word 2) */
401        unsigned short  heads;          /* Obsolete, "physical" heads */
402        unsigned short  track_bytes;    /* unformatted bytes per track */
403        unsigned short  sector_bytes;   /* unformatted bytes per sector */
404        unsigned short  sectors;        /* Obsolete, "physical" sectors per track */
405        unsigned short  vendor0;        /* vendor unique */
406        unsigned short  vendor1;        /* vendor unique */
407        unsigned short  vendor2;        /* Retired vendor unique */
408        unsigned char   serial_no[20];  /* 0 = not_specified */
409        unsigned short  buf_type;       /* Retired */
410        unsigned short  buf_size;       /* Retired, 512 byte increments
411                                         * 0 = not_specified
412                                         */
413        unsigned short  ecc_bytes;      /* for r/w long cmds; 0 = not_specified */
414        unsigned char   fw_rev[8];      /* 0 = not_specified */
415        unsigned char   model[40];      /* 0 = not_specified */
416        unsigned char   max_multsect;   /* 0=not_implemented */
417        unsigned char   vendor3;        /* vendor unique */
418        unsigned short  dword_io;       /* 0=not_implemented; 1=implemented */
419        unsigned char   vendor4;        /* vendor unique */
420        unsigned char   capability;     /* (upper byte of word 49)
421                                         *  3:  IORDYsup
422                                         *  2:  IORDYsw
423                                         *  1:  LBA
424                                         *  0:  DMA
425                                         */
426        unsigned short  reserved50;     /* reserved (word 50) */
427        unsigned char   vendor5;        /* Obsolete, vendor unique */
428        unsigned char   tPIO;           /* Obsolete, 0=slow, 1=medium, 2=fast */
429        unsigned char   vendor6;        /* Obsolete, vendor unique */
430        unsigned char   tDMA;           /* Obsolete, 0=slow, 1=medium, 2=fast */
431        unsigned short  field_valid;    /* (word 53)
432                                         *  2:  ultra_ok        word  88
433                                         *  1:  eide_ok         words 64-70
434                                         *  0:  cur_ok          words 54-58
435                                         */
436        unsigned short  cur_cyls;       /* Obsolete, logical cylinders */
437        unsigned short  cur_heads;      /* Obsolete, l heads */
438        unsigned short  cur_sectors;    /* Obsolete, l sectors per track */
439        unsigned short  cur_capacity0;  /* Obsolete, l total sectors on drive */
440        unsigned short  cur_capacity1;  /* Obsolete, (2 words, misaligned int)     */
441        unsigned char   multsect;       /* current multiple sector count */
442        unsigned char   multsect_valid; /* when (bit0==1) multsect is ok */
443        unsigned int    lba_capacity;   /* Obsolete, total number of sectors */
444        unsigned short  dma_1word;      /* Obsolete, single-word dma info */
445        unsigned short  dma_mword;      /* multiple-word dma info */
446        unsigned short  eide_pio_modes; /* bits 0:mode3 1:mode4 */
447        unsigned short  eide_dma_min;   /* min mword dma cycle time (ns) */
448        unsigned short  eide_dma_time;  /* recommended mword dma cycle time (ns) */
449        unsigned short  eide_pio;       /* min cycle time (ns), no IORDY  */
450        unsigned short  eide_pio_iordy; /* min cycle time (ns), with IORDY */
451        unsigned short  words69_70[2];  /* reserved words 69-70
452                                         * future command overlap and queuing
453                                         */
454        /* HDIO_GET_IDENTITY currently returns only words 0 through 70 */
455        unsigned short  words71_74[4];  /* reserved words 71-74
456                                         * for IDENTIFY PACKET DEVICE command
457                                         */
458        unsigned short  queue_depth;    /* (word 75)
459                                         * 15:5 reserved
460                                         *  4:0 Maximum queue depth -1
461                                         */
462        unsigned short  words76_79[4];  /* reserved words 76-79 */
463        unsigned short  major_rev_num;  /* (word 80) */
464        unsigned short  minor_rev_num;  /* (word 81) */
465        unsigned short  command_set_1;  /* (word 82) supported
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;  /* (word 83)
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;          /* (word 84)
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;   /* (word 85)
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;   /* (word 86)
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;    /* (word 87)
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;      /* (word 88) */
564        unsigned short  trseuc;         /* time required for security erase */
565        unsigned short  trsEuc;         /* time required for enhanced erase */
566        unsigned short  CurAPMvalues;   /* current APM values */
567        unsigned short  mprc;           /* master password revision code */
568        unsigned short  hw_config;      /* hardware config (word 93)
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;       /* (word 94)
587                                         * 15:8 Vendor's recommended value
588                                         *  7:0 current value
589                                         */
590        unsigned short  msrqs;          /* min stream request size */
591        unsigned short  sxfert;         /* stream transfer time */
592        unsigned short  sal;            /* stream access latency */
593        unsigned int    spg;            /* stream performance granularity */
594        unsigned long long lba_capacity_2;/* 48-bit total number of sectors */
595        unsigned short  words104_125[22];/* reserved words 104-125 */
596        unsigned short  last_lun;       /* (word 126) */
597        unsigned short  word127;        /* (word 127) Feature Set
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;            /* (word 128)
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;           /*  (word 129)
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];/* reserved vendor words 130-155 */
626        unsigned short  word156;        /* reserved vendor word 156 */
627        unsigned short  words157_159[3];/* reserved vendor words 157-159 */
628        unsigned short  cfa_power;      /* (word 160) CFA Power Mode
629                                         * 15 word 160 supported
630                                         * 14 reserved
631                                         * 13
632                                         * 12
633                                         * 11:0
634                                         */
635        unsigned short  words161_175[15];/* Reserved for CFA */
636        unsigned short  words176_205[30];/* Current Media Serial Number */
637        unsigned short  words206_254[49];/* reserved words 206-254 */
638        unsigned short  integrity_word; /* (word 255)
639                                         * 15:8 Checksum
640                                         *  7:0 Signature
641                                         */
642};
643
644/*
645 * IDE "nice" flags. These are used on a per drive basis to determine
646 * when to be nice and give more bandwidth to the other devices which
647 * share the same IDE bus.
648 */
649#define IDE_NICE_DSC_OVERLAP    (0)     /* per the DSC overlap protocol */
650#define IDE_NICE_ATAPI_OVERLAP  (1)     /* not supported yet */
651#define IDE_NICE_0              (2)     /* when sure that it won't affect us */
652#define IDE_NICE_1              (3)     /* when probably won't affect us much */
653#define IDE_NICE_2              (4)     /* when we know it's on our expense */
654
655#endif  /* _LINUX_HDREG_H */
Note: See TracBrowser for help on using the repository browser.