Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1365995pxj; Fri, 18 Jun 2021 05:45:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyJJwp6Paycnd1X2pAqHYtu+MDiad6SRr0iRa9VsthXXFG4G6Eu3Ejc8gCG5tl/cNIoCnyU X-Received: by 2002:aa7:de1a:: with SMTP id h26mr4670998edv.176.1624020322889; Fri, 18 Jun 2021 05:45:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624020322; cv=none; d=google.com; s=arc-20160816; b=RC6MXSZfa+Nu8u9hhCcA91hIylaL2wnjbZKrh7Ot3J0iIIkkAqAIns5wiWT69RE2pf o3KORjh9ux4deQt0Q2A1AII9teNiepOVl30T0aK2wiFrOoDJ4Dz90Ni8dt602hMk4V3/ LD5aVJ/O2stPkUg07yMdMuPTLm5MpOGgJY/oiCOhPfGjQkUkqO3aArY64qV++gdCTIgr snIC3wQmEJk4E82/uya69pmvKQ0N/8TjodcgVDfNgo1T7Fs4nUjU9vGK+SW1wbE2QU4f rQ7Ew38MiYzlsi9fC4ykleX6QbZYaNXoTipZIs+d+r5WKvPPwKuRGwQc1iXjhb6ZSmKP UgLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=Ci4ihwZuSGYUz/uI1CC0IKXaTwpsvEkfIF44obOzcVo=; b=Zssito04zinUOMMTJocHuhOQ/55C5EJAkIszk4AN3Rb90RO5kezMtZ2y2XRxh670Uz +mrIeUvkaKQ6YcbZadTDEj0KbsTv3NBVrAPjbno5vNc5d4Aba4Uj/BqGF63aMplZI+dl rlmiQU/Ta3VceZjpe6zx9dYu70pgtr97ACfFL1k/bwDRgp8MfYPYt2pt4ShVFYAuAxeT CR3TOPX8KvM5yluIOChiux5M6lplHw9JMoU8oDpmZEqWt3oneCub0LXvYFgniE3t6MlX Sxfo213/66JNMLEnD/po/d99QkPziETYc1NCApi5XzmCfBNVkVbeInXUDco/rXkcAS+C D8Eg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ChROJdee; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r2si2330287ejp.248.2021.06.18.05.45.00; Fri, 18 Jun 2021 05:45:22 -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=@gmail.com header.s=20161025 header.b=ChROJdee; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233162AbhFRLcr (ORCPT + 99 others); Fri, 18 Jun 2021 07:32:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33086 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232090AbhFRLcp (ORCPT ); Fri, 18 Jun 2021 07:32:45 -0400 Received: from mail-qv1-xf29.google.com (mail-qv1-xf29.google.com [IPv6:2607:f8b0:4864:20::f29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CCA7AC061574 for ; Fri, 18 Jun 2021 04:30:36 -0700 (PDT) Received: by mail-qv1-xf29.google.com with SMTP id r19so3346380qvw.5 for ; Fri, 18 Jun 2021 04:30:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Ci4ihwZuSGYUz/uI1CC0IKXaTwpsvEkfIF44obOzcVo=; b=ChROJdeeybN0A0GyVkUZ00DaA0/sv6VhnbBXNK5g+iSZ80gDcQcWfnGzAg4JZ0MVq6 liR6c2q0zDZH/VmK0Jf73O2BFdCmlWAem8bKGNKceXlXhxkBsdiVv4gXoGG3Dr6nYIb6 Cp/xouNPB//YGH+e+nqXTO1NY7BF9X6W1uQKwP/GabccnUbgUAX1LtkAySQudBsfap1B Hb1wV/CrH+QDRAZe4LUvZdbDQfn++afNzGEkhE7PZxNYIXOWmn6geLdRiQx1HPQWl1G1 8ltVdJKhKXCHLEx2zElEI/Awa1OT68GUYJYpBOZ0LRGZ0OTwzg5c2Bi7iN6s8VDyP4+C ys2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Ci4ihwZuSGYUz/uI1CC0IKXaTwpsvEkfIF44obOzcVo=; b=Lx7IP7uHbtouzdFjFle/80Uo6kYOG6TNKBWybzffQLVL2pbgmFqnrolURC+y3wQoWu SwwSUCzFDJHw44kiUD7cu2KOIMutQBHQsFMc4r3GjkC6btpv1V0CW9+lQTNKaclwmr7H WLhw+798Kt7hxFWJAGRjGJ9VoK/d2Y5vNe7Uv6+5NBcOYxOvgcTtEnZvp1nOx0jpqaq8 sloy60a2EaDffye/6EqrJjXjBtlfFO26BRlxZX8yJ/eZ8M6ND2L2eM7kZcgY792+fi82 zHuHYKuG6j0ByxKVBppYXXj/UXyZYfxTshPudQ9xxypOeL7GV571gXiImgiQFsIGcI+C WW8w== X-Gm-Message-State: AOAM530sJqToTHGSGAno8CQjofYveh93GvU1ajzTHkzP7S7rTfX7KD6v N8QU/OHzOQhofuQGFEv70ALBoyFqvq4hWprF+Q8= X-Received: by 2002:ad4:576c:: with SMTP id r12mr5209117qvx.28.1624015836116; Fri, 18 Jun 2021 04:30:36 -0700 (PDT) MIME-Version: 1.0 References: <1624009876-3076-1-git-send-email-shengjiu.wang@nxp.com> In-Reply-To: From: Shengjiu Wang Date: Fri, 18 Jun 2021 19:30:25 +0800 Message-ID: Subject: Re: [PATCH] ASoC: fsl_xcvr: disable all interrupts when suspend happens To: Fabio Estevam Cc: Shengjiu Wang , Linux-ALSA , Timur Tabi , Xiubo Li , linux-kernel , Takashi Iwai , Nicolin Chen , Mark Brown , linuxppc-dev Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Fabio On Fri, Jun 18, 2021 at 7:21 PM Fabio Estevam wrote: > > Hi Shengjiu, > > On Fri, Jun 18, 2021 at 7:10 AM Shengjiu Wang wrote: > > > > 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. > > Fixe tag? ok, I will add it. > > > + 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); > > + > > The operations in _suspend() are usually balanced with the ones in _resume(). > > Shouldn't you enable the interrupts in resume() then? No, as you said below, the interrupts are enabled in fsl_xcvr_prepare(). so this change should not block anything. > > I see that the interrupts are currently enabled inside fsl_xcvr_prepare().