Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp667151ybg; Mon, 1 Jun 2020 11:11:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzIoxD7X5X7rC4mRBRMYEHY+WVNla3DfvQwB7Vygh2/QW7uS5YWM8uBubDSPa8pgGBisK3E X-Received: by 2002:a50:954b:: with SMTP id v11mr2669881eda.273.1591035076864; Mon, 01 Jun 2020 11:11:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591035076; cv=none; d=google.com; s=arc-20160816; b=BQ/xJv1WDBd7mwA2qiLebchSD0amu40x6P9Uas3ph0iI374tUpHJ985FSRtf4svbn6 Oh10czlim06qhtnUsxaL6JtmWq1Vr5ZVAVrxFC+JOkWTniD2qiOkc+JTXPOPZ2HW51z2 rECQhmQ2iO2QiuOD1WpMiQ7Aa12I6m4muFOHKQWk725nWEB3b0xxlbGhF+bxYqbMma7B YjDqiW5n/nmndL/YwiCO4873FmIUbzojeU6SXb+vDT4FRqXDoyhOj5WmZYz7fwN7aPs7 I6cLtNZYDcPGlS8Nymaat2xoEXiNpIo9Q6CSU3TKcTJjxwphzhR5k7ERs2I9THzNYoZf D9Lw== 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=18XHVs7sSnd5e5yAOlX4D7VPjeoYntoESeb9Isza2P8=; b=ROMIFhyrTI7adUuyoxVAvqkQHyqfdls3DePqs4jkbXOor4dGLQG2k6QBUWnn3wC8UM DpRhz69AwqjtfM/sD5/D0kt4N8B6v0PLxFpoT+bZ7lfCKyc6tTmUPpFzF99h500xNX1y IY3o5qvI8IwEs/EwP0Huyf5+ZUF2rILeu9924Hvn3t4uxs68AToMmvnSs+ly00zVisaY oK2Bge82bDKed+V49H6f1nVl9ebjwSU3AjdR1pcp4UlPY5czXw0igNQDQU6NeBkqLthE u6Kdf5xxjK/EjfyEQyOAjp38y3RrG4zrjjVOfGGKbHYf3CGz/+Exbd64UcTtnP7PuNB3 n/dQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=nQWJd3gJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ay4si125803ejb.439.2020.06.01.11.10.53; Mon, 01 Jun 2020 11:11:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=nQWJd3gJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730647AbgFASHz (ORCPT + 99 others); Mon, 1 Jun 2020 14:07:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:53298 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730582AbgFASHZ (ORCPT ); Mon, 1 Jun 2020 14:07:25 -0400 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 B21ED2077D; Mon, 1 Jun 2020 18:07:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591034845; bh=kDllSztfZKlfNu9g1yBHYHaBq64UTXWIu8Dp188I4qU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nQWJd3gJiQS1qOgtxbGHEbHplTVyo1utpSpEFxCQ8jk5+ys1fRU0uqGgjIYjbyRBS sevOmNFrDrQGAAvmFckWbTn3IyJOmhTXAjcaTdpp42udxK77G1kWbjgrEnTjrOLlTD 8qwDHlsX3GG1q1E0zcGV/nIEfkBirnxlDESODj7U= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Stephen Warren , Linus Walleij , Sasha Levin Subject: [PATCH 5.4 038/142] gpio: tegra: mask GPIO IRQs during IRQ shutdown Date: Mon, 1 Jun 2020 19:53:16 +0200 Message-Id: <20200601174041.930454932@linuxfoundation.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200601174037.904070960@linuxfoundation.org> References: <20200601174037.904070960@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Stephen Warren [ 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 Link: https://lore.kernel.org/r/20200427232605.11608-1-swarren@wwwdotorg.org Signed-off-by: Linus Walleij Signed-off-by: Sasha Levin --- 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 8a01d3694b28..cecde5440a39 100644 --- a/drivers/gpio/gpio-tegra.c +++ b/drivers/gpio/gpio-tegra.c @@ -365,6 +365,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