]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
net: stmmac: work around sporadic tx issue on link-up
authorHeiner Kallweit <hkallweit1@gmail.com>
Wed, 24 Aug 2022 20:34:49 +0000 (22:34 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 7 Oct 2022 08:39:30 +0000 (10:39 +0200)
commite11371bf254e5c4b95359c6daf340fceb81b95f7
treea77e926709322fffd6b246e24de6ad3f7908fefa
parent124a6232ba115a277da54307711e3cadb87e3fa6
net: stmmac: work around sporadic tx issue on link-up

BugLink: https://bugs.launchpad.net/bugs/1991717
[ Upstream commit a3a57bf07de23fe1ff779e0fdf710aa581c3ff73 ]

This is a follow-up to the discussion in [0]. It seems to me that
at least the IP version used on Amlogic SoC's sometimes has a problem
if register MAC_CTRL_REG is written whilst the chip is still processing
a previous write. But that's just a guess.
Adding a delay between two writes to this register helps, but we can
also simply omit the offending second write. This patch uses the second
approach and is based on a suggestion from Qi Duan.
Benefit of this approach is that we can save few register writes, also
on not affected chip versions.

[0] https://www.spinics.net/lists/netdev/msg831526.html

Fixes: bfab27a146ed ("stmmac: add the experimental PCI support")
Suggested-by: Qi Duan <qi.duan@amlogic.com>
Suggested-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Link: https://lore.kernel.org/r/e99857ce-bd90-5093-ca8c-8cd480b5a0a2@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c