[Avila] PCI device resource allocation issue

Tim Harvey tim_harvey at yahoo.com
Mon Jan 22 18:14:37 EST 2007


I'm troubleshooting an issue where Linux is sptting out 'PCI: Failed to all=
ocate mem resource' errors keeping me from using two PCI devices in an avil=
a system at the same time.  Can anyone explain to me how to debug/understan=
d/resolve an PCI device resource allocation issue such as the following?=0A=
=0AHere are some relevant excepts from dmesg:=0A=0ALinux version 2.6.19 (th=
arvey at devel) (gcc version 3.4.4) #16 Mon Jan 22 14:49:16 PST 2007=0ACPU: XS=
cale-IXP42x Family [690541f1] revision 1 (ARMv5TE), cr=3D000039ff=0AMachine=
: Intel IXDP425 Development Platform=0AMemory policy: ECC disabled, Data ca=
che writeback=0A...=0AMemory: 64MB =3D 64MB total=0AMemory: 56856KB availab=
le (1480K code, 303K data, 84K init)=0AMount-cache hash table entries: 512=
=0A...=0APCI: Failed to allocate mem resource #0:10000 at 4c000000 for 0000:00=
:02.0=0APCI: Failed to allocate mem resource #0:1000 at 4c000000 for 0000:00:0=
5.0=0APCI: Failed to allocate mem resource #0:1000 at 4c000000 for 0000:00:05.=
1=0APCI: Failed to allocate mem resource #0:100 at 4c000000 for 0000:00:05.2=
=0A=0Aand lspci -vvv=0A00:01.0 Class 0400: 4444:0016 (rev 01)=0A        Sub=
system: ff01:d998=0A        Control: I/O- Mem- BusMaster- SpecCycle- MemWIN=
V- VGASnoop- ParErr+ Stepping- SERR+ FastB2B-=0A        Status: Cap+ 66Mhz-=
 UDF- FastB2B- ParErr- DEVSEL=3Dmedium >TAbort- <TAbort- <MAbort- >SERR- <P=
ERR-=0A        Interrupt: pin A routed to IRQ 28=0A        Region 0: Memory=
 at 48000000 (32-bit, prefetchable) [disabled] [size=3D64M]=0A        Capab=
ilities: [44] Power Management version 2=0A                Flags: PMEClk- D=
SI- D1- D2- AuxCurrent=3D0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)=0A            =
    Status: D0 PME-Enable- DSel=3D0 DScale=3D0 PME-=0A=0A00:02.0 Class 0200=
: 168c:0013 (rev 01)=0A        Subsystem: 168c:2041=0A        Control: I/O-=
 Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr+ Stepping- SERR+ Fast=
B2B-=0A        Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=3Dmedium >T=
Abort- <TAbort- <MAbort- >SERR- <PERR-=0A        Interrupt: pin A routed to=
 IRQ 27=0A        Capabilities: [44] Power Management version 2=0A         =
       Flags: PMEClk- DSI- D1- D2- AuxCurrent=3D375mA PME(D0-,D1-,D2-,D3hot=
-,D3cold-)=0A                Status: D0 PME-Enable- DSel=3D0 DScale=3D2 PME=
-=0A=0A00:05.0 Class 0c03: 1131:1561 (rev 11) (prog-if 10)=0A        Subsys=
tem: 1131:1561=0A        Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- =
VGASnoop- ParErr+ Stepping- SERR+ FastB2B-=0A        Status: Cap+ 66Mhz- UD=
F- FastB2B- ParErr- DEVSEL=3Dmedium >TAbort- <TAbort- <MAbort- >SERR- <PERR=
-=0A        Interrupt: pin A routed to IRQ 0=0A        Region 0: Memory at =
<ignored> (32-bit, non-prefetchable) [disabled]=0A        Capabilities: [dc=
] Power Management version 2=0A                Flags: PMEClk- DSI- D1+ D2- =
AuxCurrent=3D100mA PME(D0-,D1+,D2-,D3hot+,D3cold+)=0A                Status=
: D0 PME-Enable+ DSel=3D0 DScale=3D0 PME+=0A=0A00:05.1 Class 0c03: 1131:156=
1 (rev 11) (prog-if 10)=0A        Subsystem: 1131:1561=0A        Control: I=
/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr+ Stepping- SERR+ F=
astB2B-=0A        Status: Cap+ 66Mhz- UDF- FastB2B- ParErr- DEVSEL=3Dmedium=
 >TAbort- <TAbort- <MAbort- >SERR- <PERR-=0A        Interrupt: pin A routed=
 to IRQ 0=0A        Region 0: Memory at <ignored> (32-bit, non-prefetchable=
) [disabled]=0A        Capabilities: [dc] Power Management version 2=0A    =
            Flags: PMEClk- DSI- D1+ D2- AuxCurrent=3D100mA PME(D0-,D1+,D2-,=
D3hot+,D3cold+)=0A                Status: D0 PME-Enable- DSel=3D0 DScale=3D=
0 PME+=0A=0A00:05.2 Class 0c03: 1131:1562 (rev 11) (prog-if 20)=0A        S=
ubsystem: 1131:1562=0A        Control: I/O- Mem- BusMaster- SpecCycle- MemW=
INV- VGASnoop- ParErr+ Stepping- SERR+ FastB2B-=0A        Status: Cap+ 66Mh=
z- UDF- FastB2B- ParErr- DEVSEL=3Dmedium >TAbort- <TAbort- <MAbort- >SERR- =
<PERR-=0A        Interrupt: pin A routed to IRQ 0=0A        Region 0: Memor=
y at <ignored> (32-bit, non-prefetchable) [disabled]=0A        Capabilities=
: [dc] Power Management version 2=0A                Flags: PMEClk- DSI- D1+=
 D2+ AuxCurrent=3D100mA PME(D0+,D1+,D2+,D3hot+,D3cold+)=0A                S=
tatus: D0 PME-Enable- DSel=3D0 DScale=3D0 PME+=0A=0Aand cat /proc/iomem:=0A=
# cat /proc/iomem =0A00000000-03ffffff : System RAM=0A  0001d000-0018efff :=
 Kernel text=0A  00190000-001dbceb : Kernel data=0A48000000-4bffffff : PCI =
Memory Space=0A  48000000-4bffffff : 0000:00:01.0=0A    48000000-4a00ffff :=
 ivtv0=0A50000000-50ffffff : IXP4XX-Flash.0=0A  50000000-50ffffff : IXP4XXF=
lash=0A60000000-60003fff : ixp4xx_qmgr.0=0A  60000000-60003fff : ixp_qmgr=
=0Ac8000000-c8000fff : serial8250.0=0A  c8000000-c800001f : serial=0Ac80010=
00-c8001fff : serial8250.0=0A  c8001000-c800101f : serial=0Ac8007000-c8007f=
ff : ixp4xx_npe.1=0A  c8007000-c8007fff : NPE-B=0Ac8008000-c8008fff : ixp4x=
x_npe.2=0A  c8008000-c8008fff : NPE-C=0Ac8009000-c80091ff : ixp4xx_mac.0=0A=
  c8009000-c80091ff : ixp4xx_mac=0Ac800a000-c800a1ff : ixp4xx_mac.1=0A  c80=
0a000-c800a1ff : ixp4xx_mac=0A=0A=0AWhat is going on here?  Are the two car=
ds trying to use the same config space?  The two cards that won't play toge=
ther are an Atheros based Wifi card (00:02.0 Class 0200: 168c:0013) and a v=
ideo encoder card (00:01.0 Class 0400: 4444:0016) - both of which operate f=
ine if the other is not in the board at the same time.  Also note that this=
 board has USB support (00:05.0 Class 0c03: 1131:1561, 00:05.1 Class 0c03: =
1131:1561, and 00:05.2 Class 0c03: 1131:1562).  Both the video encoder card=
 and the Atheros wifi card try to map 0x48000000 (64M for the encoder card,=
 and 64K for the wifi card).=0A=0AThanks,=0A=0ATim=0A=0A





More information about the Avila mailing list