Skip to content
Commit e1b1231a authored by Vladimir Oltean's avatar Vladimir Oltean Committed by Xiaolei Wang
Browse files

net: phy: lynx-10g: implement phy_exit() operation



commit  2cee209afbdd81d556bd6c54e380b1c6a9217bf6 from
https://github.com/nxp-imx/linux-imx lf-6.1.y

The blamed commit introduced a phy_exit() call which was missing before,
to lynx_pcs_destroy(). The role of phy_exit() is to bring the
phy->init_count from the phy core back to 0, so that a subsequent
phy_init() call gets propagated to the driver again.

What was happening is that when the dpaa2-mac driver had -EPROBE_DEFER
and it called phy_init() a second time, that didn't get propagated to
the driver, since the phy->init_count would just get bumped to 2.
That is no longer the case - we call phy_init() each time, but the Lynx
hardware is not prepared to power down a powered down lane. Instead, the
driver just hangs in the loop that expects the power down operation to
finalize.

Fix that by implementing phy_exit() as the operation which powers the
lane back up - essentially the expected operation when it is not managed
by a consumer, but operating as standalone.

Fixes: 7a560782c979 ("net: pcs: lynx: incorporate SerDes PHY handling from dpaa2-mac")
Debugged-by: default avatarIoana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: default avatarXiaolei Wang <xiaolei.wang@windriver.com>
parent 008df017
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment