armvirt: Remove kernel 4.14 support
[openwrt/staging/wigyori.git] / target / linux / ath79 / patches-4.14 / 0038-at803x-disable-delays.patch
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
4 soft and hard reset.
5
6 In addition, the TX delay setting is retained on soft-reset.
7
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.
10
11 --- a/drivers/net/phy/at803x.c
12 +++ b/drivers/net/phy/at803x.c
13 @@ -320,6 +320,14 @@ static int at803x_config_init(struct phy
14 if (ret < 0)
15 return ret;
16
17 + /* Disable RX delay */
18 + at803x_debug_reg_mask(phydev, AT803X_DEBUG_REG_0,
19 + AT803X_DEBUG_RX_CLK_DLY_EN, 0);
20 +
21 + /* Disable TX delay */
22 + at803x_debug_reg_mask(phydev, AT803X_DEBUG_REG_5,
23 + AT803X_DEBUG_TX_CLK_DLY_EN, 0);
24 +
25 if (phydev->interface == PHY_INTERFACE_MODE_RGMII_RXID ||
26 phydev->interface == PHY_INTERFACE_MODE_RGMII_ID) {
27 ret = at803x_enable_rx_delay(phydev);