Re: Query on usb/core/devio.c

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

 



On Thu, 15 Nov 2018, Oliver Neukum wrote:

> On Do, 2018-11-15 at 12:45 +0000, Mayuresh Kulkarni wrote:
> > 
> > Understood this for remote-wake part.
> > 
> > But still unclear about step (1) for host-wake as below (please note, I am
> > refering to host-wake and remote-wake as per my previous comment) -
> > Pre-condition: device in suspend and link in L2.
> > Use-case: end user wants to sends a control message to device.
> > Assumption: end user is NOT doing any activity that causes remote-wake.
> 
> That is just an assumption you cannot make.
> Users are devious creatures. If it is physically
> possible, you have to be able to deal with it.

That's right.  But let's suppose that the user hasn't interacted with
the device.  In that case it's simple: The app should submit an URB to
the device (or do pretty much any other ioctl to the usbfs device file
descriptor).  When usbfs gets an ioctl, it will automatically wake up
the device by incrementing the runtime PM usage counter.

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