Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753030AbdFUQnu (ORCPT ); Wed, 21 Jun 2017 12:43:50 -0400 Received: from mx2.suse.de ([195.135.220.15]:55078 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751069AbdFUQnt (ORCPT ); Wed, 21 Jun 2017 12:43:49 -0400 Date: Wed, 21 Jun 2017 17:30:10 +0200 Message-ID: From: Takashi Iwai To: "Chris Wilson" Cc: "Intel Graphics Development" , "Daniel Vetter" , "Guneshwor Singh" , "Hardik T Shah" , "Libin Yang" , "Subhransu S. Prusty" , "Vinod Koul" , "Julia Lawall" , "Jaroslav Kysela" , , Subject: Re: [PATCH] BUG-REPORT: snd-hda: hacked-together EPROBE_DEFER support In-Reply-To: <149805863799.15021.15278760577807511996@mail.alporthouse.com> References: <1498057734-14622-1-git-send-email-daniel.vetter@ffwll.ch> <149805863799.15021.15278760577807511996@mail.alporthouse.com> 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/25.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 Content-Length: 1848 Lines: 50 On Wed, 21 Jun 2017 17:23:57 +0200, Chris Wilson wrote: > > Quoting Daniel Vetter (2017-06-21 16:08:54) > > So back when the i915 power well support landed in > > > > commit 99a2008d0b32d72dfc2a54e7be1eb698dd2e3bd6 > > Author: Wang Xingchao > > Date: Thu May 30 22:07:10 2013 +0800 > > > > ALSA: hda - Add power-welll support for haswell HDA > > > > the logic to handle the cross-module depencies was hand-rolled using a > > async work item, and that just doesn't work. > > > > The correct way to handle cross-module deps is either: > > - request_module + failing when the other module isn't there > > > > OR > > > > - failing the module load with EPROBE_DEFER. > > > > You can't mix them, if you do then the entire load path just > > busy-spins blowing through cpu cycles forever with no way to stop > > this. > > > > snd-hda-intel does mix it, because the hda codec drivers are loaded > > using request_module, but the i915 depency is handled using > > PROBE_DEFER (or well, should be, but I haven't found any code at all). > > This is a major pain when trying to debug i915 load failures. > > > > This patch here is a horrible hackish attempt at somewhat correctly > > wriing EPROBE_DEFER through. Stuff that's missing: > > - Check all the other places where load errors are conveniently > > dropped on the floor. > > - Also fix up the firmware_cb path. > > - Drop the debug noise I've left in to make it clear this isn't > > anything for merging. > > This tames "hdaudio hdaudioC0D0: Unable to bind the codec" which was > continuously spewing previously, and now the system is usable again. Could you give a failing scenario? I'm not opposing to the suggested solution, we need to fix the mess in anyway, but I just would like to know how to trigger the problem easily. thanks, Takashi