Bug 10745 - PCI: resource allocation failures
Summary: PCI: resource allocation failures
Status: RESOLVED INVALID
Alias: None
Product: Drivers
Classification: Unclassified
Component: PCI (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Jesse Barnes
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-18 11:49 UTC by Jon Daniel
Modified: 2010-01-25 19:03 UTC (History)
3 users (show)

See Also:
Kernel Version: 2.6.26-rc2
Subsystem:
Regression: No
Bisected commit-id:


Attachments
dmesg (23.19 KB, text/plain)
2008-05-18 11:50 UTC, Jon Daniel
Details
lspci -v (4.71 KB, text/plain)
2008-05-18 11:50 UTC, Jon Daniel
Details
/proc/iomem (956 bytes, text/plain)
2008-05-19 05:52 UTC, Jon Daniel
Details
/proc/interrupts (698 bytes, text/plain)
2008-05-19 05:53 UTC, Jon Daniel
Details

Description Jon Daniel 2008-05-18 11:49:32 UTC
Latest working kernel version:
Earliest failing kernel version: 2.6.26-rc2
Distribution: Gentoo Linux
Hardware Environment:
- Gigabyte K8NNXP-940 NFORCE3-150
- Opteron 240
- Voodoo 5 PCI
- ENE CB1410 cardbus bridge
- orinoco_cs based WLAN card
Software Environment: Linux-2.6.25
Problem Description:
At PCI bus initialization I get the following error:

PCI: Failed to allocate mem resource #9:4000000@f0000000 for 0000:01:08.0 return value -16
PCI: Failed to allocate mem resource #10:4000000@f8000000 for 0000:01:08.0 return value -16

The cause seems to be that find_resource returns -EBUSY=-16 in kernel/resource.c for these memory ranges.
I've added some debug output to the correspondening code for the log.
Later on another error is triggered by this one causing the WLAN PCMCIA card firmware initialization to fail.
somehow the parent bridge and the voodoo card seem to like these memory ranges too. I'll try an AGP graphics
card later. But I noticed these kind of errors seems to be fairly common.

Steps to reproduce:
probably just use the above setup with a PCI cardbus bridge


Attached is a dmesg and lspci -v
Comment 1 Jon Daniel 2008-05-18 11:50:08 UTC
Created attachment 16184 [details]
dmesg
Comment 2 Jon Daniel 2008-05-18 11:50:33 UTC
Created attachment 16185 [details]
lspci -v
Comment 3 Bjorn Helgaas 2008-05-18 21:17:56 UTC
Is this a regression?  Is the orinoco card known to be working, i.e., it's not just a broken card?

I can't tell whether the orinoco problem is related to the cardbus mem resource allocation problem.  You might be able to learn something by instrumenting hermes_init() to see where and why it returns -ENODEV.

Please attach the /proc/iomem and /proc/interrupts contents.
Comment 4 Jon Daniel 2008-05-19 05:52:17 UTC
Created attachment 16193 [details]
/proc/iomem
Comment 5 Jon Daniel 2008-05-19 05:53:34 UTC
Created attachment 16194 [details]
/proc/interrupts
Comment 6 Jon Daniel 2008-05-19 08:08:25 UTC
I don't think this is a regression it seems to be around for some time I just plugged in new hardware and it popped up.
I have to check if it also occurs without the voodoo 5.
Maybe the orinoco card isn't working at all but I think the problem is related to the error message above because there are posts of other people around with the same problem.
Comment 7 Jon Daniel 2008-05-26 06:35:11 UTC
I've updated to 2.6.26-rc3 and removed the Voodoo 5 card and plugged some otherones in now the orinoco firmware bug is gone and I only get one:
PCI: region 0000:01:08.0/9 too large: 0x0000000000000000-0x0000000003ffffff
PCI: Failed to allocate mem resource #10:4000000@fc000000 for 0000:01:08.0

I still have to try it with the voodoo 5 again.
Comment 8 Jesse Barnes 2008-06-11 16:53:39 UTC
IIRC TJ is working on some resource allocation changes that may help with stuff like this.  I'll ping him...
Comment 9 Jesse Barnes 2008-07-24 16:07:20 UTC
FYI, TJ wrote up some nice documentation on a new PCI resource allocation scheme he's been working on, maybe you could try out his stuff to see if it works for you?

http://tjworld.net/wiki/Linux/PCIDynamicResourceAllocationManagement
Comment 10 Alan 2010-01-19 17:19:35 UTC
Is this one dead Jesse ?
Comment 11 Jesse Barnes 2010-01-25 19:03:21 UTC
Looks like it.  There's a bunch of new resource code about to land that could address this anyway (if it's not already fixed).  I'll close it out.

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