Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1316331yba; Tue, 2 Apr 2019 06:45:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqx7em2IOdrgs2Kc0Csr0RvG1TSMtjE1Za+jRYJOUaBS2qOMD41STiGbH9OzAGnmMGtscuw0 X-Received: by 2002:a17:902:ba88:: with SMTP id k8mr68551807pls.268.1554212713844; Tue, 02 Apr 2019 06:45:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554212713; cv=none; d=google.com; s=arc-20160816; b=BtL/ArzM7/GqJQ0gjAxixrkzvBjlfbY8RnjWqduQyOEz9fYAmZBM1xyvfVIoZ6dmaB s6lzR0if3U/M2l6mOeutTFCHIrV0GvJPSCz3YyJW1K8zPmJoFTQtPG+uPCenGvkxnvWL IAFYxmrM5FTvQ954mLbzyTRmtULaShOuedpu4p6OrxChAs/+h+S03NsNrUjsVbsPMA62 qLdRQn3aHmEpzWyabH9MPJSL9qtP2XPYkX/aAC6uf2rKCKna1cS44zYCNqnv9WNUZjXA C1xReL3YQpKo19jzie+v858TbYlV+/7d6p31nHkwhRx4VQB/iMlIPouZkFPu002cY/5U d8RQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition; bh=TFKaHb8BTFUVh9jcNgp4J4lMI8Z/l/3iWPLcEh9SAAg=; b=Tjct51MuUDUhiwbMtQAZtkMBNFBvzjvQb+4gzZ+OMMo6Q131TeuW1yvkDX/r2Ur32d e47qQFGuncAeSXvis7IkGc/Hm/C6fUbN+cDIFl7gU/V4vhPdjlOystlL494oga2SWCGu bpXUWUCD5dH4ExhuIjvvMc0fm8xYGCuxynPKJfnvphOL6M+h4WDsQOLSnSIzXgT5T2vB aKHh3nelMDF74AHhXbt69dXpGLLZYuo4gAfaGGr8ODygBnzWqIJX9Ghkn1IQlTuz0X4o eSJrdJVASSv+wYMxp5vNAm9oKswTTT6yU3oBk29ZXtCCgx1Qh85q5LWSv7NdJbggxc+9 HoHw== ARC-Authentication-Results: i=1; mx.google.com; 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 d21si1758801pll.437.2019.04.02.06.44.58; Tue, 02 Apr 2019 06:45:13 -0700 (PDT) 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; 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 S1731983AbfDBNnt (ORCPT + 99 others); Tue, 2 Apr 2019 09:43:49 -0400 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:43562 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731500AbfDBNkK (ORCPT ); Tue, 2 Apr 2019 09:40:10 -0400 Received: from [167.98.27.226] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hBJe3-0002oY-Ng; Tue, 02 Apr 2019 14:40:07 +0100 Received: from ben by deadeye with local (Exim 4.92) (envelope-from ) id 1hBJdy-0004y7-5h; Tue, 02 Apr 2019 14:40:02 +0100 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, Denis Kirjanov , "Dara Ramesh" , "Sameer Pujar" , "Takashi Iwai" , "Mohan Kumar" Date: Tue, 02 Apr 2019 14:38:28 +0100 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) X-Patchwork-Hint: ignore Subject: [PATCH 3.16 95/99] ALSA: hda/tegra: clear pending irq handlers In-Reply-To: X-SA-Exim-Connect-IP: 167.98.27.226 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.65-rc1 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 Signed-off-by: Takashi Iwai [bwh: Backported to 3.16: adjust context] Signed-off-by: Ben Hutchings --- 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 @@ -253,6 +253,7 @@ static int hda_tegra_suspend(struct devi struct azx *chip = card->private_data; struct azx_pcm *p; 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); list_for_each_entry(p, &chip->pcm_list, list) @@ -261,6 +262,7 @@ static int hda_tegra_suspend(struct devi snd_hda_suspend(chip->bus); azx_stop_chip(chip); + synchronize_irq(bus->irq); azx_enter_link_reset(chip); hda_tegra_disable_clocks(hda);