From owner-svn-src-head@FreeBSD.ORG Tue Jun 21 03:05:18 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 118FC1065672; Tue, 21 Jun 2011 03:05:18 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 01C018FC08; Tue, 21 Jun 2011 03:05:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p5L35HhV076654; Tue, 21 Jun 2011 03:05:17 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p5L35HOS076652; Tue, 21 Jun 2011 03:05:17 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201106210305.p5L35HOS076652@svn.freebsd.org> From: Warner Losh Date: Tue, 21 Jun 2011 03:05:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r223352 - head/sys/dev/pccbb X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Jun 2011 03:05:18 -0000 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. */