Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0271fc2d authored by Jeremy Higdon's avatar Jeremy Higdon Committed by Linus Torvalds
Browse files

[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: default avatarJeremy Higdon <jeremy@sgi.com>
Acked-by: default avatarJes Sorensen <jes@sgi.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent b4103333
Loading
Loading
Loading
Loading
+4 −5
Original line number Original line Diff line number Diff line
/*
/*
 * 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
 * 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
 * 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);
				       drive->name);
				goto use_pio_instead;
				goto use_pio_instead;
			} else {
			} else {
				u32 xcount, bcount =
				u32 bcount =
				    0x10000 - (cur_addr & 0xffff);
				    0x10000 - (cur_addr & 0xffff);


				if (bcount > cur_len)
				if (bcount > cur_len)
@@ -525,8 +525,7 @@ sgiioc4_build_dma_table(ide_drive_t * drive, struct request *rq, int ddir)
				*table = 0x0;
				*table = 0x0;
				table++;
				table++;


				xcount = bcount & 0xffff;
				*table = cpu_to_be32(bcount);
				*table = cpu_to_be32(xcount);
				table++;
				table++;


				cur_addr += bcount;
				cur_addr += bcount;