Skip to content

Commit

Permalink
PCI: fix 64-vbit prefetchable memory resource BARs
Browse files Browse the repository at this point in the history
Since patch 6ac665c 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>
  • Loading branch information
Peter Chubb authored and Jesse Barnes committed Oct 20, 2008
1 parent 557848c commit e354597
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/pci/probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit e354597

Please sign in to comment.