From patchwork Tue Dec 17 20:09:26 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 181908 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp6243905ile; Tue, 17 Dec 2019 12:11:27 -0800 (PST) X-Google-Smtp-Source: APXvYqxfD6RT3q98QWSmzQyTFwqqgMy0oMIa88JqsAeGrIKY4+46NQb8VxT02t1O+4JS+GRZyw2f X-Received: by 2002:aca:75d0:: with SMTP id q199mr2634932oic.121.1576613487390; Tue, 17 Dec 2019 12:11:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576613487; cv=none; d=google.com; s=arc-20160816; b=EfOpyhfDU7GogrDkUJDsy3bkV0h6V2V26fXM5jtS5AptTC4E1O1UsFQPsoQ9JZZn4u ZBo81mo1OPN7zNdzDop0H1RIgziyKQqpSX3Xg8lGbC6bMjoNRrQWLAprZtNYCF4EvEWD WfKHZVHJHJ4OngCAcDshpDK0kn7WasQkqLf2a+fAIhFez6lKucUGs/A4hGGhaEMmAH47 hXoUvblfSz+xGoj+Me0gFqtS6Zeo5/rqMKXUbAeDHBy1XivkoYl9yrbh1i8pGIHKGmzg mMzdNm/2J8ehvogtZK4Zww7JK6t9nURkQbIT+IGqaM4dx7OICFAeM33JfHIsYqEPYk83 0ITg== 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=5s54kr2RHb4AUeyPTvVonW6t9p4/VWUBIkZn09W17A4=; b=togjEyPS6M2A4Sss7pdZYl5pJIiUcehVXVtvjPZWJvJb8sD5PR+3BqFQsMcM8Rw85z TFBGsqvCEW0ZEJiQxdcUZEJKP7Mg4Wr20wyUmrWULZWY+uNOjuAcHCZk58y52ZLLfzWk r4eXgNfMZAGlLZpzHKV+SDjLbD5j/HAtTdYhqUdZbuRL7ILmrN785ApMaY4PbOh+70mo AQvmwhF/fe42tPE9bfyW3BgJg+HmZjIkYXujG61g2l/SALOqXYevtU4R4fDcMWW70+YF nBC9Y8wn3dnL1+e3SyDM9nyml7Q8jHE4xKPe44FGp35jx4YUGmJLGYVZnGIJV3qRdvAo p7ww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=FoSDTec7; 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 f4si13123081oib.104.2019.12.17.12.11.26; Tue, 17 Dec 2019 12:11:27 -0800 (PST) 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=FoSDTec7; 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 S1728739AbfLQULZ (ORCPT + 27 others); Tue, 17 Dec 2019 15:11:25 -0500 Received: from mail.kernel.org ([198.145.29.99]:38012 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728662AbfLQULY (ORCPT ); Tue, 17 Dec 2019 15:11:24 -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 A5434206D7; Tue, 17 Dec 2019 20:11:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1576613484; bh=7I/A2Gv6FuvwnPeTtQRWUP+nBGtZ1qPYwGx36MZx0LI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FoSDTec7cudtWeEjbqeLh32nMlqsssjueRDSKUQuPzudxrYOq03Ka4MpYIRywrwG3 y8zQaAWzm+AW1xOAP9n8MddJc1/3+n6GpbLRTA3aQSFGsHsGRO+cnU/rmooVapXt/4 b0pgbYPZCfgZ8rss4T6kv2BOrdyVLkpo3ncRUw/o= 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 5.4 05/37] net: ethernet: ti: cpsw: fix extra rx interrupt Date: Tue, 17 Dec 2019 21:09:26 +0100 Message-Id: <20191217200723.798238922@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191217200721.741054904@linuxfoundation.org> References: <20191217200721.741054904@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 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 @@ -890,8 +890,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]);