From: Tim Hockin <thockin@google.com>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org, greg@kroah.com
Subject: Re: small PCI probe patch for odd 64 bit BARs
Date: Thu, 11 Nov 2004 09:39:01 -0800 [thread overview]
Message-ID: <20041111173901.GH19615@google.com> (raw)
In-Reply-To: <20041110215142.3a81b426.akpm@osdl.org>
On Wed, Nov 10, 2004 at 09:51:42PM -0800, Andrew Morton wrote:
> Tim Hockin <thockin@google.com> wrote:
> >
> > + sz = pci_size(sz, 0xffffffff);
>
> pci_size() takes three arguments, so this patch appears to not have been
> runtime tested :(
Doh, I sent the 2.4 patch. This one should work on 2.6.9, though I do
not have 2.6.9 running on this hardware, yet. It was definitely runtime
tested on 2.4.
--- linux-2.6.9/drivers/pci/probe.c.orig 2004-11-10 20:42:03.000000000 -0800
+++ linux-2.6.9/drivers/pci/probe.c 2004-11-11 09:30:07.000000000 -0800
@@ -144,9 +144,11 @@
pci_write_config_dword(dev, reg+4, ~0);
pci_read_config_dword(dev, reg+4, &sz);
pci_write_config_dword(dev, reg+4, l);
- if (~sz)
- res->end = res->start + 0xffffffff +
- (((unsigned long) ~sz) << 32);
+ sz = pci_size(l, sz, 0xffffffff);
+ if (sz) {
+ /* This BAR needs > 4GB? Wow. */
+ res->end |= (unsigned long)sz<<32;
+ }
#else
if (l) {
printk(KERN_ERR "PCI: Unable to handle 64-bit address for device %s\n", pci_name(dev));
next prev parent reply other threads:[~2004-11-11 17:45 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-11 4:48 small PCI probe patch for odd 64 bit BARs Tim Hockin
2004-11-11 5:51 ` Andrew Morton
2004-11-11 17:39 ` Tim Hockin [this message]
2004-11-11 17:54 ` Greg KH
2004-11-11 20:58 ` Tim Hockin
2004-11-12 22:02 ` Greg KH
2004-11-11 17:22 ` Greg KH
2004-11-11 17:42 ` Tim Hockin
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=20041111173901.GH19615@google.com \
--to=thockin@google.com \
--cc=akpm@osdl.org \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
/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