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