Return-path: Received: from netrider.rowland.org ([192.131.102.5]:41821 "HELO netrider.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1750883Ab2AAQRx (ORCPT ); Sun, 1 Jan 2012 11:17:53 -0500 Date: Sun, 1 Jan 2012 11:17:52 -0500 (EST) From: Alan Stern To: Oliver Neukum cc: Matthew Garrett , Linus Torvalds , Dave Jones , Linux Kernel , Larry Finger , Chaoming Li , "John W. Linville" , Greg Kroah-Hartman , USB list , Linux Wireless List Subject: Re: loading firmware while usermodehelper disabled. In-Reply-To: <201201011322.34483.oliver@neukum.org> Message-ID: (sfid-20120101_171834_487894_79ED7848) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-wireless-owner@vger.kernel.org List-ID: On Sun, 1 Jan 2012, Oliver Neukum wrote: > Am Sonntag, 1. Januar 2012, 03:21:45 schrieb Alan Stern: > > On Sat, 31 Dec 2011, Oliver Neukum wrote: > > > > We are definitely going through do_unbind_rebind(). But I don't think > > > it matters why we got there. We seem to be calling probe() too early. > > > And we need to guarantee that a driver can request firmware in probe() > > > > > > So something has changed in the resume code path further up. > > > > For at least a year and a half, it has been true that rebinding takes > > Yes, so I don't understand why we haven't been hitting this issue > all that time. Perhaps if Matthew compared logs from an old and a new system with appropriate debugging options configured, something might show up. > > place during the complete phase of system resume. Clearly that is too > > early to load firmware. When do you think we should do it instead? > > I think we ought to delay until right after user space is unfrozen. > The devices are gone anyway, so we lose nothing but have the ability > to call helpers. That's true. But doing it will be a nuisance. The nice thing about the current situation is that the driver core automatically iterates over all interfaces. > > And how should we keep track of which interfaces need rebinding? > > I guess this calls for a brute force approach. We can kick khubd and have > it walk all busses checking for needs_binding. Ugh. At a minimum, let's use a different process, not khubd. As Linus pointed out, the real problem here is the firmware loader. The way it is now, a driver can't always depend on the data being available, even during a normal boot. It ought to use an asynchronous approach; then none of these problems would arise. Alan Stern