summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbz <bz@FreeBSD.org>2009-10-13 20:22:12 +0000
committerbz <bz@FreeBSD.org>2009-10-13 20:22:12 +0000
commit46feb85d448f3da8ff9cdf61fa67ef2519b9228a (patch)
treeb605815abaab0d750320156e768d865cb4e9a243
parent46e48eac252de25565a35b20d50e1b994ce9d229 (diff)
downloadFreeBSD-src-46feb85d448f3da8ff9cdf61fa67ef2519b9228a.zip
FreeBSD-src-46feb85d448f3da8ff9cdf61fa67ef2519b9228a.tar.gz
Immediately after clearing a pending callout that didn't make it due
to the lock we hold, disable interrupts, and announce to the firmware that we are shutting down. Especially do this before disabling blocks. This makes some types of machines with asf enabled no longer hang upon boot, when we start configuring the interface. PR: i386/96382, kern/100410, kern/122252, kern/116328 Reported by: erwin Hardware provided by: TDC A/S Reviewed by: stas Tested by: stas
-rw-r--r--sys/dev/bge/if_bge.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/sys/dev/bge/if_bge.c b/sys/dev/bge/if_bge.c
index 1fabee0..865a0d6 100644
--- a/sys/dev/bge/if_bge.c
+++ b/sys/dev/bge/if_bge.c
@@ -4270,6 +4270,16 @@ bge_stop(struct bge_softc *sc)
callout_stop(&sc->bge_stat_ch);
+ /* Disable host interrupts. */
+ BGE_SETBIT(sc, BGE_PCI_MISC_CTL, BGE_PCIMISCCTL_MASK_PCI_INTR);
+ bge_writembx(sc, BGE_MBX_IRQ0_LO, 1);
+
+ /*
+ * Tell firmware we're shutting down.
+ */
+ bge_stop_fw(sc);
+ bge_sig_pre_reset(sc, BGE_RESET_STOP);
+
/*
* Disable all of the receiver blocks.
*/
@@ -4309,16 +4319,6 @@ bge_stop(struct bge_softc *sc)
BGE_CLRBIT(sc, BGE_MARB_MODE, BGE_MARBMODE_ENABLE);
}
- /* Disable host interrupts. */
- BGE_SETBIT(sc, BGE_PCI_MISC_CTL, BGE_PCIMISCCTL_MASK_PCI_INTR);
- bge_writembx(sc, BGE_MBX_IRQ0_LO, 1);
-
- /*
- * Tell firmware we're shutting down.
- */
-
- bge_stop_fw(sc);
- bge_sig_pre_reset(sc, BGE_RESET_STOP);
bge_reset(sc);
bge_sig_legacy(sc, BGE_RESET_STOP);
bge_sig_post_reset(sc, BGE_RESET_STOP);
OpenPOWER on IntegriCloud