Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1391405pxj; Fri, 18 Jun 2021 06:12:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzOrwM385gc3gOiZMV6JixoRHanvs9BIPetSNNFeA7EM9CUgN3uCgkEwSKPASf7ZYNBl8mh X-Received: by 2002:a02:820f:: with SMTP id o15mr3199852jag.139.1624021965120; Fri, 18 Jun 2021 06:12:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624021965; cv=none; d=google.com; s=arc-20160816; b=E6vEDgSX3EAJ3qqjsNQvsm03Wm6ZO5BXceNhXnQbTSVuTpsmmbIyDyE/Aw8bwOF4oR r+Xy+9KIqUoTZHpyo9Qc+/zp4NC7i7GZ3SRD8mm8XzsPZmkk6DUDtJkn3Kk7WBK9WD8u MAsvkEubamagC5AAm8bAf20QB64x/yUElxryzuClKgTc7CMhBihY81dMA8iQYMrAhcs6 kxEEsyA0+6acmg7WYLi8cB1ZY2LR/uEp4zXNy5f8ItxvenZO+mDlo+6MIfXP07PDibMm zbt+5Y1cmauCMHDdMIgk4MwGMlKnqZaDMrCmV2brmzKaDPW+9NjxbCjUrpmwi5X3ADKJ 6ehQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=XarZaJ3KkG8SsnMnu7piCck82AN5Rj46htO1/BM8C9Q=; b=aM9OTrboFdil7SaI59PPvN2w35Wff922572Q0oqGm1i5GStr8R8gEabAg2E0iR/fec vY4O+KsTXbBlor4sT/JsAufhX2AKoekEhnORq6DUbNOSnZwPOj+fhl/K+PvQQeIex1T5 ApYuVQhiOz7n8pjhNNpNe2cIY8Z5lBJqKEbQPXQCWqajByvHUJE8wdWkPM0hmMUdtEG0 k81L+VgVBefD0CdKkhzFt+wqnOYQjcuS0OMdQJQ/lumMiPQZF52Mx1on6xxM1dBVv54V qhv7CIPLd+e+LBkryVJRJ/cw2AjqXnufW7063gvNaztVZZaLuOJ9nADK3HklO4k0UYiO y8mQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m17si2517590ili.123.2021.06.18.06.12.31; Fri, 18 Jun 2021 06:12:45 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233551AbhFRM7S (ORCPT + 99 others); Fri, 18 Jun 2021 08:59:18 -0400 Received: from inva020.nxp.com ([92.121.34.13]:39184 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229782AbhFRM7S (ORCPT ); Fri, 18 Jun 2021 08:59:18 -0400 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 140BF1A0CF8; Fri, 18 Jun 2021 14:57:07 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id D87C01A20D8; Fri, 18 Jun 2021 14:57:02 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 7A3FB402B6; Fri, 18 Jun 2021 20:56:57 +0800 (+08) From: Shengjiu Wang To: timur@kernel.org, nicoleotsuka@gmail.com, Xiubo.Lee@gmail.com, festevam@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, alsa-devel@alsa-project.org Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] ASoC: fsl_xcvr: disable all interrupts when suspend happens Date: Fri, 18 Jun 2021 20:38:33 +0800 Message-Id: <1624019913-3380-1-git-send-email-shengjiu.wang@nxp.com> X-Mailer: git-send-email 2.7.4 X-Virus-Scanned: ClamAV using ClamSMTP Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- changes in v2: - Add Fixes tag - Add comments for the change sound/soc/fsl/fsl_xcvr.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sound/soc/fsl/fsl_xcvr.c b/sound/soc/fsl/fsl_xcvr.c index df7c189d97dd..92dd99258edf 100644 --- a/sound/soc/fsl/fsl_xcvr.c +++ b/sound/soc/fsl/fsl_xcvr.c @@ -1233,6 +1233,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, -- 2.27.0