Subject: kern/26269: Patch for incorrect arguments in tcx framebuffer driver
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <rjgrace@fastmail.fm>
List: netbsd-bugs
Date: 07/13/2004 03:54:44
>Number:         26269
>Category:       kern
>Synopsis:       Patch for incorrect arguments in tcx framebuffer driver
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jul 13 06:19:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     Richard Grace
>Release:        NetBSD 2.0_BETA
>Organization:
>Environment:
NetBSD Hermes 2.0_BETA NetBSD 2.0_BETA (HERMES) #0: Tue Jul  6 17:09:22 EST 2004  root@Hermes:/usr/tmp/obj/sys/arch/sparc/compile/HERMES sparc
>Description:
When defining TCX_CG8 in the file /usr/src/sys/dev/sbus/tcx.c to support the s24 framebuffer in 24-bit colour mode (cg8 emulation) on Sun Sparcstation 5 systems, there are errors in the file which cause the build to fail.  A patch is below.  The patch does not define TCX_CG8 so a normal kernel build will proceed with the patch - to test the patch, you must define TCX_CG8 on line 54 of the file prior to building.

>How-To-Repeat:
Define TCX_CG8 on line 54 of the file /usr/src/sys/dev/sbus/tcx.c and build a kernel for sparc architecture.

>Fix:
--- tcx.c.orig  2004-07-13 15:58:07.000000000 +1000
+++ tcx.c       2004-07-13 15:58:48.000000000 +1000
@@ -298,11 +298,11 @@
 #ifdef TCX_CG8
        if (!sc->sc_8bit) {
                if (sbus_bus_map(sa->sa_bustag,
-                        (bus_type_t)sc->sc_physadr[TCX_REG_RDFB32].oa_space,
-                        (bus_addr_t)sc->sc_physadr[TCX_REG_RDFB32].oa_base,
+                        sc->sc_physadr[TCX_REG_RDFB32].oa_space,
+                        sc->sc_physadr[TCX_REG_RDFB32].oa_base,
                         TCX_SIZE_DFB32,
                         BUS_SPACE_MAP_LINEAR,
-                        0, &bh) != 0) {
+                        &bh) != 0) {
                        printf("tcxattach: cannot map control planes\n");
                        return;
                }

>Release-Note:
>Audit-Trail:
>Unformatted: