From owner-svn-src-head@FreeBSD.ORG Sat Jul 27 16:32:35 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 51D77378; Sat, 27 Jul 2013 16:32:35 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2537C2BAC; Sat, 27 Jul 2013 16:32:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6RGWZvZ046751; Sat, 27 Jul 2013 16:32:35 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6RGWYF8046749; Sat, 27 Jul 2013 16:32:34 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201307271632.r6RGWYF8046749@svn.freebsd.org> From: Sean Bruno Date: Sat, 27 Jul 2013 16:32:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253708 - head/sys/dev/ipmi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Jul 2013 16:32:35 -0000 Author: sbruno Date: Sat Jul 27 16:32:34 2013 New Revision: 253708 URL: http://svnweb.freebsd.org/changeset/base/253708 Log: At some point after stable/7 the ACPI and ISA interfaces to the IPMI controller no longer have the parent in the device tree. This causes the identify function in ipmi_isa.c to attempt to probe and poke at the ISA IPMI interface Move the check for ipmi_attached out of the ipmi_isa_attach function and into the ipmi_isa_identify function. Remove the check of the device tree for ipmi devices attached. This probing appears to make Broadcom management firmware on Dell machines crash and emit NMI EISA warnings at various times requiring power cycles of the machines to restore. Bump MAX_TIMEOUT to 6 seconds as a hack for super slow IPMI interfaces that need longer to respond to our intial probes on startup. Tested on Dell R410, R510, R815, HP DL160G6 This is MFC candidate for 9.2R Reviewed by: peter MFC after: 2 weeks Sponsored by: Yahoo! Inc. Modified: head/sys/dev/ipmi/ipmi_isa.c head/sys/dev/ipmi/ipmivars.h Modified: head/sys/dev/ipmi/ipmi_isa.c ============================================================================== --- head/sys/dev/ipmi/ipmi_isa.c Sat Jul 27 15:28:31 2013 (r253707) +++ head/sys/dev/ipmi/ipmi_isa.c Sat Jul 27 16:32:34 2013 (r253708) @@ -56,8 +56,15 @@ ipmi_isa_identify(driver_t *driver, devi struct ipmi_get_info info; uint32_t devid; - if (ipmi_smbios_identify(&info) && info.iface_type != SSIF_MODE && - device_find_child(parent, "ipmi", -1) == NULL) { + /* + * Give other drivers precedence. Unfortunately, this doesn't + * work if we have an SMBIOS table that duplicates a PCI device + * that's later on the bus than the PCI-ISA bridge. + */ + if (ipmi_attached) + return; + + if (ipmi_smbios_identify(&info) && info.iface_type != SSIF_MODE) { /* * XXX: Hack alert. On some broken systems, the IPMI * interface is described via SMBIOS, but the actual @@ -175,14 +182,6 @@ ipmi_isa_attach(device_t dev) !ipmi_hint_identify(dev, &info)) return (ENXIO); - /* - * Give other drivers precedence. Unfortunately, this doesn't - * work if we have an SMBIOS table that duplicates a PCI device - * that's later on the bus than the PCI-ISA bridge. - */ - if (ipmi_attached) - return (EBUSY); - switch (info.iface_type) { case KCS_MODE: count = 2; Modified: head/sys/dev/ipmi/ipmivars.h ============================================================================== --- head/sys/dev/ipmi/ipmivars.h Sat Jul 27 15:28:31 2013 (r253707) +++ head/sys/dev/ipmi/ipmivars.h Sat Jul 27 16:32:34 2013 (r253708) @@ -219,7 +219,7 @@ struct ipmi_ipmb { ((sc)->ipmi_io_res[1] != NULL ? OUTB_MULTIPLE(sc, x, value) : \ OUTB_SINGLE(sc, x, value)) -#define MAX_TIMEOUT 3 * hz +#define MAX_TIMEOUT 6 * hz int ipmi_attach(device_t); int ipmi_detach(device_t);