Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1223255 > unrolled thread
| Started by | David Daney <ddaney.cavm@gmail.com> |
|---|---|
| First post | 2015-09-12 01:30 +0200 |
| Last post | 2015-09-15 20:00 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 5/6] PCI: generic: Pass proper starting bus number to pci_scan_root_bus(). David Daney <ddaney.cavm@gmail.com> - 2015-09-12 01:30 +0200
Re: [PATCH 5/6] PCI: generic: Pass proper starting bus number to pci_scan_root_bus(). Will Deacon <will.deacon@arm.com> - 2015-09-15 20:00 +0200
| From | David Daney <ddaney.cavm@gmail.com> |
|---|---|
| Date | 2015-09-12 01:30 +0200 |
| Subject | [PATCH 5/6] PCI: generic: Pass proper starting bus number to pci_scan_root_bus(). |
| Message-ID | <q7FVw-85A-1@gated-at.bofh.it> |
From: David Daney <david.daney@cavium.com>
If the bus is being configured with a bus-range that does not start at
zero, pass that starting bus number to pci_scan_root_bus(). Passing
the incorrect value of zero causes attempted config accesses outside
of the supported range, which cascades to an OOPs spew and eventual
kernel panic.
Signed-off-by: David Daney <david.daney@cavium.com>
---
drivers/pci/host/pci-host-generic.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pci/host/pci-host-generic.c b/drivers/pci/host/pci-host-generic.c
index fce5bf7..8219c0b 100644
--- a/drivers/pci/host/pci-host-generic.c
+++ b/drivers/pci/host/pci-host-generic.c
@@ -265,7 +265,7 @@ static int gen_pci_probe(struct platform_device *pdev)
if (!pci_has_flag(PCI_PROBE_ONLY))
pci_add_flags(PCI_REASSIGN_ALL_RSRC | PCI_REASSIGN_ALL_BUS);
- bus = pci_scan_root_bus(dev, 0,
+ bus = pci_scan_root_bus(dev, pci->cfg.bus_range->start,
&pci->cfg.ops.ops, pci, &pci->resources);
if (!bus) {
dev_err(dev, "Scanning rootbus failed");
--
1.7.11.7
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Will Deacon <will.deacon@arm.com> |
|---|---|
| Date | 2015-09-15 20:00 +0200 |
| Subject | Re: [PATCH 5/6] PCI: generic: Pass proper starting bus number to pci_scan_root_bus(). |
| Message-ID | <q92Gm-3AZ-13@gated-at.bofh.it> |
| In reply to | #1223255 |
On Sat, Sep 12, 2015 at 12:21:58AM +0100, David Daney wrote:
> From: David Daney <david.daney@cavium.com>
>
> If the bus is being configured with a bus-range that does not start at
> zero, pass that starting bus number to pci_scan_root_bus(). Passing
> the incorrect value of zero causes attempted config accesses outside
> of the supported range, which cascades to an OOPs spew and eventual
> kernel panic.
>
> Signed-off-by: David Daney <david.daney@cavium.com>
> ---
> drivers/pci/host/pci-host-generic.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pci/host/pci-host-generic.c b/drivers/pci/host/pci-host-generic.c
> index fce5bf7..8219c0b 100644
> --- a/drivers/pci/host/pci-host-generic.c
> +++ b/drivers/pci/host/pci-host-generic.c
> @@ -265,7 +265,7 @@ static int gen_pci_probe(struct platform_device *pdev)
> if (!pci_has_flag(PCI_PROBE_ONLY))
> pci_add_flags(PCI_REASSIGN_ALL_RSRC | PCI_REASSIGN_ALL_BUS);
>
> - bus = pci_scan_root_bus(dev, 0,
> + bus = pci_scan_root_bus(dev, pci->cfg.bus_range->start,
> &pci->cfg.ops.ops, pci, &pci->resources);
> if (!bus) {
> dev_err(dev, "Scanning rootbus failed");
Acked-by: Will Deacon <will.deacon@arm.com>
Will
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web