From owner-freebsd-i386@FreeBSD.ORG Wed Jul 12 05:10:15 2006 Return-Path: X-Original-To: freebsd-i386@hub.freebsd.org Delivered-To: freebsd-i386@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A67D116A4E1 for ; Wed, 12 Jul 2006 05:10:15 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0E3CB43D45 for ; Wed, 12 Jul 2006 05:10:15 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k6C5AE1B041385 for ; Wed, 12 Jul 2006 05:10:14 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k6C5AEXb041384; Wed, 12 Jul 2006 05:10:14 GMT (envelope-from gnats) Resent-Date: Wed, 12 Jul 2006 05:10:14 GMT Resent-Message-Id: <200607120510.k6C5AEXb041384@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-i386@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Arthur Hartwig Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E881B16A4DF for ; Wed, 12 Jul 2006 05:04:45 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9D78B43D55 for ; Wed, 12 Jul 2006 05:04:45 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id k6C54j4g097137 for ; Wed, 12 Jul 2006 05:04:45 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id k6C54jh9097136; Wed, 12 Jul 2006 05:04:45 GMT (envelope-from nobody) Message-Id: <200607120504.k6C54jh9097136@www.freebsd.org> Date: Wed, 12 Jul 2006 05:04:45 GMT From: Arthur Hartwig To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Cc: Subject: i386/100142: /dev/smb0 device not available on systems with Intel PiiX4 X-BeenThere: freebsd-i386@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: I386-specific issues for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Jul 2006 05:10:15 -0000 >Number: 100142 >Category: i386 >Synopsis: /dev/smb0 device not available on systems with Intel PiiX4 >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-i386 >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Jul 12 05:10:14 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Arthur Hartwig >Release: 6.0 >Organization: Nokia >Environment: FreeBSD oz-net-10.nes.nokia.com 6.0-RELEASE FreeBSD 6.0-RELEASE #3: Wed Mar 1 10:46:02 EST 2006 hartwig@oz-net-10.nes.nokia.com:/usr/src/sys/i386/compile/oz-net-10 i386 >Description: System configured with devices intppm, smbb and smbus. On startup smbus1 is reported but no smbus0 is reported. There is no file /dev/smb0 In sys/pci/intpm.c intpm_attach() executes smbinterface = device_add_child(dev, ""intsmb", unit); device_probe_and_attach(smbinterface); device_probe_and_attach() calls device_probe_child() which ends us calling intsmb_probe() twice, once when search for the best matching driver and again, because intsmb_probe() returns BUS_PROBE_DEFAULT, immediately after the comment "Call the probe method again to make sure we have the right description." Calling intsmb_probe() twice results in creation of devices smbus0 (on the first call to intsmb_probe) and smbus1 (on the second call to intsmb_probe). The second probe call results in When intsmb_attach(0 is called, sc->smbus contains a pointer to a device structure for smbus1 and consequently smbus1 is reported in the startup. >How-To-Repeat: >Fix: Suggested fix: In sys/pci/intpm move sc->smbus=device_add_child(dev, "smbus", -1); if (!sc->smbus) return (EINVAL); /* XXX don't know what to return else */ from intsmb_probe() to intsmb_attach() The suggested fix mirrors more closely the code in sys/pci/viapm.c and sys/pci/amdpm.c >Release-Note: >Audit-Trail: >Unformatted: