]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: Don't instantiate phylink for CPU/DSA ports unless needed
authorAndrew Lunn <andrew@lunn.ch>
Wed, 11 Mar 2020 15:24:24 +0000 (16:24 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 12 Mar 2020 06:46:11 +0000 (23:46 -0700)
commit13d1c252508aa082d65494fb2893c5a4eb0c945b
treea39581cb7cb4b62a39c4a987058f4f53726a88da
parentf4db142b0d1fa2bb80de6fb91781455ccdf5f1d0
net: dsa: Don't instantiate phylink for CPU/DSA ports unless needed

By default, DSA drivers should configure CPU and DSA ports to their
maximum speed. In many configurations this is sufficient to make the
link work.

In some cases it is necessary to configure the link to run slower,
e.g. because of limitations of the SoC it is connected to. Or back to
back PHYs are used and the PHY needs to be driven in order to
establish link. In this case, phylink is used.

Only instantiate phylink if it is required. If there is no PHY, or no
fixed link properties, phylink can upset a link which works in the
default configuration.

Fixes: 44df520dc0bf ("net: dsa: Use PHYLINK for the CPU/DSA ports")
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dsa/port.c