From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964997AbbESO0t (ORCPT ); Tue, 19 May 2015 10:26:49 -0400 Received: from iolanthe.rowland.org ([192.131.102.54]:39214 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S932646AbbESO0r (ORCPT ); Tue, 19 May 2015 10:26:47 -0400 Date: Tue, 19 May 2015 10:26:46 -0400 (EDT) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: Takashi Iwai cc: Laura Abbott , Marcel Holtmann , Laura Abbott , "Gustavo F. Padovan" , Johan Hedberg , "David S. Miller" , "bluez mailin list (linux-bluetooth@vger.kernel.org)" , netdev , Linux Kernel Mailing List , Ming Lei , "Rafael J. Wysocki" , Subject: Re: [RESEND][PATCH] Bluetooth: Make request workqueue freezable In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 19 May 2015, Takashi Iwai wrote: > > > I am not convinced. Now we are hacking the Bluetooth core layer > > > (which has nothing to do with the drivers suspend/resume or > > > probe) to do something different so that we do not see this > > > warning. > > > > > > I can not do anything about the platform in question choosing a > > > unplug/replug for suspend/resume instead of having a proper USB > > > suspend and resume handling. That is pretty much out of our > > > control. Actually one can do something about this. I mean, one _can_ implement proper USB suspend and resume handling in the Bluetooth driver. At this point the details aren't clear to me, but perhaps if the driver in question had a reset_resume callback then it might work better. > > > I would rather have the USB subsystem delay the probe() > > > callback if we tell it to. This is possible. I am not sure it would be the right thing to do, though. What happens if the probe routine gets called early on during the boot-up procedure, before userspace is up and running? The same thing should happen here. > > > Of just have request_firmware() > > > actually sleep until userspace is ready. Seriously, why is > > > request_firmware not just sleeping for us. It won't work. The request_firmware call is part of the probe sequence, which in turn is part of the resume sequence. Userspace doesn't start running again until the resume sequence is finished. If request_firmware waited for userspace, it would hang. Alan Stern