Return-path: Received: from netrider.rowland.org ([192.131.102.5]:54528 "HELO netrider.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1750934Ab2AACVq (ORCPT ); Sat, 31 Dec 2011 21:21:46 -0500 Date: Sat, 31 Dec 2011 21:21:45 -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: <201112311659.48427.oliver@neukum.org> Message-ID: (sfid-20120101_032222_802107_E492E78C) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-wireless-owner@vger.kernel.org List-ID: On Sat, 31 Dec 2011, Oliver Neukum wrote: > Am Samstag, 31. Dezember 2011, 16:33:12 schrieb Alan Stern: > > > Nothing has changed in the USB layer -- it has always been true that > > devices could be reset during a suspend/resume cycle. This isn't a > > matter of how the stack is written or anything like that; some > > motherboards simply do not provide suspend power to their USB > > controllers. Or the firmware reinitializes the controllers and > > attached devices during resume, forcing Linux's USB core to reset > > every device on the affected buses. > > > > When it comes to suspend/resume, there are almost no guarantees. :-( > > 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 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? And how should we keep track of which interfaces need rebinding? Alan Stern P.S.: Oliver, it looks like there's a bunch of dead code in usb_suspend_interface() and usb_resume_interface(). I don't see how either one can be executed with a driver that doesn't have both suspend and resume methods. Such cases should be filtered out when usb_suspend() calls do_unbind_rebind(). The only odd thing that can happen is when a driver doesn't support reset-resume. Do you agree?