summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2011-06-21 03:05:17 +0000
committerimp <imp@FreeBSD.org>2011-06-21 03:05:17 +0000
commit6526fa0e237601c7b818b1178dad61b9b3d743b1 (patch)
tree42942d35733e2828ec9fce1a547d8c5457759e51
parent19ae02bba572390c7299166228d31e54003e094a (diff)
downloadFreeBSD-src-6526fa0e237601c7b818b1178dad61b9b3d743b1.zip
FreeBSD-src-6526fa0e237601c7b818b1178dad61b9b3d743b1.tar.gz
Mark the card as bad on shutdown. This means that bus_child_present
will return false on shutdown and massive spewage from usb disappears for usb cardbus adapters.
-rw-r--r--sys/dev/pccbb/pccbb_pci.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/dev/pccbb/pccbb_pci.c b/sys/dev/pccbb/pccbb_pci.c
index c89e5ad..6cdc4e4 100644
--- a/sys/dev/pccbb/pccbb_pci.c
+++ b/sys/dev/pccbb/pccbb_pci.c
@@ -658,6 +658,12 @@ cbb_pci_shutdown(device_t brdev)
struct cbb_softc *sc = (struct cbb_softc *)device_get_softc(brdev);
/*
+ * We're about to pull the rug out from the card, so mark it as
+ * gone to prevent harm.
+ */
+ sc->cardok = 0;
+
+ /*
* Place the cards in reset, turn off the interrupts and power
* down the socket.
*/
OpenPOWER on IntegriCloud