aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/phy/phy.c
diff options
context:
space:
mode:
authorHans-Jürgen Koch <hjk@linutronix.de>2007-08-31 14:30:08 +0200
committerJeff Garzik <jeff@garzik.org>2007-09-13 00:12:43 -0400
commit026d7917e592f91063861e002adf1c806d7756ae (patch)
tree02a5de4f89634c0e8a5b119df7fc4ee91f15da37 /drivers/net/phy/phy.c
parentd1b139c039704c391ab47c6c9540c28f7fcaa489 (diff)
Fix a lock problem in generic phy code
Lock debugging finds a problem in phy.c and phy_device.c, this patch fixes it. Tested on an AT91SAM9263-EK board, kernel 2.6.23-rc4. Signed-off-by: Hans J. Koch <hjk@linutronix.de> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/phy/phy.c')
-rw-r--r--drivers/net/phy/phy.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index e323efd4ed1..0cc4369cacb 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -755,7 +755,7 @@ out_unlock:
*/
void phy_start(struct phy_device *phydev)
{
- spin_lock(&phydev->lock);
+ spin_lock_bh(&phydev->lock);
switch (phydev->state) {
case PHY_STARTING:
@@ -769,7 +769,7 @@ void phy_start(struct phy_device *phydev)
default:
break;
}
- spin_unlock(&phydev->lock);
+ spin_unlock_bh(&phydev->lock);
}
EXPORT_SYMBOL(phy_stop);
EXPORT_SYMBOL(phy_start);