Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 161270 - PCI hotplug fails due to I/O resource shortage
Summary: PCI hotplug fails due to I/O resource shortage
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: kernel
Version: 4.0
Hardware: i386
OS: Linux
Target Milestone: ---
: ---
Assignee: Prarit Bhargava
QA Contact: Brian Brock
Depends On:
Blocks: 176344
TreeView+ depends on / blocked
Reported: 2005-06-21 22:24 UTC by David Milburn
Modified: 2018-10-19 19:02 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2006-11-29 11:16:10 UTC
Target Upstream Version:

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 (deleted)
2005-06-21 22:26 UTC, David Milburn
no flags Details | Diff

Description David Milburn 2005-06-21 22:24:36 UTC
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 22:26:30 UTC
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 15:53:14 UTC
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 16:16:23 UTC
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 18:10:13 UTC
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.