summaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc/falcon.c
diff options
context:
space:
mode:
authorSteve Hodgson <shodgson@solarflare.com>2009-11-28 06:34:44 +0100
committerDavid S. Miller <davem@davemloft.net>2009-11-29 08:58:51 +0100
commitab86746175a5e1379abb9c7c38522af4d3176f57 (patch)
tree785e6540facd6807909c24e827a61a1d441fc5bc /drivers/net/sfc/falcon.c
parentsfc: QT202x: Reset before reading PHY id (diff)
downloadlinux-ab86746175a5e1379abb9c7c38522af4d3176f57.tar.xz
linux-ab86746175a5e1379abb9c7c38522af4d3176f57.zip
sfc: Replace MDIO spinlock with mutex
We never use MDIO in atomic context, so we don't need to spin. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/sfc/falcon.c')
-rw-r--r--drivers/net/sfc/falcon.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/sfc/falcon.c b/drivers/net/sfc/falcon.c
index e16faad70283..372dbbc72404 100644
--- a/drivers/net/sfc/falcon.c
+++ b/drivers/net/sfc/falcon.c
@@ -2110,7 +2110,7 @@ static int falcon_mdio_write(struct net_device *net_dev,
EFX_REGDUMP(efx, "writing MDIO %d register %d.%d with 0x%04x\n",
prtad, devad, addr, value);
- spin_lock_bh(&efx->phy_lock);
+ mutex_lock(&efx->mdio_lock);
/* Check MDIO not currently being accessed */
rc = falcon_gmii_wait(efx);
@@ -2145,8 +2145,8 @@ static int falcon_mdio_write(struct net_device *net_dev,
udelay(10);
}
- out:
- spin_unlock_bh(&efx->phy_lock);
+out:
+ mutex_unlock(&efx->mdio_lock);
return rc;
}
@@ -2158,7 +2158,7 @@ static int falcon_mdio_read(struct net_device *net_dev,
efx_oword_t reg;
int rc;
- spin_lock_bh(&efx->phy_lock);
+ mutex_lock(&efx->mdio_lock);
/* Check MDIO not currently being accessed */
rc = falcon_gmii_wait(efx);
@@ -2194,8 +2194,8 @@ static int falcon_mdio_read(struct net_device *net_dev,
prtad, devad, addr, rc);
}
- out:
- spin_unlock_bh(&efx->phy_lock);
+out:
+ mutex_unlock(&efx->mdio_lock);
return rc;
}