diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/hdreg.h | 4 | ||||
-rw-r--r-- | include/linux/ide.h | 43 |
2 files changed, 36 insertions, 11 deletions
diff --git a/include/linux/hdreg.h b/include/linux/hdreg.h index 3bcb88560418..df17bf767d98 100644 --- a/include/linux/hdreg.h +++ b/include/linux/hdreg.h | |||
@@ -117,7 +117,7 @@ typedef union ide_reg_valid_s { | |||
117 | 117 | ||
118 | typedef struct ide_task_request_s { | 118 | typedef struct ide_task_request_s { |
119 | __u8 io_ports[8]; | 119 | __u8 io_ports[8]; |
120 | __u8 hob_ports[8]; | 120 | __u8 hob_ports[8]; /* bytes 6 and 7 are unused */ |
121 | ide_reg_valid_t out_flags; | 121 | ide_reg_valid_t out_flags; |
122 | ide_reg_valid_t in_flags; | 122 | ide_reg_valid_t in_flags; |
123 | int data_phase; | 123 | int data_phase; |
@@ -139,6 +139,7 @@ struct hd_drive_cmd_hdr { | |||
139 | __u8 sector_count; | 139 | __u8 sector_count; |
140 | }; | 140 | }; |
141 | 141 | ||
142 | #ifndef __KERNEL__ | ||
142 | typedef struct hd_drive_task_hdr { | 143 | typedef struct hd_drive_task_hdr { |
143 | __u8 data; | 144 | __u8 data; |
144 | __u8 feature; | 145 | __u8 feature; |
@@ -160,6 +161,7 @@ typedef struct hd_drive_hob_hdr { | |||
160 | __u8 device_head; | 161 | __u8 device_head; |
161 | __u8 control; | 162 | __u8 control; |
162 | } hob_struct_t; | 163 | } hob_struct_t; |
164 | #endif | ||
163 | 165 | ||
164 | #define TASKFILE_INVALID 0x7fff | 166 | #define TASKFILE_INVALID 0x7fff |
165 | #define TASKFILE_48 0x8000 | 167 | #define TASKFILE_48 0x8000 |
diff --git a/include/linux/ide.h b/include/linux/ide.h index 66a38f101175..69b78bb39caf 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -103,8 +103,6 @@ typedef unsigned char byte; /* used everywhere */ | |||
103 | #define IDE_FEATURE_OFFSET IDE_ERROR_OFFSET | 103 | #define IDE_FEATURE_OFFSET IDE_ERROR_OFFSET |
104 | #define IDE_COMMAND_OFFSET IDE_STATUS_OFFSET | 104 | #define IDE_COMMAND_OFFSET IDE_STATUS_OFFSET |
105 | 105 | ||
106 | #define IDE_CONTROL_OFFSET_HOB (7) | ||
107 | |||
108 | #define IDE_DATA_REG (HWIF(drive)->io_ports[IDE_DATA_OFFSET]) | 106 | #define IDE_DATA_REG (HWIF(drive)->io_ports[IDE_DATA_OFFSET]) |
109 | #define IDE_ERROR_REG (HWIF(drive)->io_ports[IDE_ERROR_OFFSET]) | 107 | #define IDE_ERROR_REG (HWIF(drive)->io_ports[IDE_ERROR_OFFSET]) |
110 | #define IDE_NSECTOR_REG (HWIF(drive)->io_ports[IDE_NSECTOR_OFFSET]) | 108 | #define IDE_NSECTOR_REG (HWIF(drive)->io_ports[IDE_NSECTOR_OFFSET]) |
@@ -1062,15 +1060,40 @@ extern void ide_end_drive_cmd(ide_drive_t *, u8, u8); | |||
1062 | */ | 1060 | */ |
1063 | extern int ide_wait_cmd(ide_drive_t *, u8, u8, u8, u8, u8 *); | 1061 | extern int ide_wait_cmd(ide_drive_t *, u8, u8, u8, u8, u8 *); |
1064 | 1062 | ||
1063 | struct ide_taskfile { | ||
1064 | u8 hob_data; /* 0: high data byte (for TASKFILE IOCTL) */ | ||
1065 | |||
1066 | u8 hob_feature; /* 1-5: additional data to support LBA48 */ | ||
1067 | u8 hob_nsect; | ||
1068 | u8 hob_lbal; | ||
1069 | u8 hob_lbam; | ||
1070 | u8 hob_lbah; | ||
1071 | |||
1072 | u8 data; /* 6: low data byte (for TASKFILE IOCTL) */ | ||
1073 | |||
1074 | union { /* 7: */ | ||
1075 | u8 error; /* read: error */ | ||
1076 | u8 feature; /* write: feature */ | ||
1077 | }; | ||
1078 | |||
1079 | u8 nsect; /* 8: number of sectors */ | ||
1080 | u8 lbal; /* 9: LBA low */ | ||
1081 | u8 lbam; /* 10: LBA mid */ | ||
1082 | u8 lbah; /* 11: LBA high */ | ||
1083 | |||
1084 | u8 device; /* 12: device select */ | ||
1085 | |||
1086 | union { /* 13: */ | ||
1087 | u8 status; /* read: status */ | ||
1088 | u8 command; /* write: command */ | ||
1089 | }; | ||
1090 | }; | ||
1091 | |||
1065 | typedef struct ide_task_s { | 1092 | typedef struct ide_task_s { |
1066 | /* | 1093 | union { |
1067 | * struct hd_drive_task_hdr tf; | 1094 | struct ide_taskfile tf; |
1068 | * task_struct_t tf; | 1095 | u8 tf_array[14]; |
1069 | * struct hd_drive_hob_hdr hobf; | 1096 | }; |
1070 | * hob_struct_t hobf; | ||
1071 | */ | ||
1072 | u8 tfRegister[8]; | ||
1073 | u8 hobRegister[8]; | ||
1074 | ide_reg_valid_t tf_out_flags; | 1097 | ide_reg_valid_t tf_out_flags; |
1075 | ide_reg_valid_t tf_in_flags; | 1098 | ide_reg_valid_t tf_in_flags; |
1076 | int data_phase; | 1099 | int data_phase; |