[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>

authored by Jeremy Higdon and committed by Linus Torvalds 0271fc2d b4103333

+4 -5
+4 -5
drivers/ide/pci/sgiioc4.c
··· 1 /* 2 - * Copyright (c) 2003 Silicon Graphics, Inc. All Rights Reserved. 3 * 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 ··· 510 drive->name); 511 goto use_pio_instead; 512 } else { 513 - u32 xcount, bcount = 514 0x10000 - (cur_addr & 0xffff); 515 516 if (bcount > cur_len) ··· 525 *table = 0x0; 526 table++; 527 528 - xcount = bcount & 0xffff; 529 - *table = cpu_to_be32(xcount); 530 table++; 531 532 cur_addr += bcount; ··· 679 return -EIO; 680 681 /* Create /proc/ide entries */ 682 - create_proc_ide_interfaces(); 683 684 return 0; 685 }
··· 1 /* 2 + * Copyright (c) 2003-2006 Silicon Graphics, Inc. All Rights Reserved. 3 * 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 ··· 510 drive->name); 511 goto use_pio_instead; 512 } else { 513 + u32 bcount = 514 0x10000 - (cur_addr & 0xffff); 515 516 if (bcount > cur_len) ··· 525 *table = 0x0; 526 table++; 527 528 + *table = cpu_to_be32(bcount); 529 table++; 530 531 cur_addr += bcount; ··· 680 return -EIO; 681 682 /* Create /proc/ide entries */ 683 + create_proc_ide_interfaces(); 684 685 return 0; 686 }