Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753169AbdFUQmY convert rfc822-to-8bit (ORCPT ); Wed, 21 Jun 2017 12:42:24 -0400 Received: from mail.fireflyinternet.com ([109.228.58.192]:52146 "EHLO fireflyinternet.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751795AbdFUQmX (ORCPT ); Wed, 21 Jun 2017 12:42:23 -0400 X-Default-Received-SPF: pass (skip=forwardok (res=PASS)) x-ip-name=78.156.65.138; Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8BIT To: Daniel Vetter , "Intel Graphics Development" From: Chris Wilson In-Reply-To: <1498057734-14622-1-git-send-email-daniel.vetter@ffwll.ch> Cc: "Daniel Vetter" , "Jaroslav Kysela" , "Takashi Iwai" , "Guneshwor Singh" , "Hardik T Shah" , "Julia Lawall" , "Vinod Koul" , "Subhransu S. Prusty" , "Libin Yang" , linux-kernel@vger.kernel.org References: <1498057734-14622-1-git-send-email-daniel.vetter@ffwll.ch> Message-ID: <149805863799.15021.15278760577807511996@mail.alporthouse.com> User-Agent: alot/0.3.6 Subject: Re: [PATCH] BUG-REPORT: snd-hda: hacked-together EPROBE_DEFER support Date: Wed, 21 Jun 2017 16:23:57 +0100 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1528 Lines: 40 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. Thanks, -Chris