From owner-svn-src-head@FreeBSD.ORG Wed Dec 31 07:41:43 2008 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 C8532106566B; Wed, 31 Dec 2008 07:41:42 +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 B729B8FC08; Wed, 31 Dec 2008 07:41:42 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBV7fge1018721; Wed, 31 Dec 2008 07:41:42 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBV7fgnw018720; Wed, 31 Dec 2008 07:41:42 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <200812310741.mBV7fgnw018720@svn.freebsd.org> From: Warner Losh Date: Wed, 31 Dec 2008 07:41:42 +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: r186642 - head/sys/dev/cardbus 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: Wed, 31 Dec 2008 07:41:44 -0000 Author: imp Date: Wed Dec 31 07:41:42 2008 New Revision: 186642 URL: http://svn.freebsd.org/changeset/base/186642 Log: When no driver attaches to a card, don't power down the card. We can now read config registers of cardbus cards that are inserted, but aren't attached to a driver. Also, add a power related comment... Modified: head/sys/dev/cardbus/cardbus.c Modified: head/sys/dev/cardbus/cardbus.c ============================================================================== --- head/sys/dev/cardbus/cardbus.c Wed Dec 31 07:39:23 2008 (r186641) +++ head/sys/dev/cardbus/cardbus.c Wed Dec 31 07:41:42 2008 (r186642) @@ -207,7 +207,7 @@ cardbus_attach_card(device_t cbdev) } if (cardattached > 0) return (0); - POWER_DISABLE_SOCKET(brdev, cbdev); +/* POWER_DISABLE_SOCKET(brdev, cbdev); */ return (ENOENT); } @@ -269,6 +269,7 @@ cardbus_driver_added(device_t cbdev, dri } if (i > 0 && i == numdevs) POWER_ENABLE_SOCKET(device_get_parent(cbdev), cbdev); + /* XXX Should I wait for power to become good? */ for (i = 0; i < numdevs; i++) { dev = devlist[i]; if (device_get_state(dev) != DS_NOTPRESENT)