From: Peter Chubb Date: Mon, 13 Oct 2008 00:49:04 +0000 (+1100) Subject: PCI: fix 64-vbit prefetchable memory resource BARs X-Git-Tag: v2.6.28-rc1~77^2~13 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=e354597cce8d219d135d65e585dc4f30323486b9;p=linux-2.6-omap-h63xx.git 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 Signed-off-by: Peter Chubb Signed-off-by: Jesse Barnes --- diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index f6754e87f04..49599ac49bd 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) res->flags = bar & ~PCI_BASE_ADDRESS_MEM_MASK; - if (res->flags == PCI_BASE_ADDRESS_MEM_TYPE_64) + if (res->flags & PCI_BASE_ADDRESS_MEM_TYPE_64) return pci_bar_mem64; return pci_bar_mem32; }