From patchwork Thu Dec 5 15:18:17 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Grygorii Strashko X-Patchwork-Id: 180897 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp2106119ile; Thu, 5 Dec 2019 07:18:30 -0800 (PST) X-Google-Smtp-Source: APXvYqxmhqu7+1j5sllftPtO7VMkabZaxSyw6o06q87TS8MpLDMra7dmcCqYVE+y+pmEbA+Ws8Ih X-Received: by 2002:a9d:6a92:: with SMTP id l18mr7101764otq.37.1575559110257; Thu, 05 Dec 2019 07:18:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575559110; cv=none; d=google.com; s=arc-20160816; b=vXIH7JYxEUtpuGE3PcCKfnGP1Ffkh6bVFghkzp0FpDeFQR05kExrvbdjRea4Cp7Jy8 vaGBtDrMZapDKj1z1QS1joGwVbt8v6OJsgEk2ce7gNmEELZP4XQAutbrW0nszPiywU6f Ap2EmwNgip11i0kN0dlo9R1tOBzrsnVu3ZdoxUnz+e3kIAramewS6SobxfbDTotLibJI 3ooyhyGC8ZO45fEl7r/vqfpngYdWtjca3jzVYfb65+HMdzZM+xhyg9JAwpX30TUwhgQ/ jLugX8IYakbrN23UIBWO+7f7J6uo6vUnKXRHItmHIP3HfoAZ+JrEpUp1IYhVUN8zcfj4 x42w== 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=FN7arxalvgtdlHgsmKCtOqN9pssrajHom/pTRS6HmeQ=; b=fyV3ZSS9+gSc9oKA9TxUG45E3EcArzvMZsFzJ7q5M6cCq+fGhwitGMqH+9PZJRPISh ugyppuxAHJd/RV9LM2oVcmef2SDQDXsPeDKreqgJ4ulF+rXqzgbdrlWHWsMWTdIWaBYD 4EsZvVnSq6wC7KFuA8e1ByGV8UFT0GMuiC3VMMTljcPJRbdEObdry5E/gWhJ+w96na8V vgDXloIIBkkoxDlYBtduQ8sVMCMmam65+nGatY1mmAjtAYzK/OV+nSxcdrPbF++hDFbO 7WxCog1CGTxeddaxjw0PT0NKxFhBg8ZviDg2wneqgYHZRo552jVW9FFhj38ASaeXUrwy icww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=n1JOO18r; 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 5si6302162otk.73.2019.12.05.07.18.30; Thu, 05 Dec 2019 07:18:30 -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=n1JOO18r; 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 S1729703AbfLEPS3 (ORCPT + 4 others); Thu, 5 Dec 2019 10:18:29 -0500 Received: from lelv0143.ext.ti.com ([198.47.23.248]:56676 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725909AbfLEPS3 (ORCPT ); Thu, 5 Dec 2019 10:18:29 -0500 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id xB5FIQPw091134; Thu, 5 Dec 2019 09:18:26 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1575559107; bh=FN7arxalvgtdlHgsmKCtOqN9pssrajHom/pTRS6HmeQ=; h=From:To:CC:Subject:Date; b=n1JOO18rl/BL6/tPVRXfzTwDVMi/vQh6wwwSc0bgU4Wh5LfVMXUclL9BxjLhkCnkf 9Jt9Y2BL6d/x9ByPh5J/ZhdGd5M4I5nuvo1lQ8Vfqn4iUwzoChxdkDFQgI+db1z6gu abwK8/Xp4vkewoFBP4DxrFprIU7rIGAMOB8ZrL6M= Received: from DLEE115.ent.ti.com (dlee115.ent.ti.com [157.170.170.26]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTP id xB5FIQPw053264; Thu, 5 Dec 2019 09:18:26 -0600 Received: from DLEE102.ent.ti.com (157.170.170.32) by DLEE115.ent.ti.com (157.170.170.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3; Thu, 5 Dec 2019 09:18:26 -0600 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE102.ent.ti.com (157.170.170.32) 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; Thu, 5 Dec 2019 09:18:26 -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 xB5FIP3H126067; Thu, 5 Dec 2019 09:18:26 -0600 From: Grygorii Strashko To: , "David S . Miller" CC: Sekhar Nori , , , Grygorii Strashko Subject: [PATCH] net: ethernet: ti: cpsw: fix extra rx interrupt Date: Thu, 5 Dec 2019 17:18:17 +0200 Message-ID: <20191205151817.1076-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. Signed-off-by: Grygorii Strashko --- Hi This is an old issue, but I can't specify Fixes tag. And, unfortunatelly, it can't be backported as is even in v5.4. 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]);