aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjorn Helgaas <bjorn.helgaas@hp.com>2006-06-09 14:28:29 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2006-06-21 14:59:59 -0400
commitea28502d5d0fc624777a8a6b4d6865d282055b05 (patch)
tree561045b0bca2e2493bf41628dd965a8cb958f900
parent17d6dc8ff098cc8c57941c82f7702804302b1ea1 (diff)
[PATCH] PCI: fix to pci ignore pre-set 64-bit bars on 32-bit platforms
When we detect a 64-bit pre-set address in a BAR on a 32-bit platform, we disable it and treat it as if it had been unset, thus allowing the general address assignment code to assign a new address to it when the device is enabled. This can happen either if the firmware assigns 64-bit addresses; additionally, some cards have been found "in the wild" which do not come out of reset with all the BAR registers set to zero. Unfortunately, the patch that implemented this tested the low part of the address instead of the high part of the address. This patch fixes that. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/pci/probe.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index 5c4924c27f09..27148db06ba0 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -199,7 +199,7 @@ static void pci_read_bases(struct pci_dev *dev, unsigned int howmany, int rom)
199 printk(KERN_ERR "PCI: Unable to handle 64-bit BAR for device %s\n", pci_name(dev)); 199 printk(KERN_ERR "PCI: Unable to handle 64-bit BAR for device %s\n", pci_name(dev));
200 res->start = 0; 200 res->start = 0;
201 res->flags = 0; 201 res->flags = 0;
202 } else if (l) { 202 } else if (lhi) {
203 /* 64-bit wide address, treat as disabled */ 203 /* 64-bit wide address, treat as disabled */
204 pci_write_config_dword(dev, reg, l & ~(u32)PCI_BASE_ADDRESS_MEM_MASK); 204 pci_write_config_dword(dev, reg, l & ~(u32)PCI_BASE_ADDRESS_MEM_MASK);
205 pci_write_config_dword(dev, reg+4, 0); 205 pci_write_config_dword(dev, reg+4, 0);