net: phy: Fix qca8081 with speeds lower than 2.5Gb/s
authorJonathan McDowell <noodles@earth.li>
Mon, 31 Jan 2022 13:56:41 +0000 (13:56 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 1 Feb 2022 11:57:09 +0000 (11:57 +0000)
commit881cc731df6af99a21622e9be25a23b81adcd10b
tree8e810d5dff9faaf3ebd22e829d895cda4f28a19e
parent9cef24c8b76c1f6effe499d2f131807c90f7ce9a
net: phy: Fix qca8081 with speeds lower than 2.5Gb/s

A typo in qca808x_read_status means we try to set SMII mode on the port
rather than SGMII when the link speed is not 2.5Gb/s. This results in no
traffic due to the mismatch in configuration between the phy and the
mac.

v2:
 Only change interface mode when the link is up

Fixes: 79c7bc0521545 ("net: phy: add qca8081 read_status")
Cc: stable@vger.kernel.org
Signed-off-by: Jonathan McDowell <noodles@earth.li>
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/at803x.c