diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2008-12-31 07:35:57 -0500 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2008-12-31 07:35:57 -0500 |
commit | 2ca1a615835d9f4990f42102ab1f2ef434e7e89c (patch) | |
tree | 726cf3d5f29a6c66c44e4bd68e7ebed2fd83d059 /drivers/ide/tx4939ide.c | |
parent | e12f0102ac81d660c9f801d0a0e10ccf4537a9de (diff) | |
parent | 6a94cb73064c952255336cc57731904174b2c58f (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:
arch/x86/kernel/io_apic.c
Diffstat (limited to 'drivers/ide/tx4939ide.c')
-rw-r--r-- | drivers/ide/tx4939ide.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/ide/tx4939ide.c b/drivers/ide/tx4939ide.c index bafb7d1a22e2..97cd9e0f66f6 100644 --- a/drivers/ide/tx4939ide.c +++ b/drivers/ide/tx4939ide.c | |||
@@ -259,6 +259,12 @@ static int tx4939ide_build_dmatable(ide_drive_t *drive, struct request *rq) | |||
259 | bcount = 0x10000 - (cur_addr & 0xffff); | 259 | bcount = 0x10000 - (cur_addr & 0xffff); |
260 | if (bcount > cur_len) | 260 | if (bcount > cur_len) |
261 | bcount = cur_len; | 261 | bcount = cur_len; |
262 | /* | ||
263 | * This workaround for zero count seems required. | ||
264 | * (standard ide_build_dmatable do it too) | ||
265 | */ | ||
266 | if ((bcount & 0xffff) == 0x0000) | ||
267 | bcount = 0x8000; | ||
262 | *table++ = bcount & 0xffff; | 268 | *table++ = bcount & 0xffff; |
263 | *table++ = cur_addr; | 269 | *table++ = cur_addr; |
264 | cur_addr += bcount; | 270 | cur_addr += bcount; |
@@ -558,7 +564,7 @@ static void tx4939ide_input_data_swap(ide_drive_t *drive, struct request *rq, | |||
558 | 564 | ||
559 | while (count--) | 565 | while (count--) |
560 | *ptr++ = cpu_to_le16(__raw_readw((void __iomem *)port)); | 566 | *ptr++ = cpu_to_le16(__raw_readw((void __iomem *)port)); |
561 | __ide_flush_dcache_range((unsigned long)buf, count * 2); | 567 | __ide_flush_dcache_range((unsigned long)buf, roundup(len, 2)); |
562 | } | 568 | } |
563 | 569 | ||
564 | static void tx4939ide_output_data_swap(ide_drive_t *drive, struct request *rq, | 570 | static void tx4939ide_output_data_swap(ide_drive_t *drive, struct request *rq, |
@@ -572,7 +578,7 @@ static void tx4939ide_output_data_swap(ide_drive_t *drive, struct request *rq, | |||
572 | __raw_writew(le16_to_cpu(*ptr), (void __iomem *)port); | 578 | __raw_writew(le16_to_cpu(*ptr), (void __iomem *)port); |
573 | ptr++; | 579 | ptr++; |
574 | } | 580 | } |
575 | __ide_flush_dcache_range((unsigned long)buf, count * 2); | 581 | __ide_flush_dcache_range((unsigned long)buf, roundup(len, 2)); |
576 | } | 582 | } |
577 | 583 | ||
578 | static const struct ide_tp_ops tx4939ide_tp_ops = { | 584 | static const struct ide_tp_ops tx4939ide_tp_ops = { |