From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050302 Firefox/1.0.1 Fedora/1.0.1-1.3.2 Description of problem: PCI hotplug with SHPCHP driver fails when I/O space cannot be allocated for the slot, even though the PCI device being hot-added could be handled by its driver without using I/O space. At hot-add time, SHPCHP driver will try to allocate I/O Resources (I/O space, MMIO, Prefechable MMIO) to the device being hot-added. If SHPCHP driver fails to allocate one of these resources to the slot, it will return as error (-ENOMEM) with the following message. shpchp: Got NO IO resource(length=0xXXXX) As a result, hotplug will be failure and hotpluged devices are unusable. For PCI devices that are handled by drivers without using I/O space, the device being hot-added can work even if SHPCHP driver fails to allocate I/O space as long as it doesn't return an error. Version-Release number of selected component (if applicable): kernel-2.6.9-5.0.3.EL How reproducible: Always Steps to Reproduce: 1. Hot-add a PCI device with SHPCHP driver on a large scale server that has already allocated I/O slot resources for existing PCI devices. 2. 3. Actual Results: PCI hotplug fails with the following error message: shpchp: Got NO IO resource(length=0xXXXX) Expected Results: PCI hotplug succeeds even if it couldn't allocate I/O resources for the slot. Additional info: Attaching a patch that customer has verified to work with their drivers that use pci_enable_device_bars() instead of pci_enable_device().
Created attachment 115786 [details] Proposed patch that doesn't return -ENOMEM if there are no I/O resources available for the slot when hot-adding
sorry for taking so long on this one. I'm no hotplug expert...but i don't see this patch in the upstream 2.6 kernel. Was there any attempt to get it merged there?
This issue is on Red Hat Engineering's list of planned work items for the upcoming Red Hat Enterprise Linux 4.4 release. Engineering resources have been assigned and barring unforeseen circumstances, Red Hat intends to include this item in the 4.4 release.
AFAICT, the patch breaks the situation where a device has been hotplug inserted and there are no available resources for the device... A suggestion to Fujitsu is to: - change the return of get_io_resource to success/fail - add a struct resource *res arg to get_io_resource for the actual resource values P.