Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=026d7917e592f91063861e002adf1c806d7756ae
Commit:     026d7917e592f91063861e002adf1c806d7756ae
Parent:     d1b139c039704c391ab47c6c9540c28f7fcaa489
Author:     Hans-J├╝rgen Koch <[EMAIL PROTECTED]>
AuthorDate: Fri Aug 31 14:30:08 2007 +0200
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Thu Sep 13 00:12:43 2007 -0400

    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 <[EMAIL PROTECTED]>
    Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
---
 drivers/net/phy/phy.c        |    4 ++--
 drivers/net/phy/phy_device.c |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index e323efd..0cc4369 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);
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
index e275df8..49328e0 100644
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -644,7 +644,7 @@ static int phy_probe(struct device *dev)
        if (!(phydrv->flags & PHY_HAS_INTERRUPT))
                phydev->irq = PHY_POLL;
 
-       spin_lock(&phydev->lock);
+       spin_lock_bh(&phydev->lock);
 
        /* Start out supporting everything. Eventually,
         * a controller will attach, and may modify one
@@ -658,7 +658,7 @@ static int phy_probe(struct device *dev)
        if (phydev->drv->probe)
                err = phydev->drv->probe(phydev);
 
-       spin_unlock(&phydev->lock);
+       spin_unlock_bh(&phydev->lock);
 
        return err;
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to