summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsbruno <sbruno@FreeBSD.org>2013-07-27 16:32:34 +0000
committersbruno <sbruno@FreeBSD.org>2013-07-27 16:32:34 +0000
commit9a288b99eda799430b01f11ac9b029782d70c60d (patch)
tree0725a7a10b8832d14ea9580d482d18b4ae46b456
parent1ff1c7f52383c9876ea632989c33363726625bd7 (diff)
downloadFreeBSD-src-9a288b99eda799430b01f11ac9b029782d70c60d.zip
FreeBSD-src-9a288b99eda799430b01f11ac9b029782d70c60d.tar.gz
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.
-rw-r--r--sys/dev/ipmi/ipmi_isa.c19
-rw-r--r--sys/dev/ipmi/ipmivars.h2
2 files changed, 10 insertions, 11 deletions
diff --git a/sys/dev/ipmi/ipmi_isa.c b/sys/dev/ipmi/ipmi_isa.c
index 9d3f9f3..31a88f1 100644
--- a/sys/dev/ipmi/ipmi_isa.c
+++ b/sys/dev/ipmi/ipmi_isa.c
@@ -56,8 +56,15 @@ ipmi_isa_identify(driver_t *driver, device_t parent)
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;
diff --git a/sys/dev/ipmi/ipmivars.h b/sys/dev/ipmi/ipmivars.h
index 614c6be..8e9e130 100644
--- a/sys/dev/ipmi/ipmivars.h
+++ b/sys/dev/ipmi/ipmivars.h
@@ -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);
OpenPOWER on IntegriCloud