]> git.baikalelectronics.ru Git - kernel.git/commit
net: mscc: ocelot: make phy_mode a member of the common struct ocelot_port
authorVladimir Oltean <vladimir.oltean@nxp.com>
Mon, 6 Jan 2020 01:34:15 +0000 (03:34 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 6 Jan 2020 07:22:33 +0000 (23:22 -0800)
commit9a915457c6429403269b8c68b147eb08ea59f73c
tree1857ca1293888c173409f19d094471e3e4d2a67f
parent0f0a75e086a6932d82d99d91a59e17dda095f09c
net: mscc: ocelot: make phy_mode a member of the common struct ocelot_port

The Ocelot switchdev driver and the Felix DSA one need it for different
reasons. Felix (or at least the VSC9959 instantiation in NXP LS1028A) is
integrated with the traditional NXP Layerscape PCS design which does not
support runtime configuration of SerDes protocol. So it needs to
pre-validate the phy-mode from the device tree and prevent PHYLINK from
attempting to change it. For this, it needs to cache it in a private
variable.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mscc/ocelot.c
drivers/net/ethernet/mscc/ocelot.h
drivers/net/ethernet/mscc/ocelot_board.c
include/soc/mscc/ocelot.h