From: Mike McCormack <mikem@ring3k.org>
To: Rene Mayrhofer <rene.mayrhofer@gibraltar.at>
Cc: Stephen Hemminger <shemminger@linux-foundation.org>,
netdev@vger.kernel.org
Subject: Re: Kernel oops on setting sky2 interfaces down
Date: Tue, 04 Aug 2009 20:18:36 +0900 [thread overview]
Message-ID: <4A78190C.1080909@ring3k.org> (raw)
In-Reply-To: <4A77E56B.9030804@gibraltar.at>
2009/8/4 Rene Mayrhofer <rene.mayrhofer@gibraltar.at>:
> Does anybody have an idea on what might be wrong in sky2_down?
I had a look into this, and noticed that we don't hold phy_lock when calling
sky2_phy_power_down() in sky2_down(). sky2_phy_power_down() does some PCI
manipulation, so it's possible this could cause bad things to happen...
Does the following patch help?
Mike
Subject: [PATCH] sky2: Hold phy_lock when powering down phy
Make sure to hold phy_lock when calling sky2_phy_power_down(),
as is done when calling sky2_phy_power_up(),
Signed-off-by: Mike McCormack <mikem@ring3k.org>
---
drivers/net/sky2.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index e9cb1e7..47e5bae 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -1894,7 +1894,9 @@ static int sky2_down(struct net_device *dev)
synchronize_irq(hw->pdev->irq);
napi_synchronize(&hw->napi);
+ spin_lock_bh(&sky2->phy_lock);
sky2_phy_power_down(hw, port);
+ spin_unlock_bh(&sky2->phy_lock);
/* turn off LED's */
sky2_write16(hw, B0_Y2LED, LED_STAT_OFF);
--
1.5.6.5
next prev parent reply other threads:[~2009-08-04 11:21 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-21 16:26 Kernel oops on setting sky2 interfaces down Rene Mayrhofer
2009-07-21 16:58 ` Stephen Hemminger
2009-07-21 19:59 ` Rene Mayrhofer
2009-07-21 20:54 ` Stephen Hemminger
2009-07-23 17:28 ` Stephen Hemminger
2009-07-27 11:03 ` Rene Mayrhofer
2009-07-27 16:30 ` Stephen Hemminger
2009-07-28 7:21 ` Rene Mayrhofer
2009-07-27 22:35 ` Stephen Hemminger
2009-07-28 7:25 ` Rene Mayrhofer
2009-07-28 9:48 ` Rene Mayrhofer
2009-08-03 11:55 ` Rene Mayrhofer
2009-08-03 18:19 ` Rene Mayrhofer
2009-08-04 7:38 ` Rene Mayrhofer
2009-08-04 11:18 ` Mike McCormack [this message]
2009-08-04 21:31 ` Rene Mayrhofer
[not found] ` <392fb48f0908040445pc21105bo3182773b76d49596@mail.gmail.com>
2009-08-04 22:55 ` Rene Mayrhofer
2009-08-04 22:59 ` Rene Mayrhofer
2009-08-04 23:08 ` Stephen Hemminger
2009-08-04 23:53 ` Mike McCormack
2009-08-05 12:14 ` Rene Mayrhofer
2009-08-05 22:50 ` Mike McCormack
2009-08-10 10:28 ` Rene Mayrhofer
2009-08-11 8:54 ` Rene Mayrhofer
2009-08-19 7:01 ` Rene Mayrhofer
2009-08-19 15:00 ` Mike McCormack
2009-08-19 15:11 ` Rene Mayrhofer
2009-08-19 21:07 ` Rene Mayrhofer
2009-08-19 21:25 ` Rene Mayrhofer
2009-08-19 22:05 ` Mike McCormack
2009-08-20 0:46 ` Stephen Hemminger
2009-08-20 20:37 ` Rene Mayrhofer
2009-08-21 11:03 ` Mike McCormack
2009-08-20 19:42 ` Rene Mayrhofer
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=4A78190C.1080909@ring3k.org \
--to=mikem@ring3k.org \
--cc=netdev@vger.kernel.org \
--cc=rene.mayrhofer@gibraltar.at \
--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).