linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2.6.0-test11] agpgart [amd64] fix (off by one)
@ 2003-11-30 19:14 Brad House
  2003-11-30 21:30 ` Dave Jones
  0 siblings, 1 reply; 2+ messages in thread
From: Brad House @ 2003-11-30 19:14 UTC (permalink / raw)
  To: linux-kernel

AGPGart would report "Too many northbridges" without this
patch. The problem was that 'i' was incremented before being
checked against the MAX GARTS, just making the check > instead
of == fixes the problems.  Patch here:

http://dev.gentoo.org/~brad_mssw/kernel_patches/2.6.0/genpatches-0.7/101_amd64_agpgart_fix.patch


Also inlined below.
Please CC me on any replies

-Brad House
brad_mssw@gentoo.org


diff -ruN linux-2.6.0-test11.old/drivers/char/agp/amd64-agp.c
linux-2.6.0-test11/drivers/char/agp/amd64-agp.c
--- linux-2.6.0-test11.old/drivers/char/agp/amd64-agp.c	2003-11-26
15:44:44.000000000 -0500
+++ linux-2.6.0-test11/drivers/char/agp/amd64-agp.c	2003-11-30
14:07:38.690330488 -0500
@@ -357,7 +357,7 @@
 		}
 		hammers[i++] = loop_dev;
 		nr_garts = i;
-		if (i == MAX_HAMMER_GARTS) {
+		if (nr_garts > MAX_HAMMER_GARTS) {
 			printk(KERN_INFO PFX "Too many northbridges for AGP\n");
 			return -1;
 		}




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 2.6.0-test11] agpgart [amd64] fix (off by one)
  2003-11-30 19:14 [PATCH 2.6.0-test11] agpgart [amd64] fix (off by one) Brad House
@ 2003-11-30 21:30 ` Dave Jones
  0 siblings, 0 replies; 2+ messages in thread
From: Dave Jones @ 2003-11-30 21:30 UTC (permalink / raw)
  To: Brad House; +Cc: linux-kernel

On Sun, Nov 30, 2003 at 02:14:54PM -0500, Brad House wrote:
 > AGPGart would report "Too many northbridges" without this
 > patch. The problem was that 'i' was incremented before being
 > checked against the MAX GARTS, just making the check > instead
 > of == fixes the problems.  Patch here:

Already fixed slightly differently in agpgart bitkeeper tree.
I've been trying to get Linus to take this and a few other
similar bits for a while, but they just haven't been 
important enough I guess, so its probably post 2.6.0 material.

		Dave


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-11-30 21:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-30 19:14 [PATCH 2.6.0-test11] agpgart [amd64] fix (off by one) Brad House
2003-11-30 21:30 ` Dave Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).