aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/q40ide.c
diff options
context:
space:
mode:
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,
72 hw->chipset = ide_generic; 72 hw->chipset = ide_generic;
73} 73}
74 74
75static void q40ide_input_data(ide_drive_t *drive, struct request *rq, 75static void q40ide_input_data(ide_drive_t *drive, struct ide_cmd *cmd,
76 void *buf, unsigned int len) 76 void *buf, unsigned int len)
77{ 77{
78 unsigned long data_addr = drive->hwif->io_ports.data_addr; 78 unsigned long data_addr = drive->hwif->io_ports.data_addr;
79 79
80 if (drive->media == ide_disk && rq && rq->cmd_type == REQ_TYPE_FS) 80 if (drive->media == ide_disk && cmd && (cmd->tf_flags & IDE_TFLAG_FS))
81 return insw(data_addr, buf, (len + 1) / 2); 81 return insw(data_addr, buf, (len + 1) / 2);
82 82
83 insw_swapw(data_addr, buf, (len + 1) / 2); 83 raw_insw_swapw((u16 *)data_addr, buf, (len + 1) / 2);
84} 84}
85 85
86static void q40ide_output_data(ide_drive_t *drive, struct request *rq, 86static void q40ide_output_data(ide_drive_t *drive, struct ide_cmd *cmd,
87 void *buf, unsigned int len) 87 void *buf, unsigned int len)
88{ 88{
89 unsigned long data_addr = drive->hwif->io_ports.data_addr; 89 unsigned long data_addr = drive->hwif->io_ports.data_addr;
90 90
91 if (drive->media == ide_disk && rq && rq->cmd_type == REQ_TYPE_FS) 91 if (drive->media == ide_disk && cmd && (cmd->tf_flags & IDE_TFLAG_FS))
92 return outsw(data_addr, buf, (len + 1) / 2); 92 return outsw(data_addr, buf, (len + 1) / 2);
93 93
94 outsw_swapw(data_addr, buf, (len + 1) / 2); 94 raw_outsw_swapw((u16 *)data_addr, buf, (len + 1) / 2);
95} 95}
96 96
97/* Q40 has a byte-swapped IDE interface */ 97/* Q40 has a byte-swapped IDE interface */
@@ -111,7 +111,8 @@ static const struct ide_tp_ops q40ide_tp_ops = {
111 111
112static const struct ide_port_info q40ide_port_info = { 112static const struct ide_port_info q40ide_port_info = {
113 .tp_ops = &q40ide_tp_ops, 113 .tp_ops = &q40ide_tp_ops,
114 .host_flags = IDE_HFLAG_NO_DMA, 114 .host_flags = IDE_HFLAG_MMIO | IDE_HFLAG_NO_DMA,
115 .irq_flags = IRQF_SHARED,
115}; 116};
116 117
117/* 118/*