From: "H. Peter Anvin" <hpa@c2micro.com>
To: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: linux-kernel@vger.kernel.org, Andrew Morton <akpm@osdl.org>,
Greg KH <greg@kroah.com>,
mchan@broadcom.com
Subject: [PATCH] fix to pci ignore pre-set 64-bit bars on 32-bit platforms
Date: Fri, 09 Jun 2006 11:28:29 -0700 [thread overview]
Message-ID: <4489BDCD.4000400@c2micro.com> (raw)
In-Reply-To: <200606091005.21165.bjorn.helgaas@hp.com>
[-- Attachment #1: Type: text/plain, Size: 0 bytes --]
[-- Attachment #2: pci-fix.txt --]
[-- Type: text/plain, Size: 1322 bytes --]
From: Bjorn Helgaas <bjorn.helgaas@hp.com>
When we detect a 64-bit pre-set address in a BAR on a 32-bit platform,
we disable it and treat it as if it had been unset, thus allowing the
general address assignment code to assign a new address to it when the
device is enabled. This can happen either if the firmware assigns
64-bit addresses; additionally, some cards have been found "in the
wild" which do not come out of reset with all the BAR registers set to
zero.
Unfortunately, the patch that implemented this tested the low part of
the address instead of the high part of the address. This patch fixes
that.
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Index: rc5-mm3/drivers/pci/probe.c
===================================================================
--- rc5-mm3.orig/drivers/pci/probe.c 2006-06-09 09:40:51.000000000 -0600
+++ rc5-mm3/drivers/pci/probe.c 2006-06-09 09:42:35.000000000 -0600
@@ -199,7 +199,7 @@
printk(KERN_ERR "PCI: Unable to handle 64-bit BAR for device %s\n", pci_name(dev));
res->start = 0;
res->flags = 0;
- } else if (l) {
+ } else if (lhi) {
/* 64-bit wide address, treat as disabled */
pci_write_config_dword(dev, reg, l & ~(u32)PCI_BASE_ADDRESS_MEM_MASK);
pci_write_config_dword(dev, reg+4, 0);
prev parent reply other threads:[~2006-06-09 18:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-07 23:11 tg3 broken on 2.6.17-rc5-mm3 Bjorn Helgaas
2006-06-07 22:49 ` Michael Chan
2006-06-08 0:36 ` Andrew Morton
2006-06-08 8:40 ` Frederik Deweerdt
[not found] ` <200606082249.14475.bjorn.helgaas@hp.com>
2006-06-09 5:03 ` H. Peter Anvin
2006-06-09 16:05 ` Bjorn Helgaas
2006-06-09 18:28 ` H. Peter Anvin [this message]
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=4489BDCD.4000400@c2micro.com \
--to=hpa@c2micro.com \
--cc=akpm@osdl.org \
--cc=bjorn.helgaas@hp.com \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mchan@broadcom.com \
/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