From patchwork Thu Dec 19 18:34:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 182187 Delivered-To: patch@linaro.org Received: by 2002:a92:d0a:0:0:0:0:0 with SMTP id 10csp897566iln; Thu, 19 Dec 2019 11:15:23 -0800 (PST) X-Google-Smtp-Source: APXvYqxYzYP9pruLFg6b3rLLDL3o4V1jPplatGin0hH0sfyx0QnHEutocXB0Z0u/9EEb28aaPxpE X-Received: by 2002:a05:6830:20cf:: with SMTP id z15mr10411092otq.277.1576782836555; Thu, 19 Dec 2019 11:13:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576782836; cv=none; d=google.com; s=arc-20160816; b=lciEY9Dsn/OAZzQ4R4oLyRqeaQ8zk0zlOtAtosvDQv0/PPcHSvtsBCZYjQv6/XzRWA 4AQgy/O+dY8SpQ1KfNpcsUpx1Ym+8lsKUi1FcQNRj/CVqKry0PVWRRLl9wWZf3pX7fom pHLxhnITVeApl8t/tiFTsydzzb8YDM/GbaTeAc1RxpnDWuOrJEXAvt86e9Xez0yHsijw lnVhUVKaelmjtal655NA9Yl4QdrdewNAX8RpL7K61KqNFid1J88lbAbb7ga5n4IN8xe3 tfW59mwFDxKnVqHdKSm6nVR+7Ki5lXeUb0tjx8OUlBApp7H4F/AhZPUBbbDIGAXoeJDH yIAQ== 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=E8yiXsxy5all/+5undOIIjHMHtEaZsCHUCCuHRt6NmU=; b=wyvmxn0rIg623fN1rBBALC0RE95R1pF6pBtAkohoFsYYb+OOmFFjPH/LDDcY8doO9Y ZKege1bxo+e3WCY4NXfzRD/o9OHvRC2Gi9ITD4aQNZkScoFHjbmo2O1nOzLB2abb/iQ8 VNg8BhmweV+4J47SOXYPUG62JTSzKzP1Nj9W43E2aSUZTOtEwRSgdUcbEHs6Vk1YOdXG 8cqRrSvZ6vJ2byS4QIabDiHBbbhFs100Qr0VZYRo+uZwWlcpnuvC0+Ayh6CX2q2RG5V8 +cUTLMFKyurvGKsWBr5PciqYFeumC9nbAEhl0F42Q7TuOuqwnL2eWTJyNsLEQcI/tQfh XIbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=V0wQghgz; 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 v26si3819910otj.0.2019.12.19.11.13.56; Thu, 19 Dec 2019 11:13:56 -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=V0wQghgz; 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 S1728483AbfLSSlQ (ORCPT + 14 others); Thu, 19 Dec 2019 13:41:16 -0500 Received: from mail.kernel.org ([198.145.29.99]:60188 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728493AbfLSSlN (ORCPT ); Thu, 19 Dec 2019 13:41:13 -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 89EA6206D7; Thu, 19 Dec 2019 18:41:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1576780873; bh=TsvhNeAS7QpjrVGbREBFkeHb/CNC3NqL0b7YAKujFZ4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=V0wQghgzG+ML5tFxcXHoeug07yUTGDNOkJE0jcxdNclnnNonlFpJElZuiJZ8Q3W/t 0c2htEgZF2r920JaksdscKgi3NnGHfRiMn3XkZTJXCgHXc0jmYGXlJ1rNWRrK+dzaC vx4Q2CmA3bTfxusxVtqPW9n8QyVS25QnldOKeU6I= 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.4 150/162] net: ethernet: ti: cpsw: fix extra rx interrupt Date: Thu, 19 Dec 2019 19:34:18 +0100 Message-Id: <20191219183216.904800822@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191219183150.477687052@linuxfoundation.org> References: <20191219183150.477687052@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 @@ -777,8 +777,8 @@ static irqreturn_t cpsw_rx_interrupt(int { struct cpsw_priv *priv = dev_id; - cpdma_ctlr_eoi(priv->dma, CPDMA_EOI_RX); writel(0, &priv->wr_regs->rx_en); + cpdma_ctlr_eoi(priv->dma, CPDMA_EOI_RX); if (priv->quirk_irq) { disable_irq_nosync(priv->irqs_table[0]);