diff options
author | Andy Fleming <afleming@freescale.com> | 2008-02-05 17:35:30 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2008-02-06 06:42:04 -0500 |
commit | 15cf6dde99e40bf571a5ca48376650e163fcd30f (patch) | |
tree | 92ba98c4e5728ca78cc00dc27aaed0d185ee9c15 /drivers/net/ucc_geth_mii.c | |
parent | 4e84f9b10461ad3c869ced4373dd85771dd67d20 (diff) |
Fix PHY Lib support for gianfar and ucc_geth
The PHY Lib now uses mutexes instead of spin_locks. ucc_geth
and gianfar both grab the locks in their mdio_reset functions,
so they need to use mutex_(un)lock instead. This was not caught
until someone tested it on an SMP system.
Signed-off-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/ucc_geth_mii.c')
-rw-r--r-- | drivers/net/ucc_geth_mii.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ucc_geth_mii.c b/drivers/net/ucc_geth_mii.c index e3ba14a19915..c69e654d539f 100644 --- a/drivers/net/ucc_geth_mii.c +++ b/drivers/net/ucc_geth_mii.c | |||
@@ -109,7 +109,7 @@ int uec_mdio_reset(struct mii_bus *bus) | |||
109 | struct ucc_mii_mng __iomem *regs = (void __iomem *)bus->priv; | 109 | struct ucc_mii_mng __iomem *regs = (void __iomem *)bus->priv; |
110 | unsigned int timeout = PHY_INIT_TIMEOUT; | 110 | unsigned int timeout = PHY_INIT_TIMEOUT; |
111 | 111 | ||
112 | spin_lock_bh(&bus->mdio_lock); | 112 | mutex_lock(&bus->mdio_lock); |
113 | 113 | ||
114 | /* Reset the management interface */ | 114 | /* Reset the management interface */ |
115 | out_be32(®s->miimcfg, MIIMCFG_RESET_MANAGEMENT); | 115 | out_be32(®s->miimcfg, MIIMCFG_RESET_MANAGEMENT); |
@@ -121,7 +121,7 @@ int uec_mdio_reset(struct mii_bus *bus) | |||
121 | while ((in_be32(®s->miimind) & MIIMIND_BUSY) && timeout--) | 121 | while ((in_be32(®s->miimind) & MIIMIND_BUSY) && timeout--) |
122 | cpu_relax(); | 122 | cpu_relax(); |
123 | 123 | ||
124 | spin_unlock_bh(&bus->mdio_lock); | 124 | mutex_unlock(&bus->mdio_lock); |
125 | 125 | ||
126 | if (timeout <= 0) { | 126 | if (timeout <= 0) { |
127 | printk(KERN_ERR "%s: The MII Bus is stuck!\n", bus->name); | 127 | printk(KERN_ERR "%s: The MII Bus is stuck!\n", bus->name); |