Revert "net: macb: Do not call PM sync in mdio helpers"
This reverts commit
d2b7486056b583c759e8764b088690b152b59ced.
MDIO bus and GEM use a common clock. Usually when MAC is down or
suspended, the clocks are cut. Hence the previous commit added a check
to avoid accessing mdio management register and return a non-zero code.
But there is atleast one valid use case where mdio read/write helpers
are called when MAC is suspended or down:
-> Both MAC and PHY are probed. Link is down or ifconfig down is done.
System suspend is initiated which in turn calls mdio_bus_phy_suspend.
In the above scenario, phy_suspend is called even if netdevice is down
and this call makes a register access to suspend/power down the PHY.
Hence, to accommodate scenarios like this, revert the previous commit.
This adds PM sync calls back to MDIO helpers.
Signed-off-by: Harini Katakam <harini.katakam@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>