[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACVXFVP-A7M2dG9bOvAnpzR60=iTYSw=WCOEwgo9KeuioxKanQ@mail.gmail.com>
Date: Tue, 4 Sep 2012 23:52:15 +0800
From: Ming Lei <ming.lei@...onical.com>
To: Takashi Iwai <tiwai@...e.de>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Rafael J. Wysocki" <rjw@...k.pl>, Kay Sievers <kay@...y.org>,
linux-kernel@...r.kernel.org
Subject: Re: A workaround for request_firmware() stuck in module_init
On Tue, Sep 4, 2012 at 9:06 PM, Takashi Iwai <tiwai@...e.de> wrote:
> Hi,
>
> as I've got recently a few bug reports regarding the stuck with
> request_firmware() in module_init of some sound drivers, I started
> looking at the issue. Strangely, the problem doesn't happen on
> openSUSE 12.2 although it has the same udev version with libkmod as
> Fedora. So I installed Fedora 17, and indeed I could see a problem
> there.
It should be a bug in udev, as discussed in the below link:
http://marc.info/?t=134552745100002&r=1&w=2
>
> Obviously a solution would be to rewrite the driver code to use
> request_firmware_nowait() instead. But it'd need a lot of code
> shuffling, and most of such drivers are old stuff I don't want to do a
> serious surgery.
>
> So I tried an easier workaround by using the deferred probing.
> An experimental patch is below. As you can see, from the driver side,
> it's simple: just add two lines at the head of each probe function.
In fact, the defer probe should only be applied in situations which
driver is built in kernel and request_firmware is called in .probe().
>
> Do you think this kind of hack is OK? If not, any better (IOW easier)
> solution?
Looks your solution is a bit complicated, and I have wrote a similar
patch to address the problem, but Linus thought that it may hide the
problem of drivers.
http://marc.info/?t=134278790800004&r=1&w=2
IMO, driver core needn't to be changed, and the defer probe can be
supported just by changes in request_firmware() and its caller.
Thanks,
--
Ming Lei
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists