Date: Sat, 27 Jul 2013 16:32:34 +0000 (UTC) From: Sean Bruno <sbruno@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253708 - head/sys/dev/ipmi Message-ID: <201307271632.r6RGWYF8046749@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201307271632.r6RGWYF8046749>