diff options
Diffstat (limited to 'drivers/ide/tx4938ide.c')
-rw-r--r-- | drivers/ide/tx4938ide.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/ide/tx4938ide.c b/drivers/ide/tx4938ide.c index 9120063e8f87..b4ef218072cd 100644 --- a/drivers/ide/tx4938ide.c +++ b/drivers/ide/tx4938ide.c | |||
@@ -181,7 +181,7 @@ static void tx4938ide_input_data_swap(ide_drive_t *drive, struct request *rq, | |||
181 | 181 | ||
182 | while (count--) | 182 | while (count--) |
183 | *ptr++ = cpu_to_le16(__raw_readw((void __iomem *)port)); | 183 | *ptr++ = cpu_to_le16(__raw_readw((void __iomem *)port)); |
184 | __ide_flush_dcache_range((unsigned long)buf, count * 2); | 184 | __ide_flush_dcache_range((unsigned long)buf, roundup(len, 2)); |
185 | } | 185 | } |
186 | 186 | ||
187 | static void tx4938ide_output_data_swap(ide_drive_t *drive, struct request *rq, | 187 | static void tx4938ide_output_data_swap(ide_drive_t *drive, struct request *rq, |
@@ -195,7 +195,7 @@ static void tx4938ide_output_data_swap(ide_drive_t *drive, struct request *rq, | |||
195 | __raw_writew(le16_to_cpu(*ptr), (void __iomem *)port); | 195 | __raw_writew(le16_to_cpu(*ptr), (void __iomem *)port); |
196 | ptr++; | 196 | ptr++; |
197 | } | 197 | } |
198 | __ide_flush_dcache_range((unsigned long)buf, count * 2); | 198 | __ide_flush_dcache_range((unsigned long)buf, roundup(len, 2)); |
199 | } | 199 | } |
200 | 200 | ||
201 | static const struct ide_tp_ops tx4938ide_tp_ops = { | 201 | static const struct ide_tp_ops tx4938ide_tp_ops = { |
@@ -216,16 +216,17 @@ static const struct ide_tp_ops tx4938ide_tp_ops = { | |||
216 | #endif /* __BIG_ENDIAN */ | 216 | #endif /* __BIG_ENDIAN */ |
217 | 217 | ||
218 | static const struct ide_port_ops tx4938ide_port_ops = { | 218 | static const struct ide_port_ops tx4938ide_port_ops = { |
219 | .set_pio_mode = tx4938ide_set_pio_mode, | 219 | .set_pio_mode = tx4938ide_set_pio_mode, |
220 | }; | 220 | }; |
221 | 221 | ||
222 | static const struct ide_port_info tx4938ide_port_info __initdata = { | 222 | static const struct ide_port_info tx4938ide_port_info __initdata = { |
223 | .port_ops = &tx4938ide_port_ops, | 223 | .port_ops = &tx4938ide_port_ops, |
224 | #ifdef __BIG_ENDIAN | 224 | #ifdef __BIG_ENDIAN |
225 | .tp_ops = &tx4938ide_tp_ops, | 225 | .tp_ops = &tx4938ide_tp_ops, |
226 | #endif | 226 | #endif |
227 | .host_flags = IDE_HFLAG_MMIO | IDE_HFLAG_NO_DMA, | 227 | .host_flags = IDE_HFLAG_MMIO | IDE_HFLAG_NO_DMA, |
228 | .pio_mask = ATA_PIO5, | 228 | .pio_mask = ATA_PIO5, |
229 | .chipset = ide_generic, | ||
229 | }; | 230 | }; |
230 | 231 | ||
231 | static int __init tx4938ide_probe(struct platform_device *pdev) | 232 | static int __init tx4938ide_probe(struct platform_device *pdev) |