From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 62FC4154BF5; Fri, 6 Dec 2024 15:10:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733497836; cv=none; b=t1CXo14eAd/qjbZbhcC3Z7HgrcHyjbs5Y4gzKoTd5JiMtMhbONSxhDD63hqc33FBy50qeODLjMzXpeZ0NKZJdfaFYMC079VYz43i0kmh7A9C63EfVjSsqg/fH1u7jGH4teekUDAOvIK4vakGMSzYT92npLANIxrTdLD5msxhBo0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733497836; c=relaxed/simple; bh=WT5r4lMt/W+z/PGhysjDp2rPanj2POurZ7+UvcswmS4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=KAsv51V6FJsu7a5hnx16Vtc1ioUpeAEfQ9PCvy4HJUZUiTrPUGvOU8TGARx++crkBBl6iCQCd8/NWsWEEG6plqnZKkRndyWz6rVTpHGivjM8reMNLDqpN+vlOs9a8L2pSboi8Vf3zek+k9/g3TyxjwgYgtYGrlITwckfo2/S1gA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=I/u7Opav; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="I/u7Opav" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DCF89C19421; Fri, 6 Dec 2024 15:10:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1733497836; bh=WT5r4lMt/W+z/PGhysjDp2rPanj2POurZ7+UvcswmS4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=I/u7OpavUAY4daUBh1QIx6lrK/gvtPOsCs/qZUMjalMBzh2wus8/aBMesbuekwEM4 trbPfyySOAbkHYRzLO/YfM5HqP3dWzGqnYDhF+VsIw5o1h7AZaN+UrI9GogD3XGoTc nBMGWxDOSsnT23k8/sOFTyp2dksCzJAmynC/qsHk= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Maxime Chevallier , Paolo Abeni , Sasha Levin Subject: [PATCH 6.6 407/676] net: stmmac: dwmac-socfpga: Set RX watchdog interrupt as broken Date: Fri, 6 Dec 2024 15:33:46 +0100 Message-ID: <20241206143709.245194685@linuxfoundation.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241206143653.344873888@linuxfoundation.org> References: <20241206143653.344873888@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Maxime Chevallier [ Upstream commit 407618d66dba55e7db1278872e8be106808bbe91 ] On DWMAC3 and later, there's a RX Watchdog interrupt that's used for interrupt coalescing. It's known to be buggy on some platforms, and dwmac-socfpga appears to be one of them. Changing the interrupt coalescing from ethtool doesn't appear to have any effect here. Without disabling RIWT (Received Interrupt Watchdog Timer, I believe...), we observe latencies while receiving traffic that amount to around ~0.4ms. This was discovered with NTP but can be easily reproduced with a simple ping. Without this patch : 64 bytes from 192.168.5.2: icmp_seq=1 ttl=64 time=0.657 ms With this patch : 64 bytes from 192.168.5.2: icmp_seq=1 ttl=64 time=0.254 ms Fixes: 801d233b7302 ("net: stmmac: Add SOCFPGA glue driver") Signed-off-by: Maxime Chevallier Link: https://patch.msgid.link/20241122141256.764578-1-maxime.chevallier@bootlin.com Signed-off-by: Paolo Abeni Signed-off-by: Sasha Levin --- drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c index 9bf102bbc6a00..5d20325a18dd3 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c @@ -429,6 +429,8 @@ static int socfpga_dwmac_probe(struct platform_device *pdev) plat_dat->bsp_priv = dwmac; plat_dat->fix_mac_speed = socfpga_dwmac_fix_mac_speed; + plat_dat->riwt_off = 1; + ret = stmmac_dvr_probe(&pdev->dev, plat_dat, &stmmac_res); if (ret) goto err_remove_config_dt; -- 2.43.0