NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
kern/45622: i386 kernel panics at pic16lc_attach.
>Number: 45622
>Category: kern
>Synopsis: i386 kernel panics at pic16lc_attach.
>Confidential: no
>Severity: serious
>Priority: low
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Nov 17 13:05:00 +0000 2011
>Originator: Tetsuya Isaki
>Release: NetBSD 5.1/i386
>Organization:
>Environment:
NetBSD XXX.jp 5.1 NetBSD 5.1 (XXX) #8: Wed Nov 16 15:17:39 JST 2011
root%XXX.jp@localhost:/usr/src/sys/arch/i386/compile/XXX i386
>Description:
pic16lc* at iic? panics during device attach (on non-XBOX i386
machines?).
# yeah, I've written 'pic16lc* at iic?' on my kernel config
# for non-XBOX machine by mistake :)
I only tested it on 5.1, but current source code seems to
have the same problem, I think.
>How-To-Repeat:
add "pic16lc* at iic?" in your kernel config.
>Fix:
I'm not sure but how about it?
--- sys/dev/i2c/pic16lc.c.ORG 2008-06-08 12:56:09.000000000 +0900
+++ sys/dev/i2c/pic16lc.c 2011-11-16 15:22:48.000000000 +0900
@@ -56,6 +56,10 @@
void pic16lc_poweroff(void);
void pic16lc_setled(uint8_t);
+#define XBOX_SENSOR_CPU 0
+#define XBOX_SENSOR_BOARD 1
+#define XBOX_NSENSORS 2
+
struct pic16lc_softc {
device_t sc_dev;
@@ -63,16 +67,12 @@
i2c_addr_t sc_addr;
void * sc_ih;
- envsys_data_t sc_sensor[1];
+ envsys_data_t sc_sensor[XBOX_NSENSORS];
struct sysmon_envsys *sc_sme;
};
static struct pic16lc_softc *pic16lc = NULL;
-#define XBOX_SENSOR_CPU 0
-#define XBOX_SENSOR_BOARD 1
-#define XBOX_NSENSORS 2
-
static void pic16lc_update(struct pic16lc_softc *, envsys_data_t *);
static void pic16lc_refresh(struct sysmon_envsys *, envsys_data_t *);
Home |
Main Index |
Thread Index |
Old Index