From owner-cvs-all@FreeBSD.ORG Mon Feb 28 01:27:28 2005 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A65BA16A4F9; Mon, 28 Feb 2005 01:27:24 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4C25543D31; Mon, 28 Feb 2005 01:27:24 +0000 (GMT) (envelope-from imp@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j1S1ROnG066283; Mon, 28 Feb 2005 01:27:24 GMT (envelope-from imp@repoman.freebsd.org) Received: (from imp@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j1S1ROkh066282; Mon, 28 Feb 2005 01:27:24 GMT (envelope-from imp) Message-Id: <200502280127.j1S1ROkh066282@repoman.freebsd.org> From: Warner Losh Date: Mon, 28 Feb 2005 01:27:24 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/dev/cardbus cardbus.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Feb 2005 01:27:28 -0000 imp 2005-02-28 01:27:24 UTC FreeBSD src repository Modified files: sys/dev/cardbus cardbus.c Log: There were two calls to cardbus_do_cis when cardbus_do_cis changed, yet I only changed one of them. So when we loaded drivers, we'd fail to allocate resources correct. This pointed out that we were doing the wrong thing when we failed to attach a child. We released all the resources and almost deleted the child. Instead, we should keep the resources allocated so when/if a driver is loaded, we can go w/o having to allocate them. We use pci_cfg_save/restore to restore the BARs with these resources. This seems to fix the problems that we were seeing that I thought might have magically gone away in the last revision of cardbus.c (but really didn't). Noticed by: avatar (nicely done!) Revision Changes Path 1.49 +5 -7 src/sys/dev/cardbus/cardbus.c