From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932231Ab2LRQPJ (ORCPT ); Tue, 18 Dec 2012 11:15:09 -0500 Received: from cantor2.suse.de ([195.135.220.15]:50957 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932093Ab2LRQPH (ORCPT ); Tue, 18 Dec 2012 11:15:07 -0500 Date: Tue, 18 Dec 2012 17:15:06 +0100 Message-ID: From: Takashi Iwai To: Daniel J Blueman Cc: Linux Kernel Subject: Re: [PATCH] HDA: Fix sound resume hang In-Reply-To: <1355846373-3057-1-git-send-email-daniel@quora.org> References: <1355846373-3057-1-git-send-email-daniel@quora.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/24.2 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org At Tue, 18 Dec 2012 23:59:33 +0800, Daniel J Blueman wrote: > > Resuming a switcheroo'd HDA controller hangs since the completion > is one-shot (thus works the first time). Fix by using completions > that explictly need rearming, so remain fired before. > > Signed-off-by: Daniel J Blueman Oops, sorry, this was a forgotten scenario. This isn't a perfect fix but easy enough and would work practically, so I applied it now. Thanks. Takashi > --- > sound/pci/hda/hda_intel.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c > index 22ecadc..e12b939 100644 > --- a/sound/pci/hda/hda_intel.c > +++ b/sound/pci/hda/hda_intel.c > @@ -2856,7 +2856,7 @@ static int azx_free(struct azx *chip) > azx_notifier_unregister(chip); > > chip->init_failed = 1; /* to be sure */ > - complete(&chip->probe_wait); > + complete_all(&chip->probe_wait); > > if (use_vga_switcheroo(chip)) { > if (chip->disabled && chip->bus) > @@ -3482,7 +3482,7 @@ static int __devinit azx_probe(struct pci_dev *pci, > pm_runtime_put_noidle(&pci->dev); > > dev++; > - complete(&chip->probe_wait); > + complete_all(&chip->probe_wait); > return 0; > > out_free: > -- > 1.7.10.4 >