Parameter mask of phy_modify() holds the bits to be cleared. In the mentioned commit parameter mask seems to be inverted in few cases, what IMO is wrong (see example). Maybe I miss something, could you please check?
And somehow related: When adding such helpers, wouldn't it make sense to add helpers for setting / clearing bits too? Something like: phy_set_bits(phydev, reg, val) -> phy_modify(phydev, reg, 0, val) Rgds, Heiner int genphy_resume(struct phy_device *phydev) { - int value; - - value = phy_read(phydev, MII_BMCR); - phy_write(phydev, MII_BMCR, value & ~BMCR_PDOWN); - - return 0; + return phy_modify(phydev, MII_BMCR, ~BMCR_PDOWN, 0); }