1 Until upstream commit 6d4cd041f0af("net: phy: at803x: disable delay
2 only for RGMII mode"), delays were not disabled on driver probe
3 for the Atheros AR803x PHYs, although the RX delay is enabled on
6 In addition, the TX delay setting is retained on soft-reset.
8 This patch disables both delays on config init to align the behavior
9 with kernel 5.1 and higher. It can be safely dropped with kernel 5.1.
11 --- a/drivers/net/phy/at803x.c
12 +++ b/drivers/net/phy/at803x.c
13 @@ -279,6 +279,14 @@ static int at803x_config_init(struct phy
17 + /* Disable RX delay */
18 + at803x_debug_reg_mask(phydev, AT803X_DEBUG_REG_0,
19 + AT803X_DEBUG_RX_CLK_DLY_EN, 0);
21 + /* Disable TX delay */
22 + at803x_debug_reg_mask(phydev, AT803X_DEBUG_REG_5,
23 + AT803X_DEBUG_TX_CLK_DLY_EN, 0);
25 if (phydev->interface == PHY_INTERFACE_MODE_RGMII_RXID ||
26 phydev->interface == PHY_INTERFACE_MODE_RGMII_ID) {
27 ret = at803x_enable_rx_delay(phydev);