[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4A78190C.1080909@ring3k.org>
Date: Tue, 04 Aug 2009 20:18:36 +0900
From: Mike McCormack <mikem@...g3k.org>
To: Rene Mayrhofer <rene.mayrhofer@...raltar.at>
CC: Stephen Hemminger <shemminger@...ux-foundation.org>,
netdev@...r.kernel.org
Subject: Re: Kernel oops on setting sky2 interfaces down
2009/8/4 Rene Mayrhofer <rene.mayrhofer@...raltar.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@...g3k.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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists