Bug 161270 - PCI hotplug fails due to I/O resource shortage
PCI hotplug fails due to I/O resource shortage
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: kernel (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Prarit Bhargava
Brian Brock
Depends On:
Blocks: 176344 198868
  Show dependency treegraph
Reported: 2005-06-21 18:24 EDT by David Milburn
Modified: 2010-10-21 23:06 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-11-29 06:16:10 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Proposed patch that doesn't return -ENOMEM if there are no I/O resources available for the slot when hot-adding (1.24 KB, patch)
2005-06-21 18:26 EDT, David Milburn
no flags Details | Diff

  None (edit)
Description David Milburn 2005-06-21 18:24:36 EDT
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 

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):

How reproducible:

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.

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().
Comment 1 David Milburn 2005-06-21 18:26:30 EDT
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
Comment 4 Jason Baron 2005-08-19 11:53:14 EDT
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?
Comment 11 Bob Johnson 2006-04-11 12:16:23 EDT
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.
Comment 15 Prarit Bhargava 2006-09-05 14:10:13 EDT
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


Note You need to log in before you can comment on or make changes to this bug.