From patchwork Wed Dec 26 10:34:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sameer Pujar X-Patchwork-Id: 10742961 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E95D46C2 for ; Wed, 26 Dec 2018 10:35:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CA76428900 for ; Wed, 26 Dec 2018 10:35:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BD7AE28906; Wed, 26 Dec 2018 10:35:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BEC5228900 for ; Wed, 26 Dec 2018 10:35:08 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 1DC89267A78; Wed, 26 Dec 2018 11:35:06 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 62C7A267AEE; Wed, 26 Dec 2018 11:35:02 +0100 (CET) Received: from hqemgate14.nvidia.com (hqemgate14.nvidia.com [216.228.121.143]) by alsa0.perex.cz (Postfix) with ESMTP id 92C032679EF for ; Wed, 26 Dec 2018 11:34:57 +0100 (CET) Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqemgate14.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Wed, 26 Dec 2018 02:34:48 -0800 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Wed, 26 Dec 2018 02:34:56 -0800 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Wed, 26 Dec 2018 02:34:56 -0800 Received: from HQMAIL105.nvidia.com (172.20.187.12) by HQMAIL104.nvidia.com (172.18.146.11) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Wed, 26 Dec 2018 10:34:55 +0000 Received: from hqnvemgw01.nvidia.com (172.20.150.20) by HQMAIL105.nvidia.com (172.20.187.12) with Microsoft SMTP Server (TLS) id 15.0.1395.4 via Frontend Transport; Wed, 26 Dec 2018 10:34:55 +0000 Received: from linux.nvidia.com (Not Verified[10.24.34.185]) by hqnvemgw01.nvidia.com with Trustwave SEG (v7, 5, 8, 10121) id ; Wed, 26 Dec 2018 02:34:54 -0800 From: Sameer Pujar To: , , Date: Wed, 26 Dec 2018 16:04:49 +0530 Message-ID: <1545820489-13292-1-git-send-email-spujar@nvidia.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1545820488; bh=NaCIl8U1MGN6E4PPDIp9gLIUpCVjI6O15sE79xQBMcM=; h=X-PGP-Universal:From:To:CC:Subject:Date:Message-ID:X-Mailer: MIME-Version:Content-Type; b=Uox+rtqkwiRgHheE9xKUejeHljtNTp/LuWwlkrFDzQUCOFBNd8j9FhJPmU6xHqcJp Uu5Wzv+Aij2dQHLqEiFSVqnHdSGhsLh7vjnD1T31smNtRCHBBuTqGhdYJEhO+W+Cwl M6tDX4eJ0gCO1YD20kibZVL8voX+/z4NGtnVPUhU6Gg7WiRNBzG+s1XaHOZnei4fPZ vcIeB6XGRtEkHXYB/tuKDlKQ72pf05WQCOuLOyoTIahWX39gbqADuK61bRKdFSWnzU EveANr5VUNxJVnTYMz/oY4Z2eJie209yl47YQOR5rBw35Uo97vR9uDSOos6oeaEUj6 3BIQLm44xa4AA== Cc: linux-tegra@vger.kernel.org, alsa-devel@alsa-project.org, Sameer Pujar Subject: [alsa-devel] [PATCH] ALSA: hda/tegra: clear pending irq handlers X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- sound/pci/hda/hda_tegra.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sound/pci/hda/hda_tegra.c b/sound/pci/hda/hda_tegra.c index 83befd8..97a176d 100644 --- a/sound/pci/hda/hda_tegra.c +++ b/sound/pci/hda/hda_tegra.c @@ -234,10 +234,12 @@ static int hda_tegra_suspend(struct device *dev) 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);