NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

port-evbarm/51905: GXIO Expension boards arn't configured if GXIO_DEFAULT_EXPANSION isn't defined



>Number:         51905
>Category:       port-evbarm
>Synopsis:       GXIO Expension boards arn't configured if GXIO_DEFAULT_EXPANSION isn't defined
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-evbarm-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jan 22 16:05:00 +0000 2017
>Originator:     Stephan Meisinger
>Release:        -current starting Sat Oct 15 15:27:18 2016 UTC
>Organization:
>Environment:
evbarm on GUMSTIX
>Description:
if GXIO_DEFAULT_EXPANSION isn't compiled the GXIO expansion board isn't configured due to a sofware bug introduced in October 2016. This then leads to a kernel panic on boot:

panic: kernel debugging assertion "gpio < GPIO_NPINS" failed: file "/usr/src/sys/arch/arm/xscale/pxa2x0_gpio.c", line 446 
Stopped in pid 0.20 (system) at netbsd:cpu_Debugger+0x4:        bx      r14

>How-To-Repeat:
boot the default GUMSTIX kernel with an expansion board
>Fix:
Index: sys/arch/evbarm/gumstix/gxio.c
===================================================================
RCS file: /cvsroot/src/sys/arch/evbarm/gumstix/gxio.c,v
retrieving revision 1.24
diff -u -r1.24 gxio.c
--- sys/arch/evbarm/gumstix/gxio.c	28 Oct 2016 19:00:48 -0000	1.24
+++ sys/arch/evbarm/gumstix/gxio.c	22 Jan 2017 15:58:04 -0000
@@ -694,7 +694,7 @@
 		    gxioconflist[i].name,
 		    i == d ? " (DEFAULT)" : "");
 
-	if (s < 0 || gxioconflist[i].name == NULL) {
+	if (s < 0 || gxioconflist[s].name == NULL) {
 #ifdef GXIO_DEFAULT_EXPANSION
 		expansion = __UNCONST(GXIO_DEFAULT_EXPANSION);
 #else
@@ -731,9 +731,9 @@
 #endif
 
 	printf("configure %s expansion (%s)\n",
-	    (s < 0 || gxioconflist[i].name == NULL) ? "default" : "specified",
+	    (s < 0 || gxioconflist[s].name == NULL) ? "default" : "specified",
 	    expansion);
-	gxioconflist[(s < 0 || gxioconflist[i].name == NULL) ? d : s].config();
+	gxioconflist[(s < 0 || gxioconflist[s].name == NULL) ? d : s].config();
 }
 



Home | Main Index | Thread Index | Old Index