summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNick Hainke2022-05-01 19:06:52 +0000
committerSungbo Eo2022-05-05 00:19:00 +0000
commit1526ccebd427051dad01c81f34e0d176697c7990 (patch)
treeced411c9afbc8fe135c8371bbeb58080a05262ab
parentb697b5c55e4b7f77913db2e74239bdfe3e47ad26 (diff)
downloadopenwrt-1526ccebd427051dad01c81f34e0d176697c7990.tar.gz
ipq40xx: 5.15: fix ar40xx driver
Also apply commit ab7e53e5cce7 ("ipq40xx: 5.10: fix ar40xx driver") to 5.15 driver. The commit fixes the data corruption on TX packets. Packets are transmitted, but their contents are replaced with zeros. This error is caused by the lack of guard (50 ms) intervals between calibration phases. This error is treated by adding mdelay(50) to the calibration function code. In the original qca-ssda code, these mdelays were existing, but in the ar41xx.c they are gone. Fixes: 87318eb17936 ("ipq40xx: 5:15: copy config and patch from 5.10") Signed-off-by: Nick Hainke <vincent@systemli.org>
-rw-r--r--target/linux/ipq40xx/files-5.15/drivers/net/mdio/ar40xx.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/target/linux/ipq40xx/files-5.15/drivers/net/mdio/ar40xx.c b/target/linux/ipq40xx/files-5.15/drivers/net/mdio/ar40xx.c
index f7ce42b9ff..d5ef7af151 100644
--- a/target/linux/ipq40xx/files-5.15/drivers/net/mdio/ar40xx.c
+++ b/target/linux/ipq40xx/files-5.15/drivers/net/mdio/ar40xx.c
@@ -936,6 +936,7 @@ ar40xx_malibu_psgmii_ess_reset(struct ar40xx_priv *priv)
*/
mdelay(2);
}
+ mdelay(50);
/*check malibu psgmii calibration done end..*/
@@ -954,6 +955,7 @@ ar40xx_malibu_psgmii_ess_reset(struct ar40xx_priv *priv)
/* Polling interval to check PSGMII PLL in ESS is ready */
mdelay(2);
}
+ mdelay(50);
/* check dakota psgmii calibration done end..*/
@@ -961,6 +963,7 @@ ar40xx_malibu_psgmii_ess_reset(struct ar40xx_priv *priv)
mdiobus_write(bus, 5, 0x1a, 0x3230);
/* release phy psgmii RX 20bit */
mdiobus_write(bus, 5, 0x0, 0x005f);
+ mdelay(200);
}
static void