Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3500248imu; Mon, 7 Jan 2019 04:38:31 -0800 (PST) X-Google-Smtp-Source: ALg8bN5CJ4l8llwcJ6Wkesb3qkn7zA3+ajFPpMIaDIrTTzK5kZeyQz9ptwD6gJyeFMV+D8K1EG0R X-Received: by 2002:a17:902:8a91:: with SMTP id p17mr61149356plo.316.1546864711261; Mon, 07 Jan 2019 04:38:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546864711; cv=none; d=google.com; s=arc-20160816; b=RPCJY81LFllPmFD0JutfCUFQd5klyZeotQ0cM97mnV/JH56XTjPH4atdJ/DCYiyF78 uEuo3Kzc/OQlW0qi0iLkvYBKIqp2u7SnrBIgke5HeMr8lRAA5cy2ejWgBuFeJyr3qBxt iTiHNOn4+pF8n41xyQQcfjuDSgQgj5RyQNWKGxYcrS23+4XKxx7PPFX/sY9zj4WiFw9V xcXS6ch4DxBZMdDETFmY89wDg8T0RzWQZqF5tgFoK9qCw/cOhr/zlV+9Mj3hRjLEIzDQ F7MHLQnXWfcnQ96yy0KZD0wWmUSZPUCpliZvjt7mkLZ3o2+TGmBE6JJNa2OfbI6HfPBE NazA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=1ny9Z5G1J2u3ifwHlwLAYqpl+EchP5zFuf3TEEM6MIo=; b=Fm1bLLIbzkmmtY4rrSSd3xXg0LYGlo4U+vR/qWvYskr7XSlz07puyPbLWUZT++aPvj bhiOKOjPC3ukCqiTa6zB9Ei+0YB5JEGPR0XhbLy5bZyoJZZhdqaRy0vg5IMwtwTAcFZY fIgCVng8CWklCjr6jlTIZKdw1pVfq7hfk5jGbXNiobVB+Z29q5apWu0k8MS8+H4oMvWV Gu6dj5bXJVQSg4BlseVE4NeLkLUdbOj247TmVB244e3PKbzmxk7+43Z47CWZ0EdJg7Z3 VfvXnDJTHGN7Ev2vB8N27I2vMjSK1cHiwyVDuITRoGuMeje+LHyJz0DM1jFIHNwYBd4P Dz7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=y1mUDGic; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bd3si60435537plb.286.2019.01.07.04.38.15; Mon, 07 Jan 2019 04:38:31 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=y1mUDGic; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727494AbfAGMfS (ORCPT + 99 others); Mon, 7 Jan 2019 07:35:18 -0500 Received: from mail.kernel.org ([198.145.29.99]:48786 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727483AbfAGMfQ (ORCPT ); Mon, 7 Jan 2019 07:35:16 -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 EA81F206BB; Mon, 7 Jan 2019 12:35:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1546864515; bh=FTvbUirvDsDIz2hvqX6aZinOBj+wJrWfwj+zW384bG0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=y1mUDGicrgXU6I3EQsrvbBchj1q3V76K5WmPimUXYmCGTsmO2LFPfkzr01Dj1wy0g SHWSi4ohTf+Bo1sD2KYH+SKMfUd9dTflgcPPnDIPUmGvW0JalLNHIyzKOUf869Uf3g g8/c/hzQSQ4VIzlNG3x5Vumxhg4pqmoRBTlM5ANU= 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.20 037/145] ALSA: hda/tegra: clear pending irq handlers Date: Mon, 7 Jan 2019 13:31:14 +0100 Message-Id: <20190107104442.167120233@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190107104437.308206189@linuxfoundation.org> References: <20190107104437.308206189@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: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.20-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 @@ -233,10 +233,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);