Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755430AbYJMBOS (ORCPT ); Sun, 12 Oct 2008 21:14:18 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754223AbYJMBOF (ORCPT ); Sun, 12 Oct 2008 21:14:05 -0400 Received: from lemon.ertos.nicta.com.au ([203.143.174.143]:34002 "EHLO lemon.gelato.unsw.edu.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753884AbYJMBOE (ORCPT ); Sun, 12 Oct 2008 21:14:04 -0400 X-Greylist: delayed 1475 seconds by postgrey-1.27 at vger.kernel.org; Sun, 12 Oct 2008 21:14:03 EDT Date: Mon, 13 Oct 2008 11:49:04 +1100 Message-ID: <8763nx1fr3.wl%peter@chubb.wattle.id.au> From: Peter Chubb To: matthew@wil.cx, jbarnes@virtuousgeek.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org User-Agent: Wanderlust/2.15.6 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL/10.7 MULE XEmacs/21.4 (patch 21) (Educational Television) (i486-linux-gnu) Organization: Gelato@UNSW MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 203.143.161.65 X-SA-Exim-Mail-From: peterc@gelato.unsw.edu.au Subject: [patch] fix 64-vbit prefetchable memory resource BARs X-SA-Exim-Version: 4.2 (built Thu, 03 Mar 2005 10:39:27 +0000) X-SA-Exim-Scanned: Yes (on lemon.gelato.unsw.edu.au) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1396 Lines: 37 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 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-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/