]> git.baikalelectronics.ru Git - kernel.git/commit
net: phy: marvell: Fix RGMII Tx/Rx delays setting in 88e1121-compatible PHYs
authorBaikal Electronics <support@baikalelectronics.ru>
Sat, 5 Feb 2022 20:39:32 +0000 (23:39 +0300)
committerJakub Kicinski <kuba@kernel.org>
Tue, 8 Feb 2022 03:57:09 +0000 (19:57 -0800)
commit2f4c0729f98f7f33793f28e6b91f5741b9e02d3d
treef53659fe8f2b2b10f496d8052d1ae74bef53c64c
parent3dd008d14c53bcd1f97b2599927a6a98975383c9
net: phy: marvell: Fix RGMII Tx/Rx delays setting in 88e1121-compatible PHYs

It is mandatory for a software to issue a reset upon modifying RGMII
Receive Timing Control and RGMII Transmit Timing Control bit fields of MAC
Specific Control register 2 (page 2, register 21) otherwise the changes
won't be perceived by the PHY (the same is applicable for a lot of other
registers). Not setting the RGMII delays on the platforms that imply it'
being done on the PHY side will consequently cause the traffic loss. We
discovered that the denoted soft-reset is missing in the
m88e1121_config_aneg() method for the case if the RGMII delays are
modified but the MDIx polarity isn't changed or the auto-negotiation is
left enabled, thus causing the traffic loss on our platform with Marvell
Alaska 88E1510 installed. Let's fix that by issuing the soft-reset if the
delays have been actually set in the m88e1121_config_aneg_rgmii_delays()
method.

Cc: stable@vger.kernel.org
Fixes: 1186a3d65965 ("net: phy: marvell: Avoid unnecessary soft reset")
Signed-off-by: Pavel Parkhomenko <Pavel.Parkhomenko@baikalelectronics.ru>
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Reviewed-by: Serge Semin <fancer.lancer@gmail.com>
Link: https://lore.kernel.org/r/20220205203932.26899-1-Pavel.Parkhomenko@baikalelectronics.ru
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/phy/marvell.c