From patchwork Thu Dec 19 18:34:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 182176 Delivered-To: patch@linaro.org Received: by 2002:a92:d0a:0:0:0:0:0 with SMTP id 10csp867989iln; Thu, 19 Dec 2019 10:52:39 -0800 (PST) X-Google-Smtp-Source: APXvYqykUfwgbu/OWNMPaFZWZKfWQ7tgMuzUFwRcBj8PKN7HT9aeBJxS9NiK2hONYEVcCH6RQ9Tk X-Received: by 2002:a05:6830:1e67:: with SMTP id m7mr6519913otr.262.1576781559624; Thu, 19 Dec 2019 10:52:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576781559; cv=none; d=google.com; s=arc-20160816; b=TaR9JMZLaEdlcCspDHJIcLhliOgtfLeFaNvZY7caIfn10E/qwvi/t2rIqz4SWx7WRs fA3aX+ysWofd9+CahiPUAr1eurIpp/Iwy6qgrLt3rJoN6gihXm82a0217/Z6S3Aq+o+C DfYYblHgsq6n7DMUMirGlc3J8EuTP9FkEPmJJGqqX7q2IrhmaadfnVdH/E8Z1fOaGOBp 7ysG5VVEq8DX7uRWiDSNOIUFKlsX/76/Yu0CJJIgRZDYgSGLp6lbg+bJS8zm6AhGKkcM 1NesT1ZBYb7Mz5L++9lEEPgk5TeC81WzTaoeVpSiSMHDV/pXL6EgCUyS4zUSECmewp6K 6czA== 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=MJccQzpaRya5Jvc0fCxU/XwpRJaMpcd5+nClJCIfoPE=; b=J0I6M388hpxQsgICD5rfOQHTWJepe5b1hWLOy6TrSZtBEgXDVN3EEadChnaCPmT7mn 1suIaZUINHYCSR4X3Qt/H26DmYeGcLeJeT4CbwLOZavvWPrUkqzBv7nszt1vdSHW/uUd DT7kpCE3NRSkY7pGl6XzdbfbZhMRxMTCTXv6NqO6GNIGv9o/Cmf1HR2RY6pWXKm0lxF2 S4HjJ/E9N4W57knBP/v/KE1voXbeQaU39birVsYMkW4iH/g0casa6Lz1VjDF5L2dHBfm jbspA8koO+YAfQXRqXpKgoy9762Z+37njq80fhJzYn9UF7wlrCjLrOjCEFMxaaX6yLCZ JGYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=pK40uluN; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-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 y8si3720717otg.309.2019.12.19.10.52.39; Thu, 19 Dec 2019 10:52:39 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-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=pK40uluN; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730267AbfLSSwh (ORCPT + 14 others); Thu, 19 Dec 2019 13:52:37 -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 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@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]);