ia64/linux-2.6.18-xen.hg

changeset 809:6dd975d12fd3

Backport: PCI: fix 64-vbit prefetchable memory resource BARs

commit e354597cce8d219d135d65e585dc4f30323486b9
Author: Peter Chubb <peterc@gelato.unsw.edu.au>
Date: Mon Oct 13 11:49:04 2008 +1100

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>

Signed-off-by: Yu Zhao <yu.zhao@intel.com>
author Keir Fraser <keir.fraser@citrix.com>
date Fri Mar 13 07:40:22 2009 +0000 (2009-03-13)
parents 31f138db8eef
children ea67a65cec17
files drivers/pci/probe.c
line diff
     1.1 --- a/drivers/pci/probe.c	Fri Mar 13 07:40:10 2009 +0000
     1.2 +++ b/drivers/pci/probe.c	Fri Mar 13 07:40:22 2009 +0000
     1.3 @@ -157,7 +157,7 @@ static inline enum pci_bar_type decode_b
     1.4  
     1.5  	res->flags = bar & ~PCI_BASE_ADDRESS_MEM_MASK;
     1.6  
     1.7 -	if (res->flags == PCI_BASE_ADDRESS_MEM_TYPE_64)
     1.8 +	if (res->flags & PCI_BASE_ADDRESS_MEM_TYPE_64)
     1.9  		return pci_bar_mem64;
    1.10  	return pci_bar_mem32;
    1.11  }