From mboxrd@z Thu Jan 1 00:00:00 1970 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,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable 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 B9E73C76186 for ; Wed, 24 Jul 2019 20:34:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8B85121734 for ; Wed, 24 Jul 2019 20:34:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564000478; bh=Y6ZBmPVVJLjITtQZOfsMtn+AryB2pWhpesndz1prxng=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=WJpXW3jcTkrJQMuClWHH31xM2Ue+INch+rFG8KO4ilDLx2XsYl9JOTspICikWSErd joh/e5UaJNUXAkF9kmmFac9iZ9v87tHV/AuAxVUsaTfof0LlzpWY36vvdg4M6T55LF yA/ZhsXgDSD+r1xoS4NH59cyGlz8kkzCsvjU5+hA= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387443AbfGXUed (ORCPT ); Wed, 24 Jul 2019 16:34:33 -0400 Received: from mail.kernel.org ([198.145.29.99]:43850 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388102AbfGXT0h (ORCPT ); Wed, 24 Jul 2019 15:26:37 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 7E7E021951; Wed, 24 Jul 2019 19:26:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563996396; bh=Y6ZBmPVVJLjITtQZOfsMtn+AryB2pWhpesndz1prxng=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yKpXVfSHMqvaYQMK8uei60jJSCfIrk2iBo3Rpm4YOgMJYueCEkx+m7iwz8Z+gE9yx CkDXzJOhCzlAJ0mZ3p8Vzpk7JHsXFppX1XvlVLbftdM5tbE4kRXTwU1zUdNfyRTlX1 ZhAv1DmWpN7aOh32lp28yR+lQe3BPWiWnUwSsP/M= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jose Abreu , Joao Pinto , "David S. Miller" , Giuseppe Cavallaro , Alexandre Torgue , Sasha Levin Subject: [PATCH 5.2 031/413] net: stmmac: Prevent missing interrupts when running NAPI Date: Wed, 24 Jul 2019 21:15:22 +0200 Message-Id: <20190724191737.762649528@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190724191735.096702571@linuxfoundation.org> References: <20190724191735.096702571@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org [ Upstream commit a976ca79e23f13bff79c14e7266cea4a0ea51e67 ] When we trigger NAPI we are disabling interrupts but in case we receive or send a packet in the meantime, as interrupts are disabled, we will miss this event. Trigger both NAPI instances (RX and TX) when at least one event happens so that we don't miss any interrupts. Signed-off-by: Jose Abreu Cc: Joao Pinto Cc: David S. Miller Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index 06358fe5b245..dbee9b0113e3 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -2048,6 +2048,9 @@ static int stmmac_napi_check(struct stmmac_priv *priv, u32 chan) &priv->xstats, chan); struct stmmac_channel *ch = &priv->channel[chan]; + if (status) + status |= handle_rx | handle_tx; + if ((status & handle_rx) && (chan < priv->plat->rx_queues_to_use)) { stmmac_disable_dma_irq(priv, priv->ioaddr, chan); napi_schedule_irqoff(&ch->rx_napi); -- 2.20.1