aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/setup-res.c
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2005-08-14 23:10:00 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-08-14 23:10:00 -0400
commit4c0e176dd5e4c44dd60f398518f75eedbe1a65f3 (patch)
tree07aea7539f78f221c6fc535a94a07befa2afdb63 /drivers/pci/setup-res.c
parentf241be74b803dcf9d70c9978292946370654320f (diff)
parent2ba84684e8cf6f980e4e95a2300f53a505eb794e (diff)
Merge /spare/repo/linux-2.6/
Diffstat (limited to 'drivers/pci/setup-res.c')
-rw-r--r--drivers/pci/setup-res.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/pci/setup-res.c b/drivers/pci/setup-res.c
index 1ca21d2ba11c..84eedc965688 100644
--- a/drivers/pci/setup-res.c
+++ b/drivers/pci/setup-res.c
@@ -33,6 +33,11 @@ pci_update_resource(struct pci_dev *dev, struct resource *res, int resno)
33 u32 new, check, mask; 33 u32 new, check, mask;
34 int reg; 34 int reg;
35 35
36 /* Ignore resources for unimplemented BARs and unused resource slots
37 for 64 bit BARs. */
38 if (!res->flags)
39 return;
40
36 pcibios_resource_to_bus(dev, &region, res); 41 pcibios_resource_to_bus(dev, &region, res);
37 42
38 pr_debug(" got res [%lx:%lx] bus [%lx:%lx] flags %lx for " 43 pr_debug(" got res [%lx:%lx] bus [%lx:%lx] flags %lx for "
@@ -67,7 +72,7 @@ pci_update_resource(struct pci_dev *dev, struct resource *res, int resno)
67 72
68 if ((new & (PCI_BASE_ADDRESS_SPACE|PCI_BASE_ADDRESS_MEM_TYPE_MASK)) == 73 if ((new & (PCI_BASE_ADDRESS_SPACE|PCI_BASE_ADDRESS_MEM_TYPE_MASK)) ==
69 (PCI_BASE_ADDRESS_SPACE_MEMORY|PCI_BASE_ADDRESS_MEM_TYPE_64)) { 74 (PCI_BASE_ADDRESS_SPACE_MEMORY|PCI_BASE_ADDRESS_MEM_TYPE_64)) {
70 new = 0; /* currently everyone zeros the high address */ 75 new = region.start >> 16 >> 16;
71 pci_write_config_dword(dev, reg + 4, new); 76 pci_write_config_dword(dev, reg + 4, new);
72 pci_read_config_dword(dev, reg + 4, &check); 77 pci_read_config_dword(dev, reg + 4, &check);
73 if (check != new) { 78 if (check != new) {