From owner-freebsd-bugs Sun Apr 21 17:40:10 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 8C8FC37B419 for ; Sun, 21 Apr 2002 17:40:01 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g3M0e1a15476; Sun, 21 Apr 2002 17:40:01 -0700 (PDT) (envelope-from gnats) Received: from mailout05.sul.t-online.com (mailout05.sul.t-online.com [194.25.134.82]) by hub.freebsd.org (Postfix) with ESMTP id 649EF37B405 for ; Sun, 21 Apr 2002 17:37:23 -0700 (PDT) Received: from fwd08.sul.t-online.de by mailout05.sul.t-online.com with smtp id 16zRpV-0001H3-03; Mon, 22 Apr 2002 02:37:17 +0200 Received: from foobar.franken.de (520066542279-0001@[217.235.93.55]) by fmrl08.sul.t-online.com with esmtp id 16zRpT-0pMqRcC; Mon, 22 Apr 2002 02:37:15 +0200 Received: (from logix@localhost) by foobar.franken.de (8.11.3/8.11.1) id g3M0bDf23725; Mon, 22 Apr 2002 02:37:13 +0200 (CEST) (envelope-from logix) Message-Id: <200204220037.g3M0bDf23725@foobar.franken.de> Date: Mon, 22 Apr 2002 02:37:13 +0200 (CEST) From: Harold Gutch Reply-To: logix@foobar.franken.de To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: kern/37326: smbus/bktr crash when omitting "device iicsmb" Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 37326 >Category: kern >Synopsis: smbus/bktr crash when omitting "device iicsmb" >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Apr 21 17:40:01 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Harold Gutch >Release: FreeBSD 4.5-STABLE i386 >Organization: >Environment: System: FreeBSD overdose.franken.de 4.5-STABLE FreeBSD 4.5-STABLE #8: Mon Apr 22 00:04:52 CEST 2002 root@overdose.franken.de:/space2/obj/space2/src/sys/OVERDOSE i386 >Description: A kernel with device bktr device smbus device viapm device smb device iicbus device iicbb but WITHOUT device iicsmb in the configfile compiles without problems. When trying to access /dev/smb0 using e.g. lmmon from the ports, FreeBSD crashes. These are the relevant parts from the stacktrace I made after the crash: #5 0xc027b75b in trap (frame={tf_fs = 16, tf_es = 16, tf_ds = 16, tf_edi = 0, tf_esi = -1059782784, tf_ebp = -861672200, tf_isp = -861672220, tf_ebx = -1063041088, tf_edx = -1063013120, tf_ecx = -1059782784, tf_eax = 0, tf_trapno = 12, tf_err = 0, tf_eip = -1072208830, tf_cs = 8, tf_eflags = 66118, tf_esp = -861672176, tf_ss = -1072336249}) at /space2/src/sys/i386/i386/trap.c:458 #6 0xc0176442 in device_get_softc (dev=0x0) at /space2/src/sys/kern/subr_bus.c:980 #7 0xc0157287 in iicbus_request_bus (bus=0x0, dev=0xc0d4ff80, how=3) at /space2/src/sys/dev/iicbus/iiconf.c:103 #8 0xc0228170 in bti2c_smb_callback (dev=0xc0d4ff80, index=1, data=0xcca3ed74) at /space2/src/sys/dev/bktr/bktr_i2c.c:237 Note bus=0x0 in frame #7 and dev=0x0 in frame #6. >How-To-Repeat: Add the options device bktr device smbus device viapm device smb device iicbus device iicbb Be sure NOT to include device iicsmb to your kernel configfile, recompile and -install that kernel and reboot. Install ports/sysutils/lmmon and run it. >Fix: The obvious "fix" (a check wether sc->iicbus is NULL) in dev/bktr/bktr_i2c.c doesn't work - even worse, it hangs the machine when accessing smbus (while the plain source at least panics and then reboots). As I don't have any closer insight on smbus, I'm sorry to say that can't provide a working fix right now. >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message