From: Peter Chubb <peterc@gelato.unsw.edu.au>
To: matthew@wil.cx, jbarnes@virtuousgeek.org,
linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org
Subject: [patch] fix 64-vbit prefetchable memory resource BARs
Date: Mon, 13 Oct 2008 11:49:04 +1100 [thread overview]
Message-ID: <8763nx1fr3.wl%peter@chubb.wattle.id.au> (raw)
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
next reply other threads:[~2008-10-13 1:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-13 0:49 Peter Chubb [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8763nx1fr3.wl%peter@chubb.wattle.id.au \
--to=peterc@gelato.unsw.edu.au \
--cc=jbarnes@virtuousgeek.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=matthew@wil.cx \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®