summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorVenkata(Muni) Anda <muni@nvidia.com>2010-01-19 22:31:09 -0800
committerVenkata(Muni) Anda <muni@nvidia.com>2010-01-19 22:36:53 -0800
commitf4a13989a5013bd865d8b8bfb20b0c5f33ebc2e2 (patch)
tree6e29aeb919dbf57612fab31124039129a34a8003 /arch
parent646ce4ccb5864590c95327826a4bdc5b68c1b2ba (diff)
tegra: PCIe driver bug fix.
Assert to make sure that we are only programming the STD PCI resources was inverted. If I had tested a device which had 64-bit addressing like nvidia GPUs I would have caught this. Change-Id: I0bbbc159749525f22057b3195a2e6cc1cdd85c38
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-tegra/pci-enum.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/mach-tegra/pci-enum.c b/arch/arm/mach-tegra/pci-enum.c
index 4f8c614ff8fc..4355eefda6bc 100644
--- a/arch/arm/mach-tegra/pci-enum.c
+++ b/arch/arm/mach-tegra/pci-enum.c
@@ -522,7 +522,7 @@ static void pci_tegra_setup_pci_device(struct pci_tegra_device *dev)
/* Handle 64 bit addresses by forcing to 32 bit addresses */
if ((flags == 0x0c) || (flags==0x04)) {
bar_index++;
- BUG_ON(bar_index < 6);
+ BUG_ON(bar_index > PCI_STD_RESOURCE_END);
pci_conf_write32(dev->bus, dev->devfn, bar_index * 4
+ PCI_BASE_ADDRESS_0, 0);
}