> - axienet_iow(lp, XAE_MDIO_MC_OFFSET, > - (mdio_mcreg & (~XAE_MDIO_MC_MDIOEN_MASK))); > + mutex_lock(&lp->mii_bus->mdio_lock); > + axienet_mdio_disable(lp);
I wonder if it would look better structured if the lock was in axienet_mdio_disable() and the unlock in axienet_mdio_enable(lp)? As you said, you are trying to refactor all the MDIO code it mdio.c. Andrew