]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: mv88e6xxx: allow use of PHYs on CPU and DSA ports
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Thu, 9 Dec 2021 09:26:47 +0000 (09:26 +0000)
committerJakub Kicinski <kuba@kernel.org>
Thu, 9 Dec 2021 16:48:40 +0000 (08:48 -0800)
commit8142a74242088f826a5692004f0fda47f9b10281
tree2d6e68bedecfbae12bfd924b32d300704069bb8e
parentf5abd015cf58b840c371baff426f24cd4a6bacae
net: dsa: mv88e6xxx: allow use of PHYs on CPU and DSA ports

Martyn Welch reports that his CPU port is unable to link where it has
been necessary to use one of the switch ports with an internal PHY for
the CPU port. The reason behind this is the port control register is
left forcing the link down, preventing traffic flow.

This occurs because during initialisation, phylink expects the link to
be down, and DSA forces the link down by synthesising a call to the
DSA drivers phylink_mac_link_down() method, but we don't touch the
forced-link state when we later reconfigure the port.

Resolve this by also unforcing the link state when we are operating in
PHY mode and the PPU is set to poll the PHY to retrieve link status
information.

Reported-by: Martyn Welch <martyn.welch@collabora.com>
Tested-by: Martyn Welch <martyn.welch@collabora.com>
Fixes: 0da96bd3f59c ("net: dsa: Down cpu/dsa ports phylink will control")
Cc: <stable@vger.kernel.org> # 5.7: 4de91503014d: net: dsa: mv88e6xxx: fix "don't use PHY_DETECT on internal PHY's"
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Link: https://lore.kernel.org/r/E1mvFhP-00F8Zb-Ul@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/dsa/mv88e6xxx/chip.c