Re: btusb "firmware request while host is not available" at resume

From: Luis R. Rodriguez
Date: Tue Oct 03 2017 - 21:21:44 EST


On Tue, Oct 3, 2017 at 5:20 PM, Luis R. Rodriguez <mcgrof@xxxxxxxxxx> wrote:
> the ordering devised currently there is:
>
> o device driver pm ops called
> o notifier for suspend issued - *going to suspend*
> o userspace frozen
> o filesystem freeze
>
> On the way back up this order is inverted:
>
> o filesystem freeze
> o userspace frozen
> o notifier for suspend issued - *going to suspend*
> o device driver pm ops called

Fortunately I had it a tad bit wrong, but in a good way. Our ordering
on our way down is:

o notifier for suspend issued - *going to suspend*
o userspace frozen
o filesystem freeze (new, being proposed)
o device driver pm ops called

Then on our way up:

o device driver pm ops called
o filesystem thaw
o userspace thaw
o notifier for resume issued - *thawing*

So the driver callbacks get called *later*, so anything called in
notifiers do get a chance to quiesce things properly.

Luis