summaryrefslogtreecommitdiffstats
path: root/drivers/ide
diff options
context:
space:
mode:
authorJeremy Higdon <jeremy@sgi.com>2006-02-02 00:00:46 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2006-02-02 01:14:46 -0800
commit0271fc2db6260dd46f196191e24281af2fddb879 (patch)
treef16b25f04d7ab9cce84532d9036148960befe86b /drivers/ide
parentb4103333d7904310d34de18d85e51e3d74f00a3b (diff)
downloadlinux-0271fc2db6260dd46f196191e24281af2fddb879.tar.gz
linux-0271fc2db6260dd46f196191e24281af2fddb879.tar.bz2
linux-0271fc2db6260dd46f196191e24281af2fddb879.zip
[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')
-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 @@
/*
- * Copyright (c) 2003 Silicon Graphics, Inc. All Rights Reserved.
+ * Copyright (c) 2003-2006 Silicon Graphics, Inc. All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify it
* 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)
drive->name);
goto use_pio_instead;
} else {
- u32 xcount, bcount =
+ u32 bcount =
0x10000 - (cur_addr & 0xffff);
if (bcount > cur_len)
@@ -525,8 +525,7 @@ sgiioc4_build_dma_table(ide_drive_t * drive, struct request *rq, int ddir)
*table = 0x0;
table++;
- xcount = bcount & 0xffff;
- *table = cpu_to_be32(xcount);
+ *table = cpu_to_be32(bcount);
table++;
cur_addr += bcount;
@@ -680,7 +679,7 @@ sgiioc4_ide_setup_pci_device(struct pci_dev *dev, ide_pci_device_t * d)
return -EIO;
/* Create /proc/ide entries */
- create_proc_ide_interfaces();
+ create_proc_ide_interfaces();
return 0;
}