From: Divy Le Ray <divy@chelsio.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
swise@opengridcomputing.com
Subject: [PATCH 2.6.30] cxgb3: clear shadow BAR registers
Date: Tue, 31 Mar 2009 17:58:54 -0700 [thread overview]
Message-ID: <20090401005854.15175.44595.stgit@speedy5> (raw)
From: Divy Le Ray <divy@chelsio.com>
Ensure that internal shadow BAR registers are cleared on 32-bit platforms.
Signed-off-by: Divy Le Ray <divy@chelsio.com>
---
drivers/net/cxgb3/cxgb3_main.c | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/drivers/net/cxgb3/cxgb3_main.c b/drivers/net/cxgb3/cxgb3_main.c
index 2c2aaa7..3f22da4 100644
--- a/drivers/net/cxgb3/cxgb3_main.c
+++ b/drivers/net/cxgb3/cxgb3_main.c
@@ -2984,6 +2984,20 @@ static void __devinit print_port_info(struct adapter *adap,
}
}
+static void touch_bars(struct pci_dev *pdev)
+{
+#if BITS_PER_LONG < 64
+ u32 v;
+
+ pci_config_dword(pdev, PCI_BASE_ADDRESS_1, &v);
+ pci_write_config_dword(pdev, PCI_BASE_ADDRESS_1, v);
+ pci_read_config_dword(pdev, PCI_BASE_ADDRESS_3, &v);
+ pci_write_config_dword(pdev, PCI_BASE_ADDRESS_3, v);
+ pci_read_config_dword(pdev, PCI_BASE_ADDRESS_5, &v);
+ pci_write_config_dword(pdev, PCI_BASE_ADDRESS_5, v);
+#endif
+}
+
static const struct net_device_ops cxgb_netdev_ops = {
.ndo_open = cxgb_open,
.ndo_stop = cxgb_close,
@@ -3051,6 +3065,7 @@ static int __devinit init_one(struct pci_dev *pdev,
goto out_disable_device;
}
+ touch_bars(pdev);
pci_set_master(pdev);
pci_save_state(pdev);
next reply other threads:[~2009-04-01 0:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-01 0:58 Divy Le Ray [this message]
2009-04-01 3:34 ` [PATCH 2.6.30] cxgb3: clear shadow BAR registers David Miller
2009-04-01 17:48 ` Divy Le Ray
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=20090401005854.15175.44595.stgit@speedy5 \
--to=divy@chelsio.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=swise@opengridcomputing.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;
as well as URLs for NNTP newsgroup(s).