diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-03-27 07:46:39 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-03-27 07:46:39 -0400 |
commit | 0dfb991c6943c810175376b58d1c29cfe532541b (patch) | |
tree | c7b82d2ea9159e94c40f8df1a178dab4d2590ed3 /drivers/ide/ide-io.c | |
parent | 04d09b0e62f2180a7e3fa8578ed778eca0c454fd (diff) |
ide: use ata_tf_protocols enums
* Add IDE_TFLAG_MULTI_PIO taskfile flag and set it for commands
using multi-PIO protocol.
* Use ata_tf_protocols enums instead of TASKFILE_* defines to
denote command's protocol and then rename ->data_phase field
to ->protocol.
* Remove no longer needed <linux/hdreg.h> includes.
There should be no functional changes caused by this patch.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-io.c')
-rw-r--r-- | drivers/ide/ide-io.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c index 7917fa09bf15..c27eaab1ffcf 100644 --- a/drivers/ide/ide-io.c +++ b/drivers/ide/ide-io.c | |||
@@ -40,7 +40,6 @@ | |||
40 | #include <linux/pci.h> | 40 | #include <linux/pci.h> |
41 | #include <linux/delay.h> | 41 | #include <linux/delay.h> |
42 | #include <linux/ide.h> | 42 | #include <linux/ide.h> |
43 | #include <linux/hdreg.h> | ||
44 | #include <linux/completion.h> | 43 | #include <linux/completion.h> |
45 | #include <linux/reboot.h> | 44 | #include <linux/reboot.h> |
46 | #include <linux/cdrom.h> | 45 | #include <linux/cdrom.h> |
@@ -220,7 +219,7 @@ static ide_startstop_t ide_disk_special(ide_drive_t *drive) | |||
220 | struct ide_cmd cmd; | 219 | struct ide_cmd cmd; |
221 | 220 | ||
222 | memset(&cmd, 0, sizeof(cmd)); | 221 | memset(&cmd, 0, sizeof(cmd)); |
223 | cmd.data_phase = TASKFILE_NO_DATA; | 222 | cmd.protocol = ATA_PROT_NODATA; |
224 | 223 | ||
225 | if (s->b.set_geometry) { | 224 | if (s->b.set_geometry) { |
226 | s->b.set_geometry = 0; | 225 | s->b.set_geometry = 0; |
@@ -314,15 +313,9 @@ static ide_startstop_t execute_drive_cmd (ide_drive_t *drive, | |||
314 | struct ide_cmd *cmd = rq->special; | 313 | struct ide_cmd *cmd = rq->special; |
315 | 314 | ||
316 | if (cmd) { | 315 | if (cmd) { |
317 | switch (cmd->data_phase) { | 316 | if (cmd->protocol == ATA_PROT_PIO) { |
318 | case TASKFILE_MULTI_OUT: | ||
319 | case TASKFILE_OUT: | ||
320 | case TASKFILE_MULTI_IN: | ||
321 | case TASKFILE_IN: | ||
322 | ide_init_sg_cmd(cmd, rq->nr_sectors); | 317 | ide_init_sg_cmd(cmd, rq->nr_sectors); |
323 | ide_map_sg(drive, rq); | 318 | ide_map_sg(drive, rq); |
324 | default: | ||
325 | break; | ||
326 | } | 319 | } |
327 | 320 | ||
328 | return do_rw_taskfile(drive, cmd); | 321 | return do_rw_taskfile(drive, cmd); |