net: mscc: ocelot: move invariant configs out of adjust_link
authorVladimir Oltean <vladimir.oltean@nxp.com>
Thu, 14 Nov 2019 15:03:22 +0000 (17:03 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 15 Nov 2019 20:32:16 +0000 (12:32 -0800)
commit5bc9d2e6e7d546548ae1a7cd3de37672db4075ce
tree8dbc606ed8662708db42af165bd2fb9d1e637bd1
parentdc3de2a294eab8b1375f96eb4cf2a1d5edfcc9ab
net: mscc: ocelot: move invariant configs out of adjust_link

It doesn't make sense to rewrite all these registers every time the PHY
library notifies us about a link state change.

In a future patch we will customize the MTU for the CPU port, and since
the MTU was previously configured from adjust_link, if we don't make
this change, its value would have got overridden.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mscc/ocelot.c