net: dsa: qca8k: Improve SGMII interface handling
authorJonathan McDowell <noodles@earth.li>
Sat, 20 Jun 2020 10:31:05 +0000 (11:31 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 22 Jun 2020 22:54:34 +0000 (15:54 -0700)
commitf6dadd559886f8cc12d68e98ad77d1da08bfe978
tree3143fa5160dcf04ad08b42ecd2b9c26672ba5515
parentb3591c2a366167b5ae985dc3c88a55db3d770cb8
net: dsa: qca8k: Improve SGMII interface handling

This patch improves the handling of the SGMII interface on the QCA8K
devices. Previously the driver did no configuration of the port, even if
it was selected. We now configure it up in the appropriate
PHY/MAC/Base-X mode depending on what phylink tells us we are connected
to and ensure it is enabled.

Tested with a device where the CPU connection is RGMII (i.e. the common
current use case) + one where the CPU connection is SGMII. I don't have
any devices where the SGMII interface is brought out to something other
than the CPU.

Signed-off-by: Jonathan McDowell <noodles@earth.li>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/qca8k.c
drivers/net/dsa/qca8k.h