From: Alan Stern <stern@rowland.harvard.edu>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: Takashi Iwai <tiwai@suse.de>, Laura Abbott <labbott@redhat.com>,
Laura Abbott <labbott@fedoraproject.org>,
"Gustavo F. Padovan" <gustavo@padovan.org>,
Johan Hedberg <johan.hedberg@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
"bluez mailin list (linux-bluetooth@vger.kernel.org)"
<linux-bluetooth@vger.kernel.org>,
netdev <netdev@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Ming Lei <ming.lei@canonical.com>,
"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
<linux-usb@vger.kernel.org>
Subject: Re: [RESEND][PATCH] Bluetooth: Make request workqueue freezable
Date: Tue, 19 May 2015 13:17:57 -0400 (EDT) [thread overview]
Message-ID: <Pine.LNX.4.44L0.1505191314290.1453-100000@iolanthe.rowland.org> (raw)
In-Reply-To: <E00D9D09-50A7-46C8-B141-9338F85B0020@holtmann.org>
On Tue, 19 May 2015, Marcel Holtmann wrote:
> Hi Alan,
>
> >>>> 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.
>
> the btusb.ko driver has suspend/resume support. Are you saying we
> also need reset_resume support?
I don't know; I'm not familiar enough with how Bluetooth works. If the
device loses power and requires its firmware to be loaded again, then a
reset_resume would end up doing much the same thing as probe anyway.
So implementing reset_resume might not make much difference.
> >>>> 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.
>
> For modules this will be hard. Since you need userspace before being
> able to load the modules. If built-in code, then in theory this might
> be possible. Depending on the order of the init sections.
Yes, I meant built-in.
> >>>> 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.
>
> Then I really have no idea on how to solve this unless we silence the
> warning from request_firmware. From a driver perspective we go back
> trough probe(). So the driver has to treat this as a new device.
Oliver's suggestion to keep the firmware in memory may be the only
reasonable solution.
Alan Stern
next prev parent reply other threads:[~2015-05-19 17:18 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-12 0:52 [RESEND][PATCH] Bluetooth: Make request workqueue freezable Laura Abbott
2015-05-12 1:07 ` Marcel Holtmann
2015-05-12 1:46 ` Laura Abbott
2015-05-12 15:14 ` Marcel Holtmann
2015-05-13 1:18 ` Laura Abbott
2015-05-19 9:46 ` Takashi Iwai
2015-05-19 14:26 ` Alan Stern
2015-05-19 14:52 ` Oliver Neukum
2015-05-19 15:22 ` Marcel Holtmann
2015-05-19 17:17 ` Alan Stern [this message]
2015-05-19 17:13 ` Takashi Iwai
2015-05-19 17:42 ` Oliver Neukum
2015-05-20 6:29 ` Takashi Iwai
2015-05-20 8:40 ` Oliver Neukum
2015-05-20 9:46 ` Marcel Holtmann
2015-05-20 12:44 ` Takashi Iwai
2015-05-20 23:42 ` Laura Abbott
2015-05-21 4:21 ` Takashi Iwai
2015-05-21 12:07 ` Marcel Holtmann
2015-05-21 12:36 ` Takashi Iwai
2015-05-21 14:18 ` Alan Stern
2015-05-21 14:39 ` Marcel Holtmann
2015-05-21 15:26 ` Alan Stern
2015-05-21 15:35 ` Takashi Iwai
2015-05-21 17:27 ` Arend van Spriel
2015-05-21 17:32 ` Takashi Iwai
2015-05-21 20:46 ` Arend van Spriel
2015-05-22 11:30 ` Oliver Neukum
2015-05-21 17:37 ` Alan Stern
2015-05-21 18:11 ` Takashi Iwai
2015-05-21 18:17 ` Laura Abbott
2015-05-22 0:21 ` Laura Abbott
2015-05-22 3:13 ` Marcel Holtmann
2015-05-28 0:47 ` Laura Abbott
2015-06-02 1:14 ` [PATCH 1/2] Bluetooth: Add reset_resume function Laura Abbott
2015-06-02 1:28 ` Marcel Holtmann
2015-06-02 14:17 ` Josh Boyer
2015-06-02 15:07 ` Marcel Holtmann
2015-06-02 7:47 ` Oliver Neukum
2015-06-02 1:14 ` [PATCH 2/2] Bluetooth: btusb: " Laura Abbott
2015-06-02 1:32 ` Marcel Holtmann
2015-05-22 7:37 ` [RESEND][PATCH] Bluetooth: Make request workqueue freezable Arend van Spriel
2015-05-22 7:41 ` Arend van Spriel
2015-05-21 15:04 ` Takashi Iwai
2015-05-20 10:02 ` Ming Lei
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.44L0.1505191314290.1453-100000@iolanthe.rowland.org \
--to=stern@rowland.harvard.edu \
--cc=davem@davemloft.net \
--cc=gustavo@padovan.org \
--cc=johan.hedberg@gmail.com \
--cc=labbott@fedoraproject.org \
--cc=labbott@redhat.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=marcel@holtmann.org \
--cc=ming.lei@canonical.com \
--cc=netdev@vger.kernel.org \
--cc=rafael.j.wysocki@intel.com \
--cc=tiwai@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).