From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752577Ab2GZC3r (ORCPT ); Wed, 25 Jul 2012 22:29:47 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:32781 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751924Ab2GZC3q (ORCPT ); Wed, 25 Jul 2012 22:29:46 -0400 MIME-Version: 1.0 In-Reply-To: References: <1343149213-10160-1-git-send-email-ming.lei@canonical.com> Date: Thu, 26 Jul 2012 10:29:43 +0800 Message-ID: Subject: Re: [RFC PATCH 00/13] firmware loader: introduce cache/uncache firmware From: Ming Lei To: Linus Torvalds Cc: Greg Kroah-Hartman , "Rafael J. Wysocki" , Borislav Petkov , linux-kernel@vger.kernel.org, Matthew Garrett , linux-usb , Alan Stern , Oliver Neukum Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 26, 2012 at 1:23 AM, Linus Torvalds wrote: > > So *if* the only problem wrt the USB hub code comes from this area, IMO, USB hub code may not be the only one because both device_add and device_del can just be run in process context, so any hotplug bus may have this kind of problem since the devices in the bus may be unplugged and plugged again during suspend or experience power loss , then the bus driver may take similar handling policy as USB. > then I think the solution might be as simple as just moving the > "usermodehelper_enable()" up a few lines, with a comment. Something > like the *untested* and whitespace-damaged thing below.. > > Rafael? Who has one of those isight things and has seen the warning to test? I fake one USB device disconnect in reset_resume path and looks the patch is good: the device driver can request firmware successfully in its .probe(). > > Linus > > --- > diff --git a/kernel/power/process.c b/kernel/power/process.c > index 19db29f67558..5bf50e488196 100644 > --- a/kernel/power/process.c > +++ b/kernel/power/process.c > @@ -181,6 +181,12 @@ void thaw_processes(void) > pm_freezing = false; > pm_nosig_freezing = false; > > + /* > + * User mode helper are available again (or will be, > + * modulo scheduling) > + */ > + usermodehelper_enable(); This may wake up tasks earlier than before, not sure if it might have side effects. Thanks, -- Ming Lei