Subject: kern/35136: Enable Ultra/133 on newer aceride
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: None <gary@duzan.org>
List: netbsd-bugs
Date: 11/26/2006 22:20:00
>Number:         35136
>Category:       kern
>Synopsis:       Enable Ultra/133 on newer aceride
>Confidential:   no
>Severity:       non-critical
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sun Nov 26 22:20:00 +0000 2006
>Originator:     Gary Duzan
>Release:        NetBSD 4.99.4
>Organization:
	Not Much
>Environment:
System: NetBSD capo 4.99.4 NetBSD 4.99.4 (CAPO64) #10: Fri Nov 24 22:31:21 EST 2006 gary@capo:/usr2/obj/sys/arch/amd64/compile.amd64/CAPO64 amd64
Architecture: x86_64
Machine: amd64
>Description:
	My ASrock motherboard includes an aceride with Ultra/133 support, but
	it NetBSD limits it to Ultra/100.
>How-To-Repeat:
	Try it.
>Fix:
	This might not be terribly precise in that a lower revision might
	work as well, but mine is a C7, and it works for that.

Index: aceride.c
===================================================================
RCS file: /usr2/netbsd-cvs/src/sys/dev/pci/aceride.c,v
retrieving revision 1.21
diff -u -p -r1.21 aceride.c
--- aceride.c	16 Nov 2006 01:33:08 -0000	1.21
+++ aceride.c	22 Nov 2006 13:39:55 -0000
@@ -134,7 +134,9 @@ acer_chip_map(struct pciide_softc *sc, s
 		sc->sc_wdcdev.sc_atac.atac_cap |= ATAC_CAP_DMA;
 		if (rev >= 0x20) {
 			sc->sc_wdcdev.sc_atac.atac_cap |= ATAC_CAP_UDMA;
-			if (rev >= 0xC4)
+			if (rev >= 0xC7)
+				sc->sc_wdcdev.sc_atac.atac_udma_cap = 6;
+			else if (rev >= 0xC4)
 				sc->sc_wdcdev.sc_atac.atac_udma_cap = 5;
 			else if (rev >= 0xC2)
 				sc->sc_wdcdev.sc_atac.atac_udma_cap = 4;