diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-03-27 07:46:38 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-03-27 07:46:38 -0400 |
commit | adb1af9803d167091c2cb4de14014185054bfe2c (patch) | |
tree | aeac3bd825abfb344b1b1b43e282756fb8069f49 /drivers/ide/falconide.c | |
parent | 22aa4b32a19b1f231d4ce7e9af6354b577a22a35 (diff) |
ide: pass command instead of request to ide_pio_datablock()
* Add IDE_TFLAG_FS taskfile flag and set it for REQ_TYPE_FS requests.
* Convert ->{in,out}put_data methods to take command instead of request
as an argument. Then convert pre_task_out_intr(), task_end_request(),
task_error(), task_in_unexpected(), ide_pio_sector(), ide_pio_multi()
and ide_pio_datablock() in similar way.
* Rename task_end_request() to ide_finish_cmd().
There should be no functional changes caused by this patch.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/falconide.c')
-rw-r--r-- | drivers/ide/falconide.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/ide/falconide.c b/drivers/ide/falconide.c index 6085feb1fae8..b368a5effc3a 100644 --- a/drivers/ide/falconide.c +++ b/drivers/ide/falconide.c | |||
@@ -62,23 +62,23 @@ static void falconide_get_lock(irq_handler_t handler, void *data) | |||
62 | } | 62 | } |
63 | } | 63 | } |
64 | 64 | ||
65 | static void falconide_input_data(ide_drive_t *drive, struct request *rq, | 65 | static void falconide_input_data(ide_drive_t *drive, struct ide_cmd *cmd, |
66 | void *buf, unsigned int len) | 66 | void *buf, unsigned int len) |
67 | { | 67 | { |
68 | unsigned long data_addr = drive->hwif->io_ports.data_addr; | 68 | unsigned long data_addr = drive->hwif->io_ports.data_addr; |
69 | 69 | ||
70 | if (drive->media == ide_disk && rq && rq->cmd_type == REQ_TYPE_FS) | 70 | if (drive->media == ide_disk && cmd && (cmd->tf_flags & IDE_TFLAG_FS)) |
71 | return insw(data_addr, buf, (len + 1) / 2); | 71 | return insw(data_addr, buf, (len + 1) / 2); |
72 | 72 | ||
73 | raw_insw_swapw((u16 *)data_addr, buf, (len + 1) / 2); | 73 | raw_insw_swapw((u16 *)data_addr, buf, (len + 1) / 2); |
74 | } | 74 | } |
75 | 75 | ||
76 | static void falconide_output_data(ide_drive_t *drive, struct request *rq, | 76 | static void falconide_output_data(ide_drive_t *drive, struct ide_cmd *cmd, |
77 | void *buf, unsigned int len) | 77 | void *buf, unsigned int len) |
78 | { | 78 | { |
79 | unsigned long data_addr = drive->hwif->io_ports.data_addr; | 79 | unsigned long data_addr = drive->hwif->io_ports.data_addr; |
80 | 80 | ||
81 | if (drive->media == ide_disk && rq && rq->cmd_type == REQ_TYPE_FS) | 81 | if (drive->media == ide_disk && cmd && (cmd->tf_flags & IDE_TFLAG_FS)) |
82 | return outsw(data_addr, buf, (len + 1) / 2); | 82 | return outsw(data_addr, buf, (len + 1) / 2); |
83 | 83 | ||
84 | raw_outsw_swapw((u16 *)data_addr, buf, (len + 1) / 2); | 84 | raw_outsw_swapw((u16 *)data_addr, buf, (len + 1) / 2); |