LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [patch] fix 64-vbit prefetchable memory resource BARs
@ 2008-10-13  0:49 Peter Chubb
  2008-10-13  1:34 ` Matthew Wilcox
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Peter Chubb @ 2008-10-13  0:49 UTC (permalink / raw)
  To: matthew, jbarnes, linux-kernel, linux-pci


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.


Signed-off-by: Peter Chubb <peterc@gelato.unsw.edu.au>

Index: linux-2.6-git/drivers/pci/probe.c
===================================================================
--- linux-2.6-git.orig/drivers/pci/probe.c	2008-10-13 10:49:46.012798465 +1100
+++ linux-2.6-git/drivers/pci/probe.c	2008-10-13 11:35:43.016329442 +1100
@@ -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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [patch] fix 64-vbit prefetchable memory resource BARs
  2008-10-13  0:49 [patch] fix 64-vbit prefetchable memory resource BARs Peter Chubb
@ 2008-10-13  1:34 ` Matthew Wilcox
  2008-10-15 10:05 ` Jesse Barnes
  2008-11-03 20:42 ` Bjorn Helgaas
  2 siblings, 0 replies; 5+ messages in thread
From: Matthew Wilcox @ 2008-10-13  1:34 UTC (permalink / raw)
  To: Peter Chubb; +Cc: jbarnes, linux-kernel, linux-pci

On Mon, Oct 13, 2008 at 11:49:04AM +1100, Peter Chubb wrote:
> 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.

Sorry about that.

> Signed-off-by: Peter Chubb <peterc@gelato.unsw.edu.au>

Reviewed-by: Matthew Wilcox <willy@linux.intel.com>

-- 
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."

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [patch] fix 64-vbit prefetchable memory resource BARs
  2008-10-13  0:49 [patch] fix 64-vbit prefetchable memory resource BARs Peter Chubb
  2008-10-13  1:34 ` Matthew Wilcox
@ 2008-10-15 10:05 ` Jesse Barnes
  2008-11-03 20:42 ` Bjorn Helgaas
  2 siblings, 0 replies; 5+ messages in thread
From: Jesse Barnes @ 2008-10-15 10:05 UTC (permalink / raw)
  To: Peter Chubb; +Cc: matthew, linux-kernel, linux-pci

On Sunday, October 12, 2008 5:49 pm Peter Chubb wrote:
> 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.
>
>
> Signed-off-by: Peter Chubb <peterc@gelato.unsw.edu.au>

Applied to my linux-next branch, thanks.  I'll be sending to Linus soon 
(hopefully today).

Thanks,
Jesse

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [patch] fix 64-vbit prefetchable memory resource BARs
  2008-10-13  0:49 [patch] fix 64-vbit prefetchable memory resource BARs Peter Chubb
  2008-10-13  1:34 ` Matthew Wilcox
  2008-10-15 10:05 ` Jesse Barnes
@ 2008-11-03 20:42 ` Bjorn Helgaas
  2008-11-03 20:47   ` [stable] " Greg KH
  2 siblings, 1 reply; 5+ messages in thread
From: Bjorn Helgaas @ 2008-11-03 20:42 UTC (permalink / raw)
  To: stable; +Cc: Peter Chubb, matthew, jbarnes, linux-kernel, linux-pci

On Sunday 12 October 2008 06:49:04 pm Peter Chubb wrote:
> 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.

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.

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=e354597cce8d219d135d65e585dc4f30323486b9

> Signed-off-by: Peter Chubb <peterc@gelato.unsw.edu.au>
> 
> Index: linux-2.6-git/drivers/pci/probe.c
> ===================================================================
> --- linux-2.6-git.orig/drivers/pci/probe.c	2008-10-13 10:49:46.012798465 +1100
> +++ linux-2.6-git/drivers/pci/probe.c	2008-10-13 11:35:43.016329442 +1100
> @@ -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 majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [stable] [patch] fix 64-vbit prefetchable memory resource BARs
  2008-11-03 20:42 ` Bjorn Helgaas
@ 2008-11-03 20:47   ` Greg KH
  0 siblings, 0 replies; 5+ messages in thread
From: Greg KH @ 2008-11-03 20:47 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: stable, linux-kernel, linux-pci, Peter Chubb, jbarnes, matthew

On Mon, Nov 03, 2008 at 02:42:10PM -0600, Bjorn Helgaas wrote:
> On Sunday 12 October 2008 06:49:04 pm Peter Chubb wrote:
> > 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.
> 
> 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.

Thanks for the info, we will queue it up.

greg k-h

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-11-03 20:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-13  0:49 [patch] fix 64-vbit prefetchable memory resource BARs Peter Chubb
2008-10-13  1:34 ` Matthew Wilcox
2008-10-15 10:05 ` Jesse Barnes
2008-11-03 20:42 ` Bjorn Helgaas
2008-11-03 20:47   ` [stable] " Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).