fix 64-vbit prefetchable memory resource BARs
PATCH 1/1 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.
drivers/pci/probe.c +1 -1
@@ -219,7 +219,7 @@ 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; }
--
Dr Peter Chubb http://www.gelato.unsw.edu.au peterc AT gelato.unsw.edu.au
http://www.ertos.nicta.com.au ERTOS within National ICT Australia
Quoted 3 lines · Peter Chubb
This patch checks only for the
PCI_BASE_ADDRESS_MEM_TYPE_64bit; thus whether the region is prefetchable or not is ignored. This fixes my Infiniband.
Sorry about that.
Quoted 1 line
Signed-off-by Peter Chubb <[email protected]>
Signature · 4 lines
Matthew Wilcox Intel Open Source Technology Centre "Bill, look, we understand that you're interested in selling us this operating system, but compare it to ours. We can't possibly take such a retrograde step."
Jesse Barnes
AppliedQuoted 6 lines · Peter Chubb
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.
Quoted 6 lines
This patch checks only for the
PCI_BASE_ADDRESS_MEM_TYPE_64bit; thus whether the region is prefetchable or not is ignored. This fixes my Infiniband.Signed-off-by Peter Chubb <[email protected]>
Applied to my linux-next branch, thanks. I'll be sending to Linus soon (hopefully today).
Thanks,
Jesse
Quoted 9 lines · Peter Chubb
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_64bit; thus whether the region is prefetchable or not is ignored. This fixes my Infiniband.
I think this patch needs to be put in a 2.6.27-stable release.
Without it, we ignore the upper bits of 64-bit prefetchable BARs.
This is commit e354597cce8d219d135d65e585dc4f30323486b9 in Linus's tree.
Quoted 25 lines
Signed-off-by Peter Chubb <[email protected]>Index:
linux-2.6-git/drivers/pci/probe.c
===================================================================drivers/pci/probe.c +1
-2@@ -219,7 +219,7 @@ 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; } --Dr Peter Chubb http://www.gelato.unsw.edu.au peterc AT gelato.unsw.edu.au
http://www.ertos.nicta.com.au ERTOS within National ICT Australia
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 11 lines · Bjorn Helgaas
Quoted 9 lines · Peter Chubb
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_64bit; thus whether the region is prefetchable or not is ignored. This fixes my Infiniband.
Quoted 6 lines
I think this patch needs to be put in a 2.6.27-stable release.
Without it, we ignore the upper bits of 64-bit prefetchable BARs.
This is commit
e354597cce8d219d135d65e585dc4f30323486b9in Linus's tree.
Thanks for the info, we will queue it up.
greg k-h