Skip to contentSkip to conversation

ARM: tegra: fix PCIe resource calculation

PATCH New Stephen Warren 2 participants 2 messages Jul 25, 2012 – Jul 26, 2012

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: tegra: fix PCIe resource calculation

From: Stephen Warren <[email protected]>

Commit 0acc43c "ARM: tegra: use fixed PCI i/o mapping" re-numbered the resource array entries that the driver used, but missed one location. This causes request_resource() to fail, and the driver to panic.

---
Rob, I'm not sure if you can squash this into your PCIE commit, or if we need to apply it on top?

 arch/arm/mach-tegra/pcie.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach-tegra/pcie.c +1 -1
index 576347a..3463fb5 100644
@@ -406,7 +406,7 @@ static int tegra_pcie_setup(int nr, struct pci_sys_data *sys)
 	pp->res[1].name = pp->prefetch_space_name;
 	if (pp->index == 0) {
 		pp->res[1].start = PREFETCH_MEM_BASE_0;
-		pp->res[1].end = pp->res[2].start + PREFETCH_MEM_SIZE_0 - 1;
+		pp->res[1].end = pp->res[1].start + PREFETCH_MEM_SIZE_0 - 1;
 	} else {
 		pp->res[1].start = PREFETCH_MEM_BASE_1;
 		pp->res[1].end = pp->res[1].start + PREFETCH_MEM_SIZE_1 - 1;
Signature · 1 line
1.7.0.4
#1 lore raw

PATCH 1/1 ARM: tegra: fix PCIe resource calculation

Quoted 10 lines · Stephen Warren

From: Stephen Warren <[email protected]>

Commit 0acc43c "ARM: tegra: use fixed PCI i/o mapping" re-numbered the resource array entries that the driver used, but missed one location. This causes request_resource() to fail, and the driver to panic.

---
Rob, I'm not sure if you can squash this into your PCIE commit, or if we need to apply it on top?

I'm rebasing the branch and will incorporate it. Thanks for testing.

Rob

Quoted 18 lines
 arch/arm/mach-tegra/pcie.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach-tegra/pcie.c +1 -1
index 576347a..3463fb5 100644
@@ -406,7 +406,7 @@ static int tegra_pcie_setup(int nr, struct pci_sys_data *sys)
 	pp->res[1].name = pp->prefetch_space_name;
 	if (pp->index == 0) {
 		pp->res[1].start = PREFETCH_MEM_BASE_0;
-		pp->res[1].end = pp->res[2].start + PREFETCH_MEM_SIZE_0 - 1;
+		pp->res[1].end = pp->res[1].start + PREFETCH_MEM_SIZE_0 - 1;
 	} else {
 		pp->res[1].start = PREFETCH_MEM_BASE_1;
 		pp->res[1].end = pp->res[1].start + PREFETCH_MEM_SIZE_1 - 1;