From: Mike McCormack <mikem@ring3k.org>
To: Stephen Hemminger <shemminger@linux-foundation.org>
Cc: netdev@vger.kernel.org
Subject: [PATCH] sky2: Serialize access to PCI config space
Date: Sun, 09 Aug 2009 20:37:19 +0900 [thread overview]
Message-ID: <4A7EB4EF.3030106@ring3k.org> (raw)
Disable NAPI when powering up or down the phy, as sky2_err_intr
may also access the PCI config space.
Signed-off-by: Mike McCormack <mikem@ring3k.org>
---
drivers/net/sky2.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index 8e05d29..824a319 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -1448,7 +1448,9 @@ static int sky2_up(struct net_device *dev)
if (!sky2->rx_ring)
goto err_out;
+ napi_disable(&hw->napi);
sky2_mac_init(hw, port);
+ napi_enable(&hw->napi);
/* Register is number of 4K blocks on internal RAM buffer. */
ramsize = sky2_read8(hw, B2_E_0) * 4;
@@ -1880,13 +1882,16 @@ static int sky2_down(struct net_device *dev)
sky2_write32(hw, B0_IMSK, imask);
sky2_read32(hw, B0_IMSK);
+ /* after this, there should be no more interrupts for this port */
synchronize_irq(hw->pdev->irq);
- napi_synchronize(&hw->napi);
+ napi_disable(&hw->napi);
spin_lock_bh(&sky2->phy_lock);
sky2_phy_power_down(hw, port);
spin_unlock_bh(&sky2->phy_lock);
+ napi_enable(&hw->napi);
+
/* turn off LED's */
sky2_write16(hw, B0_Y2LED, LED_STAT_OFF);
--
1.5.6.5
next reply other threads:[~2009-08-09 11:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-09 11:37 Mike McCormack [this message]
2009-08-10 15:23 ` [PATCH] sky2: Serialize access to PCI config space Stephen Hemminger
2009-08-10 15:27 ` Stephen Hemminger
-- strict thread matches above, loose matches on Subject: below --
2009-08-06 11:10 Mike McCormack
2009-08-06 15:34 ` Stephen Hemminger
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=4A7EB4EF.3030106@ring3k.org \
--to=mikem@ring3k.org \
--cc=netdev@vger.kernel.org \
--cc=shemminger@linux-foundation.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;
as well as URLs for NNTP newsgroup(s).