summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/dev/bxe/if_bxe.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/dev/bxe/if_bxe.c b/sys/dev/bxe/if_bxe.c
index b60d6e2..c51480c 100644
--- a/sys/dev/bxe/if_bxe.c
+++ b/sys/dev/bxe/if_bxe.c
@@ -3554,8 +3554,14 @@ bxe_shutdown(device_t dev)
sc = device_get_softc(dev);
DBENTER(BXE_INFO_LOAD | BXE_INFO_RESET | BXE_INFO_UNLOAD);
+ /* Stop the controller, but only if it was ever started.
+ * Stopping an uninitialized controller can cause
+ * IPMI bus errors on some systems.
+ */
BXE_CORE_LOCK(sc);
- bxe_stop_locked(sc, UNLOAD_NORMAL);
+ if (sc->state != BXE_STATE_CLOSED) {
+ bxe_stop_locked(sc, UNLOAD_NORMAL);
+ }
BXE_CORE_UNLOCK(sc);
DBEXIT(BXE_INFO_LOAD | BXE_INFO_RESET | BXE_INFO_UNLOAD);
OpenPOWER on IntegriCloud