X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fnet%2Fucc_geth_mii.c;h=e4d3f330bac341941023a7131bb2c0e39dc86f24;hb=cc93d7d77d28d65d4f947dabc95a01c42d713ea3;hp=6c257b88ce51ed8fc7206407e351f3c9f431c0ff;hpb=5a0276b7ae1fcd90cea07f65452aebbd1b0743c5;p=linux-2.6 diff --git a/drivers/net/ucc_geth_mii.c b/drivers/net/ucc_geth_mii.c index 6c257b88ce..e4d3f330ba 100644 --- a/drivers/net/ucc_geth_mii.c +++ b/drivers/net/ucc_geth_mii.c @@ -32,7 +32,6 @@ #include #include #include -#include #include #include #include @@ -110,7 +109,7 @@ int uec_mdio_reset(struct mii_bus *bus) struct ucc_mii_mng __iomem *regs = (void __iomem *)bus->priv; unsigned int timeout = PHY_INIT_TIMEOUT; - spin_lock_bh(&bus->mdio_lock); + mutex_lock(&bus->mdio_lock); /* Reset the management interface */ out_be32(®s->miimcfg, MIIMCFG_RESET_MANAGEMENT); @@ -122,7 +121,7 @@ int uec_mdio_reset(struct mii_bus *bus) while ((in_be32(®s->miimind) & MIIMIND_BUSY) && timeout--) cpu_relax(); - spin_unlock_bh(&bus->mdio_lock); + mutex_unlock(&bus->mdio_lock); if (timeout <= 0) { printk(KERN_ERR "%s: The MII Bus is stuck!\n", bus->name); @@ -158,7 +157,7 @@ static int uec_mdio_probe(struct of_device *ofdev, const struct of_device_id *ma if (err) goto reg_map_fail; - new_bus->id = res.start; + snprintf(new_bus->id, MII_BUS_ID_SIZE, "%x", res.start); new_bus->irq = kmalloc(32 * sizeof(int), GFP_KERNEL); @@ -257,6 +256,9 @@ static struct of_device_id uec_mdio_match[] = { .type = "mdio", .compatible = "ucc_geth_phy", }, + { + .compatible = "fsl,ucc-mdio", + }, {}, };