Subject: kern/24232: A lock failure of register
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <kiyohara@kk.iij4u.or.jp>
List: netbsd-bugs
Date: 01/25/2004 06:21:48
>Number:         24232
>Category:       kern
>Synopsis:       A lock failure of register
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sun Jan 25 06:22:07 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     KIYOHARA Takashi
>Release:        NetBSD 1.6ZG
>Organization:
>Environment:
NetBSD evbppc.fool 1.6ZG NetBSD 1.6ZG (OPENBLOCKS266) #0: Sun Dec 21 12:58:20 JST 2003  lance@evbppc.fool:/sys/arch/evbppc/compile/OPENBLOCKS266 evbppc
>Description:
it forgets the lock of register, after writing in. This is in a very dangerous state. Please correct immediately.

>How-To-Repeat:

>Fix:
Index: x1226.c
===================================================================
RCS file: /cvsroot/src/sys/dev/i2c/x1226.c,v
retrieving revision 1.1
diff -c -r1.1 x1226.c
*** x1226.c     2003/10/06 18:02:02     1.1
--- x1226.c     2004/01/15 15:25:28
***************
*** 432,438 ****
        addr = X1226_REG_SR;
        cmdbuf[0] = (addr & 0xff);
        cmdbuf[1] = ((addr >> 8) & 0xff);
!       cmdbuf[2] = X1226_FLAG_SR_WEL;
        if (iic_exec(sc->sc_tag,
                I2C_OP_WRITE_WITH_STOP,
                sc->sc_address, cmdbuf, 2, &cmdbuf[2], 1, 0) != 0) {
--- 434,440 ----
        addr = X1226_REG_SR;
        cmdbuf[0] = (addr & 0xff);
        cmdbuf[1] = ((addr >> 8) & 0xff);
!       cmdbuf[2] = 0;
        if (iic_exec(sc->sc_tag,
                I2C_OP_WRITE_WITH_STOP,
                sc->sc_address, cmdbuf, 2, &cmdbuf[2], 1, 0) != 0) {
>Release-Note:
>Audit-Trail:
>Unformatted: