Skip to contentSkip to conversation

Intel DP43BF requires "pci=assign-busses" to discover some devices

Bug 18412 Bjorn Helgaas 2 participants 4 messages Sep 7, 2012 – Sep 10, 2012 3 messages not in the archive PCI

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]/

A message that is not in the archive (sent off-list or not yet received): [email protected]

Bjorn Helgaas

author maintainer
#2 lore raw
Quoted 8 lines · On Fri, Sep 7, 2012 at 2:40 PM, <[email protected]> wrote:

https://bugzilla.kernel.org/show_bug.cgi?id=18412

--- Comment #4 from VL <[email protected]> 2012-09-07 21:40:04 --- The bug is still there with behaviour exactly as specified by reporter.

Tested with linux-3.4.9 (gentoo), DP43BF motherboard and Intel PRO/1000 NICs. With pci=assign-busses lspci shows devices properly, without it nothing is in the list.

Anybody who wants to help with bugs like this, feel free :) There are a number of open regressions and bugs in the PCI subsystem of
https://bugzilla.kernel.org/

I spend a lot of time looking at these bugs, and that reduces the time I have to review and apply patches.

#3 lore raw
Quoted 9 lines · Bjorn Helgaas
Quoted 8 lines · On Fri, Sep 7, 2012 at 2:40 PM, <[email protected]> wrote:

https://bugzilla.kernel.org/show_bug.cgi?id=18412

--- Comment #4 from VL <[email protected]> 2012-09-07 21:40:04 --- The bug is still there with behaviour exactly as specified by reporter.

Tested with linux-3.4.9 (gentoo), DP43BF motherboard and Intel PRO/1000 NICs. With pci=assign-busses lspci shows devices properly, without it nothing is in the list.

VL,

I rebased for-pci-busn-alloc branch to current pci-next

please check if could fix the problem.

git://git.kernel.org/pub/scm/linux/kernel/git/yinghai/linux-yinghai.git
for-pci-busn-alloc

http://git.kernel.org/?p=linux/kernel/git/yinghai/linux-yinghai.git;a=shortlog;h=refs/heads/for-pci-busn-alloc

Thanks

Yinghai

#4 lore raw
Quoted 13 lines · Yinghai Lu
Quoted 9 lines · Bjorn Helgaas
Quoted 8 lines · On Fri, Sep 7, 2012 at 2:40 PM, <[email protected]> wrote:

https://bugzilla.kernel.org/show_bug.cgi?id=18412

--- Comment #4 from VL <[email protected]> 2012-09-07 21:40:04 --- The bug is still there with behaviour exactly as specified by reporter.

Tested with linux-3.4.9 (gentoo), DP43BF motherboard and Intel PRO/1000 NICs. With pci=assign-busses lspci shows devices properly, without it nothing is in the list.

VL,

Quoted 9 lines

I rebased for-pci-busn-alloc branch to current pci-next

please check if could fix the problem.

git://git.kernel.org/pub/scm/linux/kernel/git/yinghai/linux-yinghai.git
for-pci-busn-alloc

http://git.kernel.org/?p=linux/kernel/git/yinghai/linux-yinghai.git;a=shortlog;h=refs/heads/for-pci-busn-alloc

also you could try attached patch

Thanks

Yinghai

drivers/pci/probe.c +2 -1
index 3cdba8b..0fc2703 100644
@@ -729,7 +729,8 @@ int __devinit pci_scan_bridge(struct pci_bus *bus, struct pci_dev *dev, int max,
 
 	/* Check if setup is sensible at all */
 	if (!pass &&
-	    (primary != bus->number || secondary <= bus->number)) {
+	    (primary != bus->number || secondary <= bus->number ||
+	     secondary > subordinate )) {
 		dev_dbg(&dev->dev, "bus configuration invalid, reconfiguring\n");
 		broken = 1;
 	}

A message that is not in the archive (sent off-list or not yet received): [email protected]

author maintainer
#6 lore raw
Quoted 8 lines · On Sun, Sep 9, 2012 at 2:27 AM, <[email protected]> wrote:

https://bugzilla.kernel.org/show_bug.cgi?id=18412

--- Comment #14 from VL <[email protected]> 2012-09-09 08:27:17 ---

Quoted 3 lines

Given the [bus 20-08] range, I suspect that the patch in comment #9 may fix it, and that's something we could apply. Can you try just that patch on top of a 3.5 or 3.6-rc4 kernel?

yes, this patch fixes the problem.

Yinghai, you put the following (whitespace damaged) patch in the bugzilla, and VL says it fixes his sytem. He has a P2P bridge with secondary > subordinate:

    pci 0000:00:1e.0: PCI bridge to [bus 20-08] (subtractive decode)

The current kernel doesn't probe behind this bridge, so it doesn't find a couple devices. With the patch below, we reassign the secondary bus number from 20 to 08, so we do find those devices.

I'm slightly concerned that if we apply a patch like this, it removes one way a BIOS could hide devices from the OS. But maybe we don't need to worry about that. We have to configure hot-added P2P bridges from scratch, so maybe we should be aggressive about fixing bridges like this, too.

Are you comfortable enough with this patch to post it with a Signed-off-by?

drivers/pci/probe.c +0 -0
index 3cdba8b..a8f1bf6 100644
@@ -729,7 +729,8 @@ int __devinit pci_scan_bridge(struct pci_bus *bus,

struct pci_dev *dev, int max,

/* Check if setup is sensible at all */
if (!pass &&

-	    (primary != bus->number || secondary <= bus->number)) {
+	    (primary != bus->number || secondary <= bus->number ||

+ secondary > subordinate)) {
dev_dbg(&dev->dev, "bus configuration invalid, reconfiguring\n"); broken = 1;
}