From patchwork Sat Jan 11 09:50:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 234093 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A412DC33C9E for ; Sat, 11 Jan 2020 10:18:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7B24720848 for ; Sat, 11 Jan 2020 10:18:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578737891; bh=fQ02JyQDkRWNpS/HDzUVnfKR46n40zNB008usY4M+uY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=LeObYSplNj/KyVCQ5SoCHCbsi3CwSeTh6mMX7heQ7/nBvX/JiNnKgfxqgOpnVEcQj WDasrmHUuzgoNQbEUKIXWfGVHpF90VaAQQgOGr0xl0dw8HGc/wRi1pwpRuGrTMIgf7 tkBJ7LUP5VMNDixA1XKi9FYRyNyBEM4MMGuU9YSc= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730370AbgAKKSH (ORCPT ); Sat, 11 Jan 2020 05:18:07 -0500 Received: from mail.kernel.org ([198.145.29.99]:35734 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730523AbgAKKSF (ORCPT ); Sat, 11 Jan 2020 05:18:05 -0500 Received: from localhost (unknown [62.119.166.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7BF6A205F4; Sat, 11 Jan 2020 10:18:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578737885; bh=fQ02JyQDkRWNpS/HDzUVnfKR46n40zNB008usY4M+uY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Lg2ptPHMsOBMtp/PHqnsZc3lgTYhRJmvGsSRQO+acyGEGqWRUkcnHgnI+xtzthY1k jvFRTFe2TQUT21+I2r7BvtPPxf+p8kTYzcAurWY+Qj+hN9udDev8RBPwRFO5lmQFbV emz4Y+ITsbVl8cyR1DatKitffhlZa5ljSQGBzw3I= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jose Abreu , "David S. Miller" , Sasha Levin Subject: [PATCH 4.19 51/84] net: stmmac: Always arm TX Timer at end of transmission start Date: Sat, 11 Jan 2020 10:50:28 +0100 Message-Id: <20200111094905.690898219@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200111094845.328046411@linuxfoundation.org> References: <20200111094845.328046411@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Jose Abreu [ Upstream commit 4772f26db8d1fb568c4862c538344a1b5fb52081 ] If TX Coalesce timer is enabled we should always arm it, otherwise we may hit the case where an interrupt is missed and the TX Queue will timeout. Arming the timer does not necessarly mean it will run the tx_clean() because this function is wrapped around NAPI launcher. Fixes: 9125cdd1be11 ("stmmac: add the initial tx coalesce schema") Signed-off-by: Jose Abreu Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index 437b1b2b3e6b..7ee0e46539c0 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -2997,6 +2997,7 @@ static netdev_tx_t stmmac_tso_xmit(struct sk_buff *skb, struct net_device *dev) tx_q->tx_tail_addr = tx_q->dma_tx_phy + (tx_q->cur_tx * sizeof(*desc)); stmmac_set_tx_tail_ptr(priv, priv->ioaddr, tx_q->tx_tail_addr, queue); + stmmac_tx_timer_arm(priv, queue); return NETDEV_TX_OK; @@ -3210,6 +3211,7 @@ static netdev_tx_t stmmac_xmit(struct sk_buff *skb, struct net_device *dev) tx_q->tx_tail_addr = tx_q->dma_tx_phy + (tx_q->cur_tx * sizeof(*desc)); stmmac_set_tx_tail_ptr(priv, priv->ioaddr, tx_q->tx_tail_addr, queue); + stmmac_tx_timer_arm(priv, queue); return NETDEV_TX_OK;