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=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,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 1541BC43603 for ; Thu, 19 Dec 2019 18:52:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DC37C24683 for ; Thu, 19 Dec 2019 18:52:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1576781562; bh=ptTn8ADqCql0udAL9DknvoKper9lTu7OmBfTYKrgNOw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=esd7FtZbVxgCigG3G1+SUiMGrdJilIZrdioKJIDx/Vc2EZzPFvd+ssMT5bsC3sQYd FsnVtlxeW+Wt6knAJknkY0DNlZNMY8YCJzTD+D6WpZ1xWDZxO7BxFWEJUcAjPPXcZq 4I71wAKZjIg5v2CQF5bav31mBpMS/G7pDnaLnUKU= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730278AbfLSSwl (ORCPT ); Thu, 19 Dec 2019 13:52:41 -0500 Received: from mail.kernel.org ([198.145.29.99]:47254 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730096AbfLSSwh (ORCPT ); Thu, 19 Dec 2019 13:52:37 -0500 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 5FE47222C2; Thu, 19 Dec 2019 18:52:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1576781556; bh=ptTn8ADqCql0udAL9DknvoKper9lTu7OmBfTYKrgNOw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pK40uluNfhCOGI8WxOeV0EEt3YInNTZ6DQtsRbmsbl1zeB5l2zfesaitcAQz2OKC9 O+FdL51E5PC9u8yLATMEeAG6j9Cw/WuwAmtqiF/sQhcdiI+twmIi+al9GL1Gx2wfs3 XJTbpMbzQoYoQcbg8RNrfH7p1HGSe/i5aDWQ0CV0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Grygorii Strashko , "David S. Miller" Subject: [PATCH 4.19 05/47] net: ethernet: ti: cpsw: fix extra rx interrupt Date: Thu, 19 Dec 2019 19:34:19 +0100 Message-Id: <20191219182901.301630269@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191219182857.659088743@linuxfoundation.org> References: <20191219182857.659088743@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 From: Grygorii Strashko [ Upstream commit 51302f77bedab8768b761ed1899c08f89af9e4e2 ] Now RX interrupt is triggered twice every time, because in cpsw_rx_interrupt() it is asked first and then disabled. So there will be pending interrupt always, when RX interrupt is enabled again in NAPI handler. Fix it by first disabling IRQ and then do ask. Fixes: 870915feabdc ("drivers: net: cpsw: remove disable_irq/enable_irq as irq can be masked from cpsw itself") Signed-off-by: Grygorii Strashko Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/ti/cpsw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/net/ethernet/ti/cpsw.c +++ b/drivers/net/ethernet/ti/cpsw.c @@ -954,8 +954,8 @@ static irqreturn_t cpsw_rx_interrupt(int { struct cpsw_common *cpsw = dev_id; - cpdma_ctlr_eoi(cpsw->dma, CPDMA_EOI_RX); writel(0, &cpsw->wr_regs->rx_en); + cpdma_ctlr_eoi(cpsw->dma, CPDMA_EOI_RX); if (cpsw->quirk_irq) { disable_irq_nosync(cpsw->irqs_table[0]);