]> rtime.felk.cvut.cz Git - zynq/linux.git/commit
Revert "net: macb: Do not call PM sync in mdio helpers"
authorHarini Katakam <harini.katakam@xilinx.com>
Mon, 25 Feb 2019 13:54:53 +0000 (19:24 +0530)
committerMichal Simek <michal.simek@xilinx.com>
Thu, 28 Feb 2019 13:54:19 +0000 (14:54 +0100)
commitd77376c4c2eb232707f64435c8a893bd08a8ac27
treeb3a9db510ef8d0a77d0740ba0805f52086d23abf
parent8a8c28f04beb89a1c25b46b855f3de741a9fc540
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>
drivers/net/ethernet/cadence/macb_main.c