ide: add struct ide_taskfile (take 2)

* Don't set write-only ide_task_t.hobRegister[6] and ide_task_t.hobRegister[7]
  in idedisk_set_max_address_ext().

* Add struct ide_taskfile and use it in ide_task_t instead of tfRegister[]
  and hobRegister[].

* Remove no longer needed IDE_CONTROL_OFFSET_HOB define.

* Add #ifndef/#endif __KERNEL__ around definitions of {task,hob}_struct_t.

While at it:

* Use ATA_LBA define for LBA bit (0x40) as suggested by Tejun Heo.

v2:
* Add missing newlines. (Noticed by Sergei)

* Use ~ATA_LBA instead of 0xBF. (Noticed by Sergei)

* Use unnamed unions for error/feature and status/command.
  (Suggested by Sergei).

There should be no functionality changes caused by this patch.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: Tejun Heo <htejun@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
This commit is contained in:
Bartlomiej Zolnierkiewicz
2008-01-25 22:17:06 +01:00
parent cd2a2d9697
commit 650d841d9e
8 changed files with 179 additions and 171 deletions

View File

@@ -117,7 +117,7 @@ typedef union ide_reg_valid_s {
typedef struct ide_task_request_s {
__u8 io_ports[8];
__u8 hob_ports[8];
__u8 hob_ports[8]; /* bytes 6 and 7 are unused */
ide_reg_valid_t out_flags;
ide_reg_valid_t in_flags;
int data_phase;
@@ -139,6 +139,7 @@ struct hd_drive_cmd_hdr {
__u8 sector_count;
};
#ifndef __KERNEL__
typedef struct hd_drive_task_hdr {
__u8 data;
__u8 feature;
@@ -160,6 +161,7 @@ typedef struct hd_drive_hob_hdr {
__u8 device_head;
__u8 control;
} hob_struct_t;
#endif
#define TASKFILE_INVALID 0x7fff
#define TASKFILE_48 0x8000