public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Wayne Sherman <wsherman@gmail.com>
To: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: linux-kernel@vger.kernel.org, Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Subject: Re: PCI device problem - MMCONFIG, cannot allocate resource region, resource collisions
Date: Tue, 22 May 2007 16:21:02 -0700	[thread overview]
Message-ID: <46537ADE.1060103@gmail.com> (raw)
In-Reply-To: <200705220858.51604.jbarnes@virtuousgeek.org>

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

  reply	other threads:[~2007-05-22 23:21 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-22  1:42 PCI device problem - MMCONFIG, cannot allocate resource region, resource collisions System Design Works
2007-05-22  2:03 ` Jesse Barnes
2007-05-22  2:36   ` Wayne Sherman
2007-05-22 15:58     ` Jesse Barnes
2007-05-22 23:21       ` Wayne Sherman [this message]
2007-05-22 23:31         ` Jesse Barnes
2007-05-23  9:26           ` Ivan Kokshaysky
2007-05-24  0:20             ` Wayne Sherman
2007-05-24  3:08               ` Jesse Barnes
2007-05-24  3:10                 ` Jesse Barnes
2007-05-24 10:09                   ` Ivan Kokshaysky
2007-05-25  0:27                     ` Wayne Sherman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46537ADE.1060103@gmail.com \
    --to=wsherman@gmail.com \
    --cc=ink@jurassic.park.msu.ru \
    --cc=jbarnes@virtuousgeek.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox