Re: PCI device problem - MMCONFIG, cannot allocate resource region, resource collisions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jesse Barnes wrote:
Can you dump the memory BAR for this device? I guess lspci hides it by default. You may also be able to see it using 'od -t x4 /sys/devices/pci0000\:00/0000:02:02.0/config'.

The D-Link NIC is sitting behind this bridge:
  "00:14.4 PCI bridge: ATI Technologies Inc SB600 PCI to PCI Bridge"

These are the devices behind the bridge:
0000:02:00.0 - FireWire (IEEE 1394): VIA Technologies,
	Inc. IEEE 1394 Host Controller (rev c0)
0000:02:02.0 - D-Link NIC
0000:02:06.0 - Ethernet controller: Realtek Semiconductor Co., Ltd.
	Unknown device 8167 (rev 10)

Here is the D-LINK NIC:
# od -t x4 /sys/devices/pci0000:00/0000:00:14.4/0000:02:02.0/config

0000000 49011186 80b00117 00000011 00004010
0000020 fd5f8000 0000b801 00000000 00000000
0000040 00000000 00000000 00000000 49011186
0000060 fd5c0000 00000048 00000000 1d17010b
0000100 05f00000 01a08000 fc025001 11002000
0000120 80000003 01000000 01040000 00000000
0000140 00000000 00000000 00000000 00000000

# cat /sys/devices/pci0000:00/0000:00:14.4/0000:02:02.0/resource
0x0000000000000000 0x0000000000003fff 0x0000000000000200
0x000000000000b800 0x000000000000b8ff 0x0000000000000101
0x0000000000000000 0x0000000000000000 0x0000000000000000
0x0000000000000000 0x0000000000000000 0x0000000000000000
0x0000000000000000 0x0000000000000000 0x0000000000000000
0x0000000000000000 0x0000000000000000 0x0000000000000000
0x0000000000000000 0x000000000001ffff 0x0000000000007200

In that same folder, "resource0" is 16384 bytes long and "resource1" is 256 bytes.

I assume my error "Cannot allocate resource region 0" refers to the first base address register (config space offset 0x10). That value indicates it is supposed to be memory mapped at address 0xfd5f8000. I am guessing here, but does the length of "resource0" represent how long this region is supposed to be (16384 bytes)?

Now looking at the system memory map:
# cat /proc/iomem
00000000-00097fff : System RAM
00098000-0009ffff : reserved
000a0000-000bffff : Video RAM area
000c0000-000cefff : Video ROM
000cf000-000cffff : Adapter ROM
000f0000-000fffff : System ROM
00100000-3dfbffff : System RAM
  00100000-003dd103 : Kernel code
  003dd104-004de0ff : Kernel data
3dfc0000-3dfcdfff : ACPI Tables
3dfce000-3dffffff : ACPI Non-volatile Storage
40000000-400fffff : PCI Bus #02
  40000000-4001ffff : 0000:02:06.0
fab00000-feafffff : PCI Bus #01		<<< offending memory region
  fc000000-fdffffff : 0000:01:05.0	<<< offending memory region
fed00000-fed003ff : HPET 2
ff400000-ff4fffff : PCI Bus #01
  ff4c0000-ff4dffff : 0000:01:05.0
  ff4f0000-ff4fffff : 0000:01:05.0
ff500000-ff5fffff : PCI Bus #02
  ff5ff400-ff5ff4ff : 0000:02:06.0
    ff5ff400-ff5ff4ff : r8169
  ff5ff800-ff5fffff : 0000:02:00.0
    ff5ff800-ff5fffff : ohci1394
ff6fa000-ff6fafff : 0000:00:13.4
  ff6fa000-ff6fafff : ohci_hcd
ff6fb000-ff6fbfff : 0000:00:13.3
  ff6fb000-ff6fbfff : ohci_hcd
ff6fc000-ff6fcfff : 0000:00:13.2
  ff6fc000-ff6fcfff : ohci_hcd
ff6fd000-ff6fdfff : 0000:00:13.1
  ff6fd000-ff6fdfff : ohci_hcd
ff6fe000-ff6fefff : 0000:00:13.0
  ff6fe000-ff6fefff : ohci_hcd
ff6ff800-ff6ff8ff : 0000:00:13.5
  ff6ff800-ff6ff8ff : ehci_hcd
ff6ffc00-ff6fffff : 0000:00:12.0
  ff6ffc00-ff6fffff : ahci
ff780000-ffffffff : reserved

So these devices are already occupying the space that the D-Link wants:

00:01.0 PCI bridge: ATI Technologies Inc RS480 PCI Bridge
01:05.0 VGA compatible controller: ATI Technologies Inc RS482 [Radeon Xpress 200]

But, the D-Link NIC is behind the bridge at
	ff500000-ff5fffff : PCI Bus #02

Is a PCI device behind a bridge supposed to be mapped into memory that its bridge encompasses? If so, the D-Link is not being mapped into the right region, and the bridge it is behind does not have enough memory assigned to it (ff500000-ff5fffff : PCI Bus #02).

Thanks,

Wayne
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux