Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp9986735ybi; Wed, 24 Jul 2019 13:36:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqzGhdczqqXhSqoVl6diykcGLMs41ZLADnwGLr2LWkK5zo0u9SF+LVzoSig7aoJsGcNkk7YW X-Received: by 2002:a17:902:28:: with SMTP id 37mr81115574pla.188.1564000560532; Wed, 24 Jul 2019 13:36:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564000560; cv=none; d=google.com; s=arc-20160816; b=ALI2yvYNvd4U8KA2ERvnW9bygs7yzGD0COo0S+vMgzNGwmgBbBZOFmGV8tD/CKi7Sc Xwjz+xh6Cb63elhDrPPpq0aW1Bk7BTbCUXoOpFq+YDbywkGCThvDF+ne1I5IxOFUkJnN 8YhROlCg3/gMuaW5p9UCUIJeTelo5ppGFcjVL75v176D5SuVvXSWbKbYoF1ubnrGxHDM RyXJBUWUFP6Jwy/60ZmzIbGFTiyqxcSVCKyGzbH/v0e5hR2ayPc0lpyZuE7zUmiFBeYO mbuLj1I2ChQqCAuvI/pmFg4zTgQ2hp/ErIOOW8aW7x8HEKJdEc5YmhwTod5jyLJ3DwAU 5BtQ== 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:dkim-signature; bh=GUKDjp6cKT8BCa0a/dmENiNgQfc4U98uFsZewV4+rzo=; b=YMT7k4LOEx8d9dWb2UhZGS/Ne1G/t26fiB7gSO383lWXwYwNyMLTCnGIHcqIUSGCW2 IBvnfUt5MqeN8mqPhX0I5v9P2VQxMi9sQSuJBtWkix0txfUNeAz2EUV3kcxZ35mAj5+Z K5Vu46g7RVNSw/hqBp5wzHOPA2LkhamY7iNQwrKo1TT2Wgzd70yYyT2279FNvuMEnNEt vZbLxpd06RoUZ/BxcPHWjj5q0qpzAZS7JoVEdTTwyTTjGfJo8ZawGrTDQn0kc8brcX4O GnP9irxrgT3mGxTa+EhI5f2wh0r+95XbbLL2htpZqhtq1ixQhnb8IsAQgwpHV7bbJOCK GXcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=yKpXVfSH; 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 j17si15600057pfn.278.2019.07.24.13.35.46; Wed, 24 Jul 2019 13:36:00 -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; dkim=pass header.i=@kernel.org header.s=default header.b=yKpXVfSH; 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 S2388882AbfGXUee (ORCPT + 99 others); Wed, 24 Jul 2019 16:34:34 -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: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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