From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.6 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9D771C43387 for ; Mon, 7 Jan 2019 13:13:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 61BC42089F for ; Mon, 7 Jan 2019 13:13:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1546866814; bh=KgbrA1LMCSh7xo1mRWV8KkE3zkWqG6GKmEkIZ/IW/C0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=1qci6o4Kwmhv3zoFhkDMd0y4bDUo5Xb0J/01WWXvuAGPjATOXH1rpBgzoKioKvPl6 0ype2yvARqD+7Ub2VSoSEKu5ctjCgFs/8T+MHYRmzwfAuSauLCE9NLb5049ltdWbys qdOfv59F0JjsVWaX/CHW8qvkHyM5JbqrDXAEeYuA= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731049AbfAGNDi (ORCPT ); Mon, 7 Jan 2019 08:03:38 -0500 Received: from mail.kernel.org ([198.145.29.99]:51106 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731045AbfAGNDi (ORCPT ); Mon, 7 Jan 2019 08:03:38 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.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 53007217D4; Mon, 7 Jan 2019 13:03:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1546866217; bh=KgbrA1LMCSh7xo1mRWV8KkE3zkWqG6GKmEkIZ/IW/C0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eOh1W7t+k/zkehSr+sPJXI1kcc5StXaIbjmQify2GD4JF0hxTvIPntKDuSjNxkt4l hLLZ+YwxcWHT8nBUrICiYySn+G4ogj1Eym2vHdm0sAczpjuxoCkBYPI9g5FHIPmKeT dEWiWsLAzRnYJgI7YuP1kp+9bFr2MjbrtNX1g3pM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mohan Kumar , Dara Ramesh , Sameer Pujar , Takashi Iwai Subject: [PATCH 4.14 048/101] ALSA: hda/tegra: clear pending irq handlers Date: Mon, 7 Jan 2019 13:32:36 +0100 Message-Id: <20190107105335.546076816@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190107105330.372621917@linuxfoundation.org> References: <20190107105330.372621917@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Sameer Pujar commit 63d2a9ec310d8bcc955574220d4631aa55c1a80c upstream. Even after disabling interrupts on the module, it could be possible that irq handlers are still running. System hang is seen during suspend path. It was found that, there were pending writes on the HDA bus and clock was disabled by that time. Above mentioned issue is fixed by clearing any pending irq handlers before disabling clocks and returning from hda suspend. Suggested-by: Mohan Kumar Suggested-by: Dara Ramesh Signed-off-by: Sameer Pujar Cc: Signed-off-by: Takashi Iwai Signed-off-by: Greg Kroah-Hartman --- sound/pci/hda/hda_tegra.c | 2 ++ 1 file changed, 2 insertions(+) --- a/sound/pci/hda/hda_tegra.c +++ b/sound/pci/hda/hda_tegra.c @@ -249,10 +249,12 @@ static int hda_tegra_suspend(struct devi struct snd_card *card = dev_get_drvdata(dev); struct azx *chip = card->private_data; struct hda_tegra *hda = container_of(chip, struct hda_tegra, chip); + struct hdac_bus *bus = azx_bus(chip); snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); azx_stop_chip(chip); + synchronize_irq(bus->irq); azx_enter_link_reset(chip); hda_tegra_disable_clocks(hda);