aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorPeter Chubb <peterc@gelato.unsw.edu.au>2008-10-12 20:49:04 -0400
committerJesse Barnes <jbarnes@virtuousgeek.org>2008-10-20 13:54:30 -0400
commite354597cce8d219d135d65e585dc4f30323486b9 (patch)
treedbf2a270f874c5ef56250021927de9ce56392e35 /drivers/pci
parent557848c3c03ad1d1e66cb3b5b06698e3a9ebc33c (diff)
PCI: fix 64-vbit prefetchable memory resource BARs
Since patch 6ac665c63dcac8fcec534a1d224ecbb8b867ad59 my infiniband controller hasn't worked. This is because it has 64-bit prefetchable memory, which was mistakenly being taken to be 32-bit memory. The resource flags in this case are PCI_BASE_ADDRESS_MEM_TYPE_64 | PCI_BASE_ADDRESS_MEM_PREFETCH. This patch checks only for the PCI_BASE_ADDRESS_MEM_TYPE_64 bit; thus whether the region is prefetchable or not is ignored. This fixes my Infiniband. Reviewed-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: Peter Chubb <peterc@gelato.unsw.edu.au> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci')
-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 f6754e87f046..49599ac49bda 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -217,7 +217,7 @@ static inline enum pci_bar_type decode_bar(struct resource *res, u32 bar)
217 217
218 res->flags = bar & ~PCI_BASE_ADDRESS_MEM_MASK; 218 res->flags = bar & ~PCI_BASE_ADDRESS_MEM_MASK;
219 219
220 if (res->flags == PCI_BASE_ADDRESS_MEM_TYPE_64) 220 if (res->flags & PCI_BASE_ADDRESS_MEM_TYPE_64)
221 return pci_bar_mem64; 221 return pci_bar_mem64;
222 return pci_bar_mem32; 222 return pci_bar_mem32;
223} 223}