Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp724565imm; Thu, 13 Sep 2018 06:52:28 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYuViimviExDWyXUCKEL8ETKTTUxXgEcOtAXW1VEnpFvl7sOSWsEqujKH/mQKJL0OqZvUkQ X-Received: by 2002:a63:7a45:: with SMTP id j5-v6mr7011013pgn.363.1536846748093; Thu, 13 Sep 2018 06:52:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536846748; cv=none; d=google.com; s=arc-20160816; b=UdtsKlsUDRUmF8/8FyZ1EF/UkR+N5sUahbVl9f+FkLGEj8WMU0HEo2mLOX86cR7SZy gqM6WaocTl1pulGNNTbqu4B9dLXQDe+uEbQ9cvysVt5YhD+z/DLFyNBy82KcafzlcOos qfv8M94REB9vAiu1UiziCi11+/mCbgZiVpM91Wx1B7pNTMYkOIDmvfKIqTsJQNBtgPgm gluYOTbAfgLtNcStaaQ8Vxp5KokRRPxyTQWte7AdKdk+L0hyH6Eu+4d/tFdpVa+NiW9H 6aOZnmXWh/ksZLUU//DLZUEywS8zwEDwIwjtlu+wNLzEv2J2uyrdlJfeqT9lNCJkMtx4 impA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from; bh=kkME6/sUntMLBq5ndk1PjGlrhPgjGhfT+2Ha6oD+mIw=; b=WDSyBT+FzfQGYuqAezsvBcxF+KnypzRF+joOpPdMeQuvtfLbPCaXZMH8uGRAr5UceJ kWyEtsQnExr7fz5CZGsgyqQ9tD5K5LlAbas1SmLTBqcQQcdansYT3QMtIa7D1o/MIeFq bgrG/E8+xc4w/XfxA8Y/WveAoigEIY2b5PLmTyQ84jsDOeijYR1uGrITALw3bLPSdbov ZygOYYVK3+kDCJdMD8J8XyNtkeVIROKHXAxQiBAVDghZDuZJepoMGlNPQVUbBAdD4Gat O87VsWgwwXIylpp94NtpxMMLINfQhSNA/kRJMKXCWlM3LFVWHb4yakvzRoXxhxTVf8zT 2mKA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r24-v6si4040304pgo.605.2018.09.13.06.52.12; Thu, 13 Sep 2018 06:52:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730883AbeIMTBY (ORCPT + 99 others); Thu, 13 Sep 2018 15:01:24 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:33344 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730158AbeIMTBY (ORCPT ); Thu, 13 Sep 2018 15:01:24 -0400 Received: from localhost (ip-213-127-77-73.ip.prioritytelecom.net [213.127.77.73]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id E8C63D1A; Thu, 13 Sep 2018 13:51:48 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jose Abreu , Joao Pinto , Vitor Soares , Giuseppe Cavallaro , Alexandre Torgue , Corentin Labbe , Jerome Brunet , "David S. Miller" Subject: [PATCH 4.18 029/197] Revert "net: stmmac: Do not keep rearming the coalesce timer in stmmac_xmit" Date: Thu, 13 Sep 2018 15:29:38 +0200 Message-Id: <20180913131842.734828401@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180913131841.568116777@linuxfoundation.org> References: <20180913131841.568116777@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Jerome Brunet [ Upstream commit e5133f2f1261f8ab412e7fc5e3694c9f84328f89 ] This reverts commit 4ae0169fd1b3c792b66be58995b7e6b629919ecf. This change in the handling of the coalesce timer is causing regression on (at least) amlogic platforms. Network will break down very quickly (a few seconds) after starting a download. This can easily be reproduced using iperf3 for example. The problem has been reported on the S805, S905, S912 and A113 SoCs (Realtek and Micrel PHYs) and it is likely impacting all Amlogics platforms using Gbit ethernet No problem was seen with the platform using 10/100 only PHYs (GXL internal) Reverting change brings things back to normal and allows to use network again until we better understand the problem with the coalesce timer. Cc: Jose Abreu Cc: Joao Pinto Cc: Vitor Soares Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Cc: Corentin Labbe Signed-off-by: Jerome Brunet Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/stmicro/stmmac/stmmac.h | 1 - drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 5 +---- 2 files changed, 1 insertion(+), 5 deletions(-) --- a/drivers/net/ethernet/stmicro/stmmac/stmmac.h +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac.h @@ -112,7 +112,6 @@ struct stmmac_priv { u32 tx_count_frames; u32 tx_coal_frames; u32 tx_coal_timer; - bool tx_timer_armed; int tx_coalesce; int hwts_tx_en; --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -3126,16 +3126,13 @@ static netdev_tx_t stmmac_xmit(struct sk * element in case of no SG. */ priv->tx_count_frames += nfrags + 1; - if (likely(priv->tx_coal_frames > priv->tx_count_frames) && - !priv->tx_timer_armed) { + if (likely(priv->tx_coal_frames > priv->tx_count_frames)) { mod_timer(&priv->txtimer, STMMAC_COAL_TIMER(priv->tx_coal_timer)); - priv->tx_timer_armed = true; } else { priv->tx_count_frames = 0; stmmac_set_tx_ic(priv, desc); priv->xstats.tx_set_ic_bit++; - priv->tx_timer_armed = false; } skb_tx_timestamp(skb);