From patchwork Fri Dec 6 12:28:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Grygorii Strashko X-Patchwork-Id: 180919 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp728814ile; Fri, 6 Dec 2019 04:28:29 -0800 (PST) X-Google-Smtp-Source: APXvYqzXodHp8lv3N5u/vatihO5qMsIlE99guE1kGGfPf/ixduP2w6iVVF5p1R9KHogSsW/klBaD X-Received: by 2002:aca:55cc:: with SMTP id j195mr12282591oib.22.1575635309179; Fri, 06 Dec 2019 04:28:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575635309; cv=none; d=google.com; s=arc-20160816; b=BFneko6kdl945xRBDsX556h/YqulwiT/ecMTbPjMUkj3SERlJo9pmNE+aF+Wmo74CI 8m8kehnkqbzC6TfUGZ6PNGndm2JYXrITwNfPijaRhuXCnS+CDr1y15lxU1BbGXthIOD1 s5cFIZYeTohTdqwTqNumUWKY+4nAdsLp3HhW4z1ma1f4I2y3e/L7R4v6vs7zNXPrhD4M OcctFcQoxEFOIYz0F8je3owDgNWklC2EAd3JsspwI79Co8zsw3Pg0AS7E1GDnqhow2xO 2bsPmVyoZPVwit61r8nfOuRXCXWqZyjbDNqdOdL5pGGqYZGLEyx8yVSJrBF8KSD62MSU x5VQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=/lJcAFcF9KWiWdZKdHMRLJPlsxaW7YekXHf7BHvietU=; b=0YSlpdgaBndVaA2b+FfdVb/P5JAtwZ+s/cFqf5ijR9OhoUIRsPMe/rZq85UodXxFDF Hj57qaCB2RoPxOU8EsJMMGUV/yLteUYi1ztfiPQaQS3JT73jf/9ZG+v5/B9WDzzc24W7 al//mZQGjEJq7ywW1Va8oHxqzn2jaAu6qb/mxL4rfr3cMCZ6SaBdrNGdkb97ZxuvltOq QDJzMmxFMNUVowNkI2rQBPAObGuiJbsSOZJOUdjZiIAoz3gaEuXmInpJz7oK5sOmWfvE rY7MAFI7XhTZReVz0jfKj0M8el6LycGyU0QSc68TGQPXWAj+NspFQXWEbVFbNCPHyScx 5F/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=rddULQX7; spf=pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-omap-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h139si6908961oib.85.2019.12.06.04.28.28; Fri, 06 Dec 2019 04:28:29 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-omap-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=@ti.com header.s=ti-com-17Q1 header.b=rddULQX7; spf=pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-omap-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726264AbfLFM22 (ORCPT + 4 others); Fri, 6 Dec 2019 07:28:28 -0500 Received: from fllv0016.ext.ti.com ([198.47.19.142]:34736 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726124AbfLFM22 (ORCPT ); Fri, 6 Dec 2019 07:28:28 -0500 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id xB6CSPWI110437; Fri, 6 Dec 2019 06:28:25 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1575635305; bh=/lJcAFcF9KWiWdZKdHMRLJPlsxaW7YekXHf7BHvietU=; h=From:To:CC:Subject:Date; b=rddULQX7OOBe7RTS02TYdLicJY3wH4bxNPzErtdNMBUNytCn3cxtqlNQ9v604lgRa iSmmNRY79xxJskMNKRkcG7WkvozzdjPFBSEzgLhoZghlxELMQTxPSaSb59EIPMEAmC IQUVphVeb+qk71+9WxSDaQYwGH2itqsyU7PwOiDI= Received: from DLEE112.ent.ti.com (dlee112.ent.ti.com [157.170.170.23]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTP id xB6CSPWX030943; Fri, 6 Dec 2019 06:28:25 -0600 Received: from DLEE109.ent.ti.com (157.170.170.41) by DLEE112.ent.ti.com (157.170.170.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3; Fri, 6 Dec 2019 06:28:25 -0600 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE109.ent.ti.com (157.170.170.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3 via Frontend Transport; Fri, 6 Dec 2019 06:28:25 -0600 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id xB6CSOPU119391; Fri, 6 Dec 2019 06:28:25 -0600 From: Grygorii Strashko To: , "David S . Miller" CC: Sekhar Nori , , , Grygorii Strashko Subject: [PATCH v2] net: ethernet: ti: cpsw: fix extra rx interrupt Date: Fri, 6 Dec 2019 14:28:20 +0200 Message-ID: <20191206122820.24811-1-grygorii.strashko@ti.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org 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 --- Hi It requires manual backporting if selected for stable. I can prepare separate patch for 5.4 if needed. drivers/net/ethernet/ti/cpsw_priv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.17.1 diff --git a/drivers/net/ethernet/ti/cpsw_priv.c b/drivers/net/ethernet/ti/cpsw_priv.c index b833cc1d188c..707d5eb480ce 100644 --- a/drivers/net/ethernet/ti/cpsw_priv.c +++ b/drivers/net/ethernet/ti/cpsw_priv.c @@ -100,8 +100,8 @@ irqreturn_t cpsw_rx_interrupt(int irq, void *dev_id) { 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]);