diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-01-25 16:17:14 -0500 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-01-25 16:17:14 -0500 |
commit | ac026ff254b32915bb14ba97a23b4019d137f181 (patch) | |
tree | ab5687be210c4016d16fae7a8e51bfc1c41c4c42 /include/linux | |
parent | 7299a3918442dc9a5abb71b9f65b1dd17637c8c0 (diff) |
ide: remove 'command_type' field from ide_task_t
* Add 'data_buf' and 'nsect' variables in ide_taskfile_ioctl()
to cache data buffer pointer and number of sectors to transfer
(this allows us to have only one ide_diag_taskfile() call).
* Add IDE_TFLAG_WRITE taskfile flag and use it to check whether
the REQ_RW request flag should be set.
* Move ->command_type handling from ide_diag_taskfile() to
ide_taskfile_ioctl() and use ->req_cmd instead of ->command_type.
* Add 'nsect' parameter to ide_raw_taskfile().
* Merge ide_diag_taskfile() into ide_raw_taskfile().
* Initialize ->data_phase explicitly in idedisk_prepare_flush(),
ide_start_power_step() and ide_disk_special().
* Remove no longer needed 'command_type' field from ide_task_t.
* Add #ifndef/#endif __KERNEL__ to <linux/hdreg.h> around no
longer used by kernel IDE_DRIVE_TASK_* and TASKFILE_* defines.
There should be no functionality changes caused by this patch.
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/hdreg.h | 13 | ||||
-rw-r--r-- | include/linux/ide.h | 5 |
2 files changed, 9 insertions, 9 deletions
diff --git a/include/linux/hdreg.h b/include/linux/hdreg.h index 0521f1234f15..ff43f8d6b5b3 100644 --- a/include/linux/hdreg.h +++ b/include/linux/hdreg.h | |||
@@ -73,13 +73,13 @@ | |||
73 | #define HDIO_DRIVE_HOB_HDR_SIZE (8 * sizeof(__u8)) | 73 | #define HDIO_DRIVE_HOB_HDR_SIZE (8 * sizeof(__u8)) |
74 | #define HDIO_DRIVE_TASK_HDR_SIZE (8 * sizeof(__u8)) | 74 | #define HDIO_DRIVE_TASK_HDR_SIZE (8 * sizeof(__u8)) |
75 | 75 | ||
76 | #define IDE_DRIVE_TASK_INVALID -1 | ||
77 | #define IDE_DRIVE_TASK_NO_DATA 0 | 76 | #define IDE_DRIVE_TASK_NO_DATA 0 |
77 | #ifndef __KERNEL__ | ||
78 | #define IDE_DRIVE_TASK_INVALID -1 | ||
78 | #define IDE_DRIVE_TASK_SET_XFER 1 | 79 | #define IDE_DRIVE_TASK_SET_XFER 1 |
79 | |||
80 | #define IDE_DRIVE_TASK_IN 2 | 80 | #define IDE_DRIVE_TASK_IN 2 |
81 | |||
82 | #define IDE_DRIVE_TASK_OUT 3 | 81 | #define IDE_DRIVE_TASK_OUT 3 |
82 | #endif | ||
83 | #define IDE_DRIVE_TASK_RAW_WRITE 4 | 83 | #define IDE_DRIVE_TASK_RAW_WRITE 4 |
84 | 84 | ||
85 | /* | 85 | /* |
@@ -166,9 +166,6 @@ typedef struct hd_drive_hob_hdr { | |||
166 | } hob_struct_t; | 166 | } hob_struct_t; |
167 | #endif | 167 | #endif |
168 | 168 | ||
169 | #define TASKFILE_INVALID 0x7fff | ||
170 | #define TASKFILE_48 0x8000 | ||
171 | |||
172 | #define TASKFILE_NO_DATA 0x0000 | 169 | #define TASKFILE_NO_DATA 0x0000 |
173 | 170 | ||
174 | #define TASKFILE_IN 0x0001 | 171 | #define TASKFILE_IN 0x0001 |
@@ -183,12 +180,16 @@ typedef struct hd_drive_hob_hdr { | |||
183 | #define TASKFILE_IN_DMAQ 0x0080 | 180 | #define TASKFILE_IN_DMAQ 0x0080 |
184 | #define TASKFILE_OUT_DMAQ 0x0100 | 181 | #define TASKFILE_OUT_DMAQ 0x0100 |
185 | 182 | ||
183 | #ifndef __KERNEL__ | ||
186 | #define TASKFILE_P_IN 0x0200 | 184 | #define TASKFILE_P_IN 0x0200 |
187 | #define TASKFILE_P_OUT 0x0400 | 185 | #define TASKFILE_P_OUT 0x0400 |
188 | #define TASKFILE_P_IN_DMA 0x0800 | 186 | #define TASKFILE_P_IN_DMA 0x0800 |
189 | #define TASKFILE_P_OUT_DMA 0x1000 | 187 | #define TASKFILE_P_OUT_DMA 0x1000 |
190 | #define TASKFILE_P_IN_DMAQ 0x2000 | 188 | #define TASKFILE_P_IN_DMAQ 0x2000 |
191 | #define TASKFILE_P_OUT_DMAQ 0x4000 | 189 | #define TASKFILE_P_OUT_DMAQ 0x4000 |
190 | #define TASKFILE_48 0x8000 | ||
191 | #define TASKFILE_INVALID 0x7fff | ||
192 | #endif | ||
192 | 193 | ||
193 | /* ATA/ATAPI Commands pre T13 Spec */ | 194 | /* ATA/ATAPI Commands pre T13 Spec */ |
194 | #define WIN_NOP 0x00 | 195 | #define WIN_NOP 0x00 |
diff --git a/include/linux/ide.h b/include/linux/ide.h index 90f83b65eb8f..7485fc705ca4 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -909,6 +909,7 @@ enum { | |||
909 | IDE_TFLAG_OUT_LBAM | | 909 | IDE_TFLAG_OUT_LBAM | |
910 | IDE_TFLAG_OUT_LBAH, | 910 | IDE_TFLAG_OUT_LBAH, |
911 | IDE_TFLAG_OUT_DEVICE = (1 << 14), | 911 | IDE_TFLAG_OUT_DEVICE = (1 << 14), |
912 | IDE_TFLAG_WRITE = (1 << 15), | ||
912 | }; | 913 | }; |
913 | 914 | ||
914 | struct ide_taskfile { | 915 | struct ide_taskfile { |
@@ -948,7 +949,6 @@ typedef struct ide_task_s { | |||
948 | u16 tf_flags; | 949 | u16 tf_flags; |
949 | ide_reg_valid_t tf_in_flags; | 950 | ide_reg_valid_t tf_in_flags; |
950 | int data_phase; | 951 | int data_phase; |
951 | int command_type; | ||
952 | ide_pre_handler_t *prehandler; | 952 | ide_pre_handler_t *prehandler; |
953 | ide_handler_t *handler; | 953 | ide_handler_t *handler; |
954 | struct request *rq; /* copy of request */ | 954 | struct request *rq; /* copy of request */ |
@@ -983,8 +983,7 @@ extern ide_startstop_t task_no_data_intr(ide_drive_t *); | |||
983 | extern ide_startstop_t task_in_intr(ide_drive_t *); | 983 | extern ide_startstop_t task_in_intr(ide_drive_t *); |
984 | extern ide_startstop_t pre_task_out_intr(ide_drive_t *, struct request *); | 984 | extern ide_startstop_t pre_task_out_intr(ide_drive_t *, struct request *); |
985 | 985 | ||
986 | extern int ide_raw_taskfile(ide_drive_t *, ide_task_t *, u8 *); | 986 | int ide_raw_taskfile(ide_drive_t *, ide_task_t *, u8 *, u16); |
987 | |||
988 | int ide_no_data_taskfile(ide_drive_t *, ide_task_t *); | 987 | int ide_no_data_taskfile(ide_drive_t *, ide_task_t *); |
989 | 988 | ||
990 | int ide_taskfile_ioctl(ide_drive_t *, unsigned int, unsigned long); | 989 | int ide_taskfile_ioctl(ide_drive_t *, unsigned int, unsigned long); |