Subject: kern/20480: agp(4) can't set AGP4X mode, only 2X
To: None <gnats-bugs@gnats.netbsd.org>
From: None <cube@cubidou.net>
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
>Closed-Date:
>Last-Modified:
>Originator: Quentin Garnier
>Release: NetBSD 1.6O
>Organization:
Quentin Garnier - cube@cubidou.net
"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.
>Environment:
System: NetBSD padme 1.6O NetBSD 1.6O (NVIDIA_ACPI-$Revision: 1.1.1.1 $) #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
>Description:
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,
2001).
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.
>How-To-Repeat:
Try and fail to make the kernel set AGP4X mode in
agp_generic_enable().
>Fix:
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
48c48
< #define AGP_MODE_GET_RATE(x) ((x) & 0x00000003U)
---
> #define AGP_MODE_GET_RATE(x) ((x) & 0x00000007U)
54c54
< #define AGP_MODE_SET_RATE(x,v) (((x) & ~0x00000003U) | (v))
---
> #define AGP_MODE_SET_RATE(x,v) (((x) & ~0x00000007U) | (v))
>Release-Note:
>Audit-Trail:
>Unformatted: