Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp2831584pxv; Mon, 12 Jul 2021 03:02:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyXxHQ7Pn90FWvqtV9G9Jx2b5EQJTHqHYEV1c+D5jnmjeMvQv0boeJKRGG5zmEFw0IkHnNo X-Received: by 2002:a17:907:97c7:: with SMTP id js7mr51207827ejc.59.1626084160287; Mon, 12 Jul 2021 03:02:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626084160; cv=none; d=google.com; s=arc-20160816; b=lgnemyUeYmL/deP7Q6zxsHaEvw4nh3FPx6hgIj7ZMtkXJOvc3Eodn8DdXjwGHVxXKg eiHhYzQIjmcwbxNr5LAIsUYINYQgSWmhahpfNbet7av+762m2yVBzgXWZZWQgAfyVwHC 6mLFr96CpbCx65tvtAVNyeJg5ih/1YviHe15ESP37YaDHtIXCWbGE0UKGTIuAz0Vq+cI qQlWQgdnjct8Be82DDsQCMJVmXZoz8J9Kz+knY60XT8tMw3yfZXHsWWW4w7OkhLGv5PM zTjlWEML5J4DKo/gzneGzBU35ZLDXd9Hp9DX04lmRFFuTZuoslQjZ0u8FztuO2LnjiQh zy8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Qf+6ZdX+EjA758ebS4jvPrhKwiAdiJYDZOBbNAyS4Xg=; b=JC4GDt7k2P1fAcfLF9mViSBwbbMF5PpBLLzfBqptlOY+gpjQ2OhVfBcpvTQFDm4Fvx cZL7f2GeS9Sd6bSYEgokIHVWksXaRWcAhyxOcRKc9+Hhn3GnHJ53DbBB3m5KVtluslcY QoBcxVNbC8bmaBaxwmT4hbbpaBa9K6XihiFb39sBOFU+e9v/4O6vJDMf9Dp1l1XGWeSt txIEQoQRyGohxDYeqpEOTPB9Q6XuoyaoPwU4Pfaib8bkQ5HG9U5/48DnMfEgKMgeYENV xwBfIDz0CyTlVYJaKXPinmiZ7CNqX8vON54CObNrCKwAQxIP2nrr2kw0YjfOFLQzhdbm u+Lw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=TVZLKFs+; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y18si2335425edo.360.2021.07.12.03.02.17; Mon, 12 Jul 2021 03:02:40 -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=@linuxfoundation.org header.s=korg header.b=TVZLKFs+; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245227AbhGLHLb (ORCPT + 99 others); Mon, 12 Jul 2021 03:11:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:45050 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239191AbhGLGta (ORCPT ); Mon, 12 Jul 2021 02:49:30 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id F0D7A60233; Mon, 12 Jul 2021 06:46:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626072390; bh=Pv80huPETX49F+Ix/bU41NI27rssIwe1gggF+x3Jr9Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TVZLKFs+9XxgHksv0Z+bq3xjomp19BlT8eyr0PoMWnD3hGrYWu6hkkE7TCURb6zbk HymNnxed0oDzvzyAfDImOTqbIXrnHFWH1apdpITw8wb0R6+wUQvdNcS3qSWs6WFF1u /WhxBwvSMtWJnqlDZ2QpTiSBaDFkuMTo5e6SfQ0c= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jairaj Arava , Sathyanarayana Nujella , Pierre-Louis Bossart , Shuming Fan , Ranjani Sridharan , Stephen Boyd , Mark Brown , Sasha Levin Subject: [PATCH 5.10 435/593] ASoC: rt5682: Disable irq on shutdown Date: Mon, 12 Jul 2021 08:09:55 +0200 Message-Id: <20210712060936.489831727@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210712060843.180606720@linuxfoundation.org> References: <20210712060843.180606720@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Stephen Boyd [ Upstream commit 47bcb1c7108363418cd578283333d72e310dfeaa ] We cancel the work queues, and reset the device on shutdown, but the irq isn't disabled so the work queues could be queued again. Let's disable the irq during shutdown so that we don't have to worry about this device trying to do anything anymore. This fixes a problem seen where the i2c bus is shutdown at reboot but this device irq still comes in and tries to make another i2c transaction when the bus doesn't work. Cc: Jairaj Arava Cc: Sathyanarayana Nujella Cc: Pierre-Louis Bossart Cc: Shuming Fan Cc: Ranjani Sridharan Fixes: 45a2702ce109 ("ASoC: rt5682: Fix panic in rt5682_jack_detect_handler happening during system shutdown") Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20210508075151.1626903-1-swboyd@chromium.org Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/codecs/rt5682-i2c.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/soc/codecs/rt5682-i2c.c b/sound/soc/codecs/rt5682-i2c.c index 7e652843c57d..547445d1e3c6 100644 --- a/sound/soc/codecs/rt5682-i2c.c +++ b/sound/soc/codecs/rt5682-i2c.c @@ -268,6 +268,7 @@ static void rt5682_i2c_shutdown(struct i2c_client *client) { struct rt5682_priv *rt5682 = i2c_get_clientdata(client); + disable_irq(client->irq); cancel_delayed_work_sync(&rt5682->jack_detect_work); cancel_delayed_work_sync(&rt5682->jd_check_work); -- 2.30.2