Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Jun 2011 03:05:17 +0000 (UTC)
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r223352 - head/sys/dev/pccbb
Message-ID:  <201106210305.p5L35HOS076652@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: imp
Date: Tue Jun 21 03:05:17 2011
New Revision: 223352
URL: http://svn.freebsd.org/changeset/base/223352

Log:
  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.

Modified:
  head/sys/dev/pccbb/pccbb_pci.c

Modified: head/sys/dev/pccbb/pccbb_pci.c
==============================================================================
--- head/sys/dev/pccbb/pccbb_pci.c	Mon Jun 20 23:04:13 2011	(r223351)
+++ head/sys/dev/pccbb/pccbb_pci.c	Tue Jun 21 03:05:17 2011	(r223352)
@@ -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.
 	 */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201106210305.p5L35HOS076652>