PCI: Check bridge secondary/subordinate bus register
PATCH 1/1 PCI: Check bridge secondary/subordinate bus register
Intel DP43BF requires "pci=assign-busses" to discover some devices.
It turns out BIOS set the bridge 00:1e.0 bus register wrong.
Try to check that wrong range and reject so next pass could only assign bus for that bridge.
https://bugzilla.kernel.org/show_bug.cgi?id=18412
drivers/pci/probe.c +2 -1
@@ -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 ; }
Quoted 19 lines · Yinghai Lu
Intel DP43BF requires "pci=assign-busses" to discover some devices.
It turns out BIOS set the bridge 00:1e.0 bus register wrong.
Try to check that wrong range and reject so next pass could only assign bus for that bridge.
https://bugzilla.kernel.org/show_bug.cgi?id=18412Reported-by VL <[email protected]>Tested-by VL <[email protected]>Signed-off-by Yinghai Lu <[email protected]>drivers/pci/probe.c +0
-0
drivers/pci/probe.c int __devinit pci_scan_bridge(struct pci_bus *bus, struct pci_dev *dev, int max, · line 736
Quoted 9 lines
drivers/pci/probe.c +2
-1@@ -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 ; }
Adding a unlikely() around the condition may help?
RP
Quoted 8 lines · Yinghai Lu
Intel DP43BF requires "pci=assign-busses" to discover some devices.
It turns out BIOS set the bridge 00:1e.0 bus register wrong.
Try to check that wrong range and reject so next pass could only assign bus for that bridge.
https://bugzilla.kernel.org/show_bug.cgi?id=18412
Applied to pci/yinghai-misc, thanks!
Quoted 19 lines
Reported-by VL <[email protected]>Tested-by VL <[email protected]>Signed-off-by Yinghai Lu <[email protected]>drivers/pci/probe.c +2
-1@@ -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 ; }
Quoted 11 lines · Bjorn Helgaas
Quoted 8 lines · Yinghai Lu
Intel DP43BF requires "pci=assign-busses" to discover some devices.
It turns out BIOS set the bridge 00:1e.0 bus register wrong.
Try to check that wrong range and reject so next pass could only assign bus for that bridge.
https://bugzilla.kernel.org/show_bug.cgi?id=18412Applied to pci/yinghai-misc, thanks!
?
you already put it in pci/yinghai-bridge-subordinate and next
commit 4fe24116ccc5518d5b692cb4354342ee59970ca5
Merge: 8704936 a53d8d3
Author: Bjorn Helgaas <[email protected]>
Date: Tue Sep 18 11:08:09 2012 -0600
Merge branch 'pci/yinghai-bridge-subordinate' into next
* pci/yinghai-bridge-subordinate:
PCI: Check P2P bridge for invalid secondary/subordinate range
commit a53d8d32a2b768cdcdd0703f4754f49b02753d2c
Author: Yinghai Lu <[email protected]> Date: Mon Sep 10 17:19:33 2012 -0700
PCI: Check P2P bridge for invalid secondary/subordinate range
Bjorn Helgaas
maintainerQuoted 9 lines · Yinghai Lu
Quoted 8 lines · Bjorn Helgaas
Quoted 7 lines · Yinghai Lu
Intel DP43BF requires "pci=assign-busses" to discover some devices.
It turns out BIOS set the bridge 00:1e.0 bus register wrong.
Try to check that wrong range and reject so next pass could only assign bus for that bridge.
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
https://bugzilla.kernel.org/show_bug.cgi?id=18412Applied to pci/yinghai-misc, thanks!
?
you already put it in pci/yinghai-bridge-subordinate and next
I did, but I thought it wasn't worth having a separate branch for each of these onesy-twosy patches (this one, vgaarb, kmalloc/kzalloc, bus resource free, etc.), so I decided to consolidate several of them on pci/yinghai-misc and then merge *that* into next.
So pci/yinghai-bridge-subordinate is dead and I dropped it from next (but as I said, it will get to next eventually via pci/yinghai-misc). I don't recommend using my "next" branch as a base. There's usually no need, because patches usually don't depend on other things in "next". If they do, it's simpler to base them on the specific "pci/yinghai-xxx" branch they require.
Quoted 15 lines
commit
4fe24116ccc5518d5b692cb4354342ee59970ca5
Merge: 8704936 a53d8d3
Author: Bjorn Helgaas <[email protected]>
Date: Tue Sep 18 11:08:09 2012 -0600Merge branch 'pci/yinghai-bridge-subordinate' into next
* pci/yinghai-bridge-subordinate:
PCI: Check P2P bridge for invalid secondary/subordinate rangecommit
a53d8d32a2b768cdcdd0703f4754f49b02753d2cAuthor: Yinghai Lu <[email protected]> Date: Mon Sep 10 17:19:33 2012 -0700PCI: Check P2P bridge for invalid secondary/subordinate range