]> git.baikalelectronics.ru Git - kernel.git/commit
dpaa2-mac: configure the SerDes phy on a protocol change
authorIoana Ciornei <ioana.ciornei@nxp.com>
Fri, 11 Mar 2022 21:22:27 +0000 (23:22 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 14 Mar 2022 10:41:51 +0000 (10:41 +0000)
commit8d7399f9c18db4b91f16134d0bd3888df0db3976
treecbb477bb49cac7ecf30fe72b4ec02f75ca19ac8f
parentf2e7d87074fce0d67d47da66acf5c4aeaed216e8
dpaa2-mac: configure the SerDes phy on a protocol change

This patch integrates the dpaa2-eth driver with the generic PHY
infrastructure in order to search, find and reconfigure the SerDes lanes
in case of a protocol change.

On the .mac_config() callback, the phy_set_mode_ext() API is called so
that the Lynx 28G SerDes PHY driver can change the lane's configuration.
In the same phylink callback the MC firmware is called so that it
reconfigures the MAC side to run using the new protocol.

The consumer drivers - dpaa2-eth and dpaa2-switch - are updated to call
the dpaa2_mac_start/stop functions newly added which will
power_on/power_off the associated SerDes lane.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c
drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.h
drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c