stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Stephen Warren <swarren@nvidia.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	Sasha Levin <sashal@kernel.org>,
	linux-gpio@vger.kernel.org, linux-tegra@vger.kernel.org
Subject: [PATCH AUTOSEL 4.14 04/13] gpio: tegra: mask GPIO IRQs during IRQ shutdown
Date: Fri, 22 May 2020 10:51:33 -0400	[thread overview]
Message-ID: <20200522145142.435086-4-sashal@kernel.org> (raw)
In-Reply-To: <20200522145142.435086-1-sashal@kernel.org>

From: Stephen Warren <swarren@nvidia.com>

[ Upstream commit 0cf253eed5d2bdf7bb3152457b38f39b012955f7 ]

The driver currently leaves GPIO IRQs unmasked even when the GPIO IRQ
client has released the GPIO IRQ. This allows the HW to raise IRQs, and
SW to process them, after shutdown. Fix this by masking the IRQ when it's
shut down. This is usually taken care of by the irqchip core, but since
this driver has a custom irq_shutdown implementation, it must do this
explicitly itself.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Link: https://lore.kernel.org/r/20200427232605.11608-1-swarren@wwwdotorg.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/gpio/gpio-tegra.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c
index 1eb857e2f62f..dd801f5d5253 100644
--- a/drivers/gpio/gpio-tegra.c
+++ b/drivers/gpio/gpio-tegra.c
@@ -356,6 +356,7 @@ static void tegra_gpio_irq_shutdown(struct irq_data *d)
 	struct tegra_gpio_info *tgi = bank->tgi;
 	unsigned int gpio = d->hwirq;
 
+	tegra_gpio_irq_mask(d);
 	gpiochip_unlock_as_irq(&tgi->gc, gpio);
 }
 
-- 
2.25.1


  parent reply	other threads:[~2020-05-22 14:53 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-22 14:51 [PATCH AUTOSEL 4.14 01/13] ARM: dts: rockchip: fix phy nodename for rk3228-evb Sasha Levin
2020-05-22 14:51 ` [PATCH AUTOSEL 4.14 02/13] arm64: dts: rockchip: swap interrupts interrupt-names rk3399 gpu node Sasha Levin
2020-05-22 14:51 ` [PATCH AUTOSEL 4.14 03/13] ARM: dts: rockchip: fix pinctrl sub nodename for spi in rk322x.dtsi Sasha Levin
2020-05-22 14:51 ` Sasha Levin [this message]
2020-05-22 14:51 ` [PATCH AUTOSEL 4.14 05/13] net: microchip: encx24j600: add missed kthread_stop Sasha Levin
2020-05-22 14:51 ` [PATCH AUTOSEL 4.14 06/13] gfs2: move privileged user check to gfs2_quota_lock_check Sasha Levin
2020-05-22 14:51 ` [PATCH AUTOSEL 4.14 07/13] gfs2: don't call quota_unhold if quotas are not locked Sasha Levin
2020-05-22 14:51 ` [PATCH AUTOSEL 4.14 08/13] Revert "gfs2: Don't demote a glock until its revokes are written" Sasha Levin
2020-05-22 14:51 ` [PATCH AUTOSEL 4.14 09/13] cachefiles: Fix race between read_waiter and read_copier involving op->to_do Sasha Levin
2020-05-22 14:51 ` [PATCH AUTOSEL 4.14 10/13] usb: gadget: legacy: fix redundant initialization warnings Sasha Levin
2020-05-22 14:51 ` [PATCH AUTOSEL 4.14 11/13] net: freescale: select CONFIG_FIXED_PHY where needed Sasha Levin
2020-05-22 14:51 ` [PATCH AUTOSEL 4.14 12/13] cifs: Fix null pointer check in cifs_read Sasha Levin
2020-05-22 14:51 ` [PATCH AUTOSEL 4.14 13/13] samples: bpf: Fix build error Sasha Levin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200522145142.435086-4-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=swarren@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).