aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/q40ide.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-03-30 10:05:43 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-03-30 10:05:43 -0700
commit83826dc505e6c6f432332dd45681be4bb71635ce (patch)
tree761f6321c3c5ef94e63344e948e684313d61b88a /drivers/ide/q40ide.c
parentMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/shaggy/jfs-2.6 (diff)
parentide: keep track of number of bytes instead of sectors in struct ide_cmd (diff)
downloadlinux-dev-83826dc505e6c6f432332dd45681be4bb71635ce.tar.xz
linux-dev-83826dc505e6c6f432332dd45681be4bb71635ce.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6: (70 commits) ide: keep track of number of bytes instead of sectors in struct ide_cmd ide: remove ide_execute_pkt_cmd() (v2) ide: add ->dma_timer_expiry method and remove ->dma_exec_cmd one (v2) ide: set hwif->expiry prior to calling [__]ide_set_handler() ide: use do_rw_taskfile() for ATA_CMD_PACKET commands ide: pass command to ide_map_sg() ide: remove ide_end_request() ide: use ide_end_rq() in ide_complete_rq() ide: pass number of bytes to complete to ide_complete_rq() ide: remove BUG() from ide_complete_rq() ide: move rq->errors quirk out from ide_end_request() ide: pass error value to ide_complete_rq() ide: sanitize ide_end_rq() ide: add ide_end_rq() (v2) ide: make ide_special_rq() BUG() on unknown requests ide: sanitize ide_finish_cmd() ide: use ide_complete_cmd() for REQ_UNPARK_HEADS ide: use ide_complete_cmd() for head unload commands ide: task_error() -> task_error_cmd() ide: unify exit paths in task_pio_intr() ...
Diffstat (limited to 'drivers/ide/q40ide.c')
-rw-r--r--drivers/ide/q40ide.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/ide/q40ide.c b/drivers/ide/q40ide.c
index 9f9c0b3cc3a3..2a43a2f49633 100644
--- a/drivers/ide/q40ide.c
+++ b/drivers/ide/q40ide.c
@@ -72,26 +72,26 @@ static void q40_ide_setup_ports(hw_regs_t *hw, unsigned long base,
hw->chipset = ide_generic;
}
-static void q40ide_input_data(ide_drive_t *drive, struct request *rq,
+static void q40ide_input_data(ide_drive_t *drive, struct ide_cmd *cmd,
void *buf, unsigned int len)
{
unsigned long data_addr = drive->hwif->io_ports.data_addr;
- if (drive->media == ide_disk && rq && rq->cmd_type == REQ_TYPE_FS)
+ if (drive->media == ide_disk && cmd && (cmd->tf_flags & IDE_TFLAG_FS))
return insw(data_addr, buf, (len + 1) / 2);
- insw_swapw(data_addr, buf, (len + 1) / 2);
+ raw_insw_swapw((u16 *)data_addr, buf, (len + 1) / 2);
}
-static void q40ide_output_data(ide_drive_t *drive, struct request *rq,
+static void q40ide_output_data(ide_drive_t *drive, struct ide_cmd *cmd,
void *buf, unsigned int len)
{
unsigned long data_addr = drive->hwif->io_ports.data_addr;
- if (drive->media == ide_disk && rq && rq->cmd_type == REQ_TYPE_FS)
+ if (drive->media == ide_disk && cmd && (cmd->tf_flags & IDE_TFLAG_FS))
return outsw(data_addr, buf, (len + 1) / 2);
- outsw_swapw(data_addr, buf, (len + 1) / 2);
+ raw_outsw_swapw((u16 *)data_addr, buf, (len + 1) / 2);
}
/* Q40 has a byte-swapped IDE interface */
@@ -111,7 +111,8 @@ static const struct ide_tp_ops q40ide_tp_ops = {
static const struct ide_port_info q40ide_port_info = {
.tp_ops = &q40ide_tp_ops,
- .host_flags = IDE_HFLAG_NO_DMA,
+ .host_flags = IDE_HFLAG_MMIO | IDE_HFLAG_NO_DMA,
+ .irq_flags = IRQF_SHARED,
};
/*