* [PATCH] PCI: Check bridge secondary/subordinate bus register
@ 2012-09-11 0:19 Yinghai Lu
2012-09-11 3:03 ` Ram Pai
2012-09-18 22:54 ` Bjorn Helgaas
0 siblings, 2 replies; 5+ messages in thread
From: Yinghai Lu @ 2012-09-11 0:19 UTC (permalink / raw)
To: Bjorn Helgaas; +Cc: VL, linux-pci, Yinghai Lu, stable
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
Reported-by: VL <vl.homutov@gmail.com>
Tested-by: VL <vl.homutov@gmail.com>
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Cc: stable@vger.kernel.org
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index 3cdba8b..a8f1bf6 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -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;
}
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] PCI: Check bridge secondary/subordinate bus register
2012-09-11 0:19 [PATCH] PCI: Check bridge secondary/subordinate bus register Yinghai Lu
@ 2012-09-11 3:03 ` Ram Pai
2012-09-18 22:54 ` Bjorn Helgaas
1 sibling, 0 replies; 5+ messages in thread
From: Ram Pai @ 2012-09-11 3:03 UTC (permalink / raw)
To: Yinghai Lu; +Cc: Bjorn Helgaas, VL, linux-pci, stable
On Mon, Sep 10, 2012 at 05:19:33PM -0700, Yinghai Lu wrote:
> 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
>
> Reported-by: VL <vl.homutov@gmail.com>
> Tested-by: VL <vl.homutov@gmail.com>
> Signed-off-by: Yinghai Lu <yinghai@kernel.org>
> Cc: stable@vger.kernel.org
>
> diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
> index 3cdba8b..a8f1bf6 100644
> --- a/drivers/pci/probe.c
> +++ b/drivers/pci/probe.c
> @@ -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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] PCI: Check bridge secondary/subordinate bus register
2012-09-11 0:19 [PATCH] PCI: Check bridge secondary/subordinate bus register Yinghai Lu
2012-09-11 3:03 ` Ram Pai
@ 2012-09-18 22:54 ` Bjorn Helgaas
2012-09-18 23:55 ` Yinghai Lu
1 sibling, 1 reply; 5+ messages in thread
From: Bjorn Helgaas @ 2012-09-18 22:54 UTC (permalink / raw)
To: Yinghai Lu; +Cc: VL, linux-pci, stable
On Mon, Sep 10, 2012 at 6:19 PM, Yinghai Lu <yinghai@kernel.org> wrote:
> 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!
> Reported-by: VL <vl.homutov@gmail.com>
> Tested-by: VL <vl.homutov@gmail.com>
> Signed-off-by: Yinghai Lu <yinghai@kernel.org>
> Cc: stable@vger.kernel.org
>
> diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
> index 3cdba8b..a8f1bf6 100644
> --- a/drivers/pci/probe.c
> +++ b/drivers/pci/probe.c
> @@ -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;
> }
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] PCI: Check bridge secondary/subordinate bus register
2012-09-18 22:54 ` Bjorn Helgaas
@ 2012-09-18 23:55 ` Yinghai Lu
2012-09-19 13:56 ` Bjorn Helgaas
0 siblings, 1 reply; 5+ messages in thread
From: Yinghai Lu @ 2012-09-18 23:55 UTC (permalink / raw)
To: Bjorn Helgaas; +Cc: VL, linux-pci, stable
On Tue, Sep 18, 2012 at 3:54 PM, Bjorn Helgaas <bhelgaas@google.com> wrote:
> On Mon, Sep 10, 2012 at 6:19 PM, Yinghai Lu <yinghai@kernel.org> wrote:
>> 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!
?
you already put it in pci/yinghai-bridge-subordinate and next
commit 4fe24116ccc5518d5b692cb4354342ee59970ca5
Merge: 8704936 a53d8d3
Author: Bjorn Helgaas <bhelgaas@google.com>
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 <yinghai@kernel.org>
Date: Mon Sep 10 17:19:33 2012 -0700
PCI: Check P2P bridge for invalid secondary/subordinate range
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] PCI: Check bridge secondary/subordinate bus register
2012-09-18 23:55 ` Yinghai Lu
@ 2012-09-19 13:56 ` Bjorn Helgaas
0 siblings, 0 replies; 5+ messages in thread
From: Bjorn Helgaas @ 2012-09-19 13:56 UTC (permalink / raw)
To: Yinghai Lu; +Cc: linux-pci
On Tue, Sep 18, 2012 at 5:55 PM, Yinghai Lu <yinghai@kernel.org> wrote:
> On Tue, Sep 18, 2012 at 3:54 PM, Bjorn Helgaas <bhelgaas@google.com> wrote:
>> On Mon, Sep 10, 2012 at 6:19 PM, Yinghai Lu <yinghai@kernel.org> wrote:
>>> 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!
>
> ?
> 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.
> commit 4fe24116ccc5518d5b692cb4354342ee59970ca5
> Merge: 8704936 a53d8d3
> Author: Bjorn Helgaas <bhelgaas@google.com>
> 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 <yinghai@kernel.org>
> Date: Mon Sep 10 17:19:33 2012 -0700
>
> PCI: Check P2P bridge for invalid secondary/subordinate range
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-09-19 13:57 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-11 0:19 [PATCH] PCI: Check bridge secondary/subordinate bus register Yinghai Lu
2012-09-11 3:03 ` Ram Pai
2012-09-18 22:54 ` Bjorn Helgaas
2012-09-18 23:55 ` Yinghai Lu
2012-09-19 13:56 ` Bjorn Helgaas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).