From patchwork Mon Jul 12 06:12:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 473001 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp2689019jao; Mon, 12 Jul 2021 00:32:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxZloq37bwrsToGpgU2xKOe7l3XSuhDirhyUmpLyM+8dvz1sGIiVcW7twcWp9MeRqMw024G X-Received: by 2002:a17:906:1fd2:: with SMTP id e18mr8679480ejt.313.1626075179719; Mon, 12 Jul 2021 00:32:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626075179; cv=none; d=google.com; s=arc-20160816; b=yq7TBkV1KKPloa0MbNb94eC65Ne9M355woEHgcWG1YuAjm21WypHHa2qpSlPhOViH8 wtVZgZzrSOObaPAmXQpmxNIBWz/AUYbNPTZqzNwlQQeoJrOUHDTv4fE1mvDGCssPtYxS NzCR9qhZPGe9j99UaQkvXfLBqMknNFQxiBu4CxrM0gqX8/pzHxtaQA1yy0f+Z9FjaIdQ zDKEAj3taqNCqHuUy4ScGmi/XmhSrClo8YBMy6UOng6DEh3CMugEsyPsOJ/BYzh7/Qv3 PxZ6zwZa5VJVk1+9YcrTsyZB7smzga8JDYpUGjuzucnnBkABFuunxr9FQgUFCIVsvm3M S0zw== 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=ifxCMKECGl+XkMJWU74T+qEofFMfE9fxD7qqaRCkRwA=; b=VhhZOR1p3WnShYlyTp8yNcD4FHOPn1LKV4Wpz/zqwwCcPJFYnmTXJNBEQcXCD5gr3c dyfzT4MtMJmuqwv0EhEcnn3UxK7haWpyqQ0zOwdeb/atL1V9cFFRcExAT26+nc4XFAhy WIbeGEdfrhLFBuVz3S0YVkhuFrfHkcwYAYSeyEWJ5QHYi7CZs8DayWQpwI5et80B1Po7 SasXVOrLaIq0Y9b6J3NZaL+rS4k4lJbP5dLD8ZgKEt1jjniIvDPbAaC02xW6uWZ4ha78 eRNNQmLGguqNLQBfcdZBqvQsiTB3m0TiXZf3gztt1+Lf2o1+XD5pFk9ybYBYHVImXiAu bGqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=HuEpqfZt; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-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 e9si16596658edv.146.2021.07.12.00.32.59; Mon, 12 Jul 2021 00:32:59 -0700 (PDT) Received-SPF: pass (google.com: domain of stable-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=HuEpqfZt; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-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 S245440AbhGLHd3 (ORCPT + 12 others); Mon, 12 Jul 2021 03:33:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:35402 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244408AbhGLH1r (ORCPT ); Mon, 12 Jul 2021 03:27:47 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D2D9561455; Mon, 12 Jul 2021 07:23:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626074630; bh=phhEe4LlJNVR/lyIkm8IPZzQOPz+dXcOTY6kbqYAFzE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HuEpqfZt9o4wVdIBKK+0TuLtOd6bJsU78XXgW1gM/3dzuGR/0k+uEHRuKN8Xg3g98 MxGdPXawtOi4olMNkRkSoojCL6HBRTym452FPfz8SzmLeAVC7x6YzEwoYbqKuzQe4L T/sRDJPF0XUjXagNdue1pd0SmKj68myz5dVoiOng= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Shengjiu Wang , Fabio Estevam , Mark Brown , Sasha Levin Subject: [PATCH 5.12 644/700] ASoC: fsl_xcvr: disable all interrupts when suspend happens Date: Mon, 12 Jul 2021 08:12:07 +0200 Message-Id: <20210712061044.393621462@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210712060924.797321836@linuxfoundation.org> References: <20210712060924.797321836@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Shengjiu Wang [ Upstream commit ea837090b388245744988083313f6e9c7c9b9699 ] There is an unhandled interrupt after suspend, which cause endless interrupt when system resume, so system may hang. Disable all interrupts in runtime suspend callback to avoid above issue. Fixes: 28564486866f ("ASoC: fsl_xcvr: Add XCVR ASoC CPU DAI driver") Signed-off-by: Shengjiu Wang Reviewed-by: Fabio Estevam Link: https://lore.kernel.org/r/1624019913-3380-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/fsl/fsl_xcvr.c | 10 ++++++++++ 1 file changed, 10 insertions(+) -- 2.30.2 diff --git a/sound/soc/fsl/fsl_xcvr.c b/sound/soc/fsl/fsl_xcvr.c index 6dd0a5fcd455..070e3f32859f 100644 --- a/sound/soc/fsl/fsl_xcvr.c +++ b/sound/soc/fsl/fsl_xcvr.c @@ -1236,6 +1236,16 @@ static __maybe_unused int fsl_xcvr_runtime_suspend(struct device *dev) struct fsl_xcvr *xcvr = dev_get_drvdata(dev); int ret; + /* + * Clear interrupts, when streams starts or resumes after + * suspend, interrupts are enabled in prepare(), so no need + * to enable interrupts in resume(). + */ + ret = regmap_update_bits(xcvr->regmap, FSL_XCVR_EXT_IER0, + FSL_XCVR_IRQ_EARC_ALL, 0); + if (ret < 0) + dev_err(dev, "Failed to clear IER0: %d\n", ret); + /* Assert M0+ reset */ ret = regmap_update_bits(xcvr->regmap, FSL_XCVR_EXT_CTRL, FSL_XCVR_EXT_CTRL_CORE_RESET,