Subject: kern/20480: agp(4) can't set AGP4X mode, only 2X
To: None <>
From: None <>
List: netbsd-bugs
Date: 02/24/2003 21:43:58
>Number:         20480
>Category:       kern
>Synopsis:       a stupid error in sys/agpio.h prevent use of AGP4X
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Feb 24 12:45:01 PST 2003
>Originator:     Quentin Garnier
>Release:        NetBSD 1.6O
Quentin Garnier -
"Feels like I'm fiddling while Rome is burning down.
Should I lay my fiddle down and take a rifle from the ground ?"
Leigh Nash/Sixpence None The Richer, Paralyzed, Divine Discontents, 2002.
System: NetBSD padme 1.6O NetBSD 1.6O (NVIDIA_ACPI-$Revision: $) #7: Mon Feb 24 21:21:30 CET 2003 cube@padme:/home/cube/src/nv-netbsd/netvidia/src/sys/arch/i386/compile/NVIDIA_ACPI i386
Architecture: i386
Machine: i386
	agp_generic_enable constantly fail to set AGP4X mode.

	Formulated otherwise, agp(4) maintainer failed his binary
	calculus major ;) (Note that FreeBSD fixed this in November,

	While you're reading this, please, *PLEASE* have a look to
	kern/19256, it's another no-brainer fix of agp_generic_enable
	which I'd like to see committed.
	Try and fail to make the kernel set AGP4X mode in
Index: agpio.h
RCS file: /rep/CVS/netvidia/src/sys/sys/agpio.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -r1.1 -r1.2
< #define AGP_MODE_GET_RATE(x)		((x) & 0x00000003U)
> #define AGP_MODE_GET_RATE(x)		((x) & 0x00000007U)
< #define AGP_MODE_SET_RATE(x,v)		(((x) & ~0x00000003U) | (v))
> #define AGP_MODE_SET_RATE(x,v)		(((x) & ~0x00000007U) | (v))