aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/sgiioc4.c
diff options
context:
space:
mode:
authorJeremy Higdon <jeremy@sgi.com>2006-02-02 03:00:46 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-02-02 04:14:46 -0500
commit0271fc2db6260dd46f196191e24281af2fddb879 (patch)
treef16b25f04d7ab9cce84532d9036148960befe86b /drivers/ide/pci/sgiioc4.c
parentb4103333d7904310d34de18d85e51e3d74f00a3b (diff)
[PATCH] Fix sgiioc4 DMA timeout problem with 64KiB s/g elements.
Problem caused by the fact that the code used to only pick the low 16 bits of the bytecount. That may be how some controllers act on it (byte count of 0 means 0x10000), but not for this particular hardware. Signed-off-by: Jeremy Higdon <jeremy@sgi.com> Acked-by: Jes Sorensen <jes@sgi.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/ide/pci/sgiioc4.c')
-rw-r--r--drivers/ide/pci/sgiioc4.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/ide/pci/sgiioc4.c b/drivers/ide/pci/sgiioc4.c
index 4ee597d08797..2b286e865163 100644
--- a/drivers/ide/pci/sgiioc4.c
+++ b/drivers/ide/pci/sgiioc4.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2003 Silicon Graphics, Inc. All Rights Reserved. 2 * Copyright (c) 2003-2006 Silicon Graphics, Inc. All Rights Reserved.
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify it 4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of version 2 of the GNU General Public License 5 * under the terms of version 2 of the GNU General Public License
@@ -510,7 +510,7 @@ sgiioc4_build_dma_table(ide_drive_t * drive, struct request *rq, int ddir)
510 drive->name); 510 drive->name);
511 goto use_pio_instead; 511 goto use_pio_instead;
512 } else { 512 } else {
513 u32 xcount, bcount = 513 u32 bcount =
514 0x10000 - (cur_addr & 0xffff); 514 0x10000 - (cur_addr & 0xffff);
515 515
516 if (bcount > cur_len) 516 if (bcount > cur_len)
@@ -525,8 +525,7 @@ sgiioc4_build_dma_table(ide_drive_t * drive, struct request *rq, int ddir)
525 *table = 0x0; 525 *table = 0x0;
526 table++; 526 table++;
527 527
528 xcount = bcount & 0xffff; 528 *table = cpu_to_be32(bcount);
529 *table = cpu_to_be32(xcount);
530 table++; 529 table++;
531 530
532 cur_addr += bcount; 531 cur_addr += bcount;
@@ -680,7 +679,7 @@ sgiioc4_ide_setup_pci_device(struct pci_dev *dev, ide_pci_device_t * d)
680 return -EIO; 679 return -EIO;
681 680
682 /* Create /proc/ide entries */ 681 /* Create /proc/ide entries */
683 create_proc_ide_interfaces(); 682 create_proc_ide_interfaces();
684 683
685 return 0; 684 return 0;
686} 685}