diff options
author | Sergei Shtylyov <sshtylyov@ru.mvista.com> | 2009-04-08 08:13:02 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-04-08 08:13:02 -0400 |
commit | 745483f10c6cefb303007c6873e2bfce54efa8ed (patch) | |
tree | 9dc9dca95f017edf279bf3e2d5ec3d07481e75da /include | |
parent | 60f85019c6c8c1aebf3485a313e0da094bc95d07 (diff) |
ide: simplify 'struct ide_taskfile'
Make 'struct ide_taskfile' cover only 8 register values and thus put two such
fields ('tf' and 'hob') into 'struct ide_cmd', dropping unnecessary 'tf_array'
field from it.
This required changing the prototype of ide_get_lba_addr() and ide_tf_dump().
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
[bart: fix setting of ATA_LBA bit for LBA48 commands in __ide_do_rw_disk()]
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/ide.h | 49 |
1 files changed, 15 insertions, 34 deletions
diff --git a/include/linux/ide.h b/include/linux/ide.h index 58951f5540bf..e2ea38df26bc 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -282,44 +282,25 @@ enum { | |||
282 | }; | 282 | }; |
283 | 283 | ||
284 | struct ide_taskfile { | 284 | struct ide_taskfile { |
285 | u8 hob_data; /* 0: high data byte (for TASKFILE IOCTL) */ | 285 | u8 data; /* 0: data byte (for TASKFILE ioctl) */ |
286 | /* 1-5: additional data to support LBA48 */ | 286 | union { /* 1: */ |
287 | union { | 287 | u8 error; /* read: error */ |
288 | u8 hob_error; /* read: error */ | 288 | u8 feature; /* write: feature */ |
289 | u8 hob_feature; /* write: feature */ | ||
290 | }; | ||
291 | |||
292 | u8 hob_nsect; | ||
293 | u8 hob_lbal; | ||
294 | u8 hob_lbam; | ||
295 | u8 hob_lbah; | ||
296 | |||
297 | u8 data; /* 6: low data byte (for TASKFILE IOCTL) */ | ||
298 | |||
299 | union { /* 7: */ | ||
300 | u8 error; /* read: error */ | ||
301 | u8 feature; /* write: feature */ | ||
302 | }; | 289 | }; |
303 | 290 | u8 nsect; /* 2: number of sectors */ | |
304 | u8 nsect; /* 8: number of sectors */ | 291 | u8 lbal; /* 3: LBA low */ |
305 | u8 lbal; /* 9: LBA low */ | 292 | u8 lbam; /* 4: LBA mid */ |
306 | u8 lbam; /* 10: LBA mid */ | 293 | u8 lbah; /* 5: LBA high */ |
307 | u8 lbah; /* 11: LBA high */ | 294 | u8 device; /* 6: device select */ |
308 | 295 | union { /* 7: */ | |
309 | u8 device; /* 12: device select */ | 296 | u8 status; /* read: status */ |
310 | |||
311 | union { /* 13: */ | ||
312 | u8 status; /* read: status */ | ||
313 | u8 command; /* write: command */ | 297 | u8 command; /* write: command */ |
314 | }; | 298 | }; |
315 | }; | 299 | }; |
316 | 300 | ||
317 | struct ide_cmd { | 301 | struct ide_cmd { |
318 | union { | 302 | struct ide_taskfile tf; |
319 | struct ide_taskfile tf; | 303 | struct ide_taskfile hob; |
320 | u8 tf_array[14]; | ||
321 | }; | ||
322 | |||
323 | struct { | 304 | struct { |
324 | struct { | 305 | struct { |
325 | u8 tf; | 306 | u8 tf; |
@@ -1143,7 +1124,7 @@ extern int ide_devset_execute(ide_drive_t *drive, | |||
1143 | void ide_complete_cmd(ide_drive_t *, struct ide_cmd *, u8, u8); | 1124 | void ide_complete_cmd(ide_drive_t *, struct ide_cmd *, u8, u8); |
1144 | int ide_complete_rq(ide_drive_t *, int, unsigned int); | 1125 | int ide_complete_rq(ide_drive_t *, int, unsigned int); |
1145 | 1126 | ||
1146 | void ide_tf_dump(const char *, struct ide_taskfile *); | 1127 | void ide_tf_dump(const char *, struct ide_cmd *); |
1147 | 1128 | ||
1148 | void ide_exec_command(ide_hwif_t *, u8); | 1129 | void ide_exec_command(ide_hwif_t *, u8); |
1149 | u8 ide_read_status(ide_hwif_t *); | 1130 | u8 ide_read_status(ide_hwif_t *); |
@@ -1510,7 +1491,7 @@ static inline void ide_set_hwifdata (ide_hwif_t * hwif, void *data) | |||
1510 | 1491 | ||
1511 | extern void ide_toggle_bounce(ide_drive_t *drive, int on); | 1492 | extern void ide_toggle_bounce(ide_drive_t *drive, int on); |
1512 | 1493 | ||
1513 | u64 ide_get_lba_addr(struct ide_taskfile *, int); | 1494 | u64 ide_get_lba_addr(struct ide_cmd *, int); |
1514 | u8 ide_dump_status(ide_drive_t *, const char *, u8); | 1495 | u8 ide_dump_status(ide_drive_t *, const char *, u8); |
1515 | 1496 | ||
1516 | struct ide_timing { | 1497 | struct ide_timing { |