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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 29080CD13DF for ; Sun, 17 Sep 2023 19:59:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240311AbjIQT7c (ORCPT ); Sun, 17 Sep 2023 15:59:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48056 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240371AbjIQT7Q (ORCPT ); Sun, 17 Sep 2023 15:59:16 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BCC2812F for ; Sun, 17 Sep 2023 12:59:10 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EF09CC433C7; Sun, 17 Sep 2023 19:59:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1694980750; bh=bJaWUCa1vzsWC9RXCByak0J0fqI7t9vFy1vruR05C6U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=n8nAuym9AUtpwNYxn2E/tPN2d6vSR6QfDm650t1tyVNASXbasG86P/u3LQWJEyPTd ZcHIV8AcCco7BG1gNTTMjq6DXVSLy4Yo8RQ1/jkYWBKoNBg/X1BZO/OCibe0CdnwWV hL3trqCTLeNtZR5UZGk8p1sLKpxqqVKk45BKL2ZE= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Yoshihiro Shimoda , Simon Horman , Paolo Abeni , Sasha Levin Subject: [PATCH 6.5 282/285] net: renesas: rswitch: Fix unmasking irq condition Date: Sun, 17 Sep 2023 21:14:42 +0200 Message-ID: <20230917191100.900503614@linuxfoundation.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230917191051.639202302@linuxfoundation.org> References: <20230917191051.639202302@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org 6.5-stable review patch. If anyone has any objections, please let me know. ------------------ From: Yoshihiro Shimoda [ Upstream commit e7b1ef29420fe52c2c1a273a9b4b36103a522625 ] Fix unmasking irq condition by using napi_complete_done(). Otherwise, redundant interrupts happen. Fixes: 3590918b5d07 ("net: ethernet: renesas: Add support for "Ethernet Switch"") Signed-off-by: Yoshihiro Shimoda Reviewed-by: Simon Horman Signed-off-by: Paolo Abeni Signed-off-by: Sasha Levin --- drivers/net/ethernet/renesas/rswitch.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/renesas/rswitch.c b/drivers/net/ethernet/renesas/rswitch.c index 4e412ac0965a4..449ed1f5624c9 100644 --- a/drivers/net/ethernet/renesas/rswitch.c +++ b/drivers/net/ethernet/renesas/rswitch.c @@ -816,10 +816,10 @@ static int rswitch_poll(struct napi_struct *napi, int budget) netif_wake_subqueue(ndev, 0); - napi_complete(napi); - - rswitch_enadis_data_irq(priv, rdev->tx_queue->index, true); - rswitch_enadis_data_irq(priv, rdev->rx_queue->index, true); + if (napi_complete_done(napi, budget - quota)) { + rswitch_enadis_data_irq(priv, rdev->tx_queue->index, true); + rswitch_enadis_data_irq(priv, rdev->rx_queue->index, true); + } out: return budget - quota; -- 2.40.1