Re: [PATCH v2 0/2] USB: Quiesce interrupts across pm freeze

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Apr 20, 2022 at 10:47:27AM +0200, Oliver Neukum wrote:
> 
> 
> On 19.04.22 19:49, Alan Stern wrote:
> > On Tue, Apr 19, 2022 at 05:51:38PM +0200, Oliver Neukum wrote:
> >>
> >> On 19.04.22 16:35, Alan Stern wrote:
> >>> On Tue, Apr 19, 2022 at 09:05:53AM +0200, Oliver Neukum wrote:
> >>>
> >>>
> >>> The THAW part of suspend-to-hibernation is used only for writing the 
> >>> memory image to permanent storage.  I doubt that a malfunctioning HID 
> >>> device would interfere with this process.
> >>>
> >> True, if and only if all goes well. At the time thaw() has run writing
> >> the image to disk can still fail. In that case the devices will still
> >> be needed.
> > Consider adding a mechanism to usbcore which would allow an interface 
> > driver to request that the next time its device is resumed, the core 
> > should perform a reset-resume.  Would that help?
> >
> >
> 
> Strictly speaking no. We already have that in form of the RESET_RESUME
> quirk. The broken devices we are talking about here can do runtime PM
> perfectly fine, if and only if remote wakeup is requested.
> So we need that flag to translate only in freeze()/thaw() resulting in that
> behavior, as opposed to every pair of suspend()/resume()

That was my point.  The HID driver can check at suspend time whether or 
not remote wakeup will be enabled.  If yes, well and good, no changes 
are needed.  If not, the driver can then request that the following 
resume be a runtime-resume.

Another possibility is, as you mentioned before, adding a USB quirk for 
devices which require reset-resume whenever they are resumed with wakeup 
disabled.

Alan Stern



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux