From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg KH Date: Thu, 07 Feb 2002 08:43:29 +0000 Subject: Re: PCI hotplug question: resources Message-Id: List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On Tue, Feb 05, 2002 at 05:17:02PM -0800, Stephen Williams wrote: > > I have in front of me an Adex Electronics PCI bus extender with a > disconnect switch. I would like to use this to plug PCI boards into > a Linux system, configure the device, and turn it on. The idea is to > test hardware, not to provide an end-user tool. > > So the question is valid: Is there a way under Linux to grab a bunch > of PCI resources after the system is already running? Detach them > again? Yes there is. And I even have patch around here that will do exactly what you are looking for. Someone sent it to me a while ago in relation to the pci hotplug drivers. I think they had that same extender. If I remember, the code would basically walk the pci bus when you told it to (loaded the driver), and create new pci devices for any new devices found. Then the module would fail to load, freeing up the kernel memory again. Nice idea, but odd implementation :) The interupt values it would get from the BIOS I think (IO_APIC_something...), which the IBM PCI Hotplug driver also relies on. But if you look at the current Compaq pci hotplug driver, it doesn't use this, and it seems to just recycle interrupts. Actually that portion of the Compaq driver seems a bit odd to me now... I don't think it did anything about removals. Let me know if you're interested in the code and I'll dig it up. Enough interest and I'll port it to the existing pci hotplug core and put it in the main kernel (but I'd really like to be able to test the driver myself before I do that...) thanks, greg k-h _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel