[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [linux-2.6.18-xen] Backport: PCI: fix 64-vbit prefetchable memory resource BARs



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1236930022 0
# Node ID 6dd975d12fd3ad4a3dde7de0c5477efe9c62fe13
# Parent  31f138db8eef280cff353604736a3113c7be6835
Backport: PCI: fix 64-vbit prefetchable memory resource BARs

    commit e354597cce8d219d135d65e585dc4f30323486b9
    Author: Peter Chubb <peterc@xxxxxxxxxxxxxxxxxx>
    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@xxxxxx>
    Signed-off-by: Peter Chubb <peterc@xxxxxxxxxxxxxxxxxx>
    Signed-off-by: Jesse Barnes <jbarnes@xxxxxxxxxxxxxxxx>

Signed-off-by: Yu Zhao <yu.zhao@xxxxxxxxx>
---
 drivers/pci/probe.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -r 31f138db8eef -r 6dd975d12fd3 drivers/pci/probe.c
--- a/drivers/pci/probe.c       Fri Mar 13 07:40:10 2009 +0000
+++ b/drivers/pci/probe.c       Fri Mar 13 07:40:22 2009 +0000
@@ -157,7 +157,7 @@ static inline enum pci_bar_type decode_b
 
        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;
 }

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.