Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261527AbVBNTN3 (ORCPT ); Mon, 14 Feb 2005 14:13:29 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261528AbVBNTN3 (ORCPT ); Mon, 14 Feb 2005 14:13:29 -0500 Received: from [81.2.110.250] ([81.2.110.250]:14547 "EHLO lxorguk.ukuu.org.uk") by vger.kernel.org with ESMTP id S261527AbVBNTN0 (ORCPT ); Mon, 14 Feb 2005 14:13:26 -0500 Subject: Re: avoiding pci_disable_device()... From: Alan Cox To: Greg KH Cc: Jeff Garzik , Linux Kernel Mailing List , Andrew Morton In-Reply-To: <20050214190619.GA9241@kroah.com> References: <4210021F.7060401@pobox.com> <20050214190619.GA9241@kroah.com> Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-Id: <1108404478.23141.2.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Mon, 14 Feb 2005 18:08:01 +0000 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 851 Lines: 21 > > I'm hoping one or two things will happen now: > > * janitors fix up the other PCI drivers along these lines > > * improve the PCI API so that pci_request_regions() is axiomatic > > Do you have any suggestions for how to do this? One would be to keep an "enabler" count. If the device is enabled at boot then set it to one (video, legacy IDE etc) and it never gets back to zero. Otherwise set it to zero and it goes up and down with the last [ab]user clearing it to zero and turning it off. That also deals with the "who disables" question for power mismanagement where the same problem occurs Alan - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/