Remote wake up in gadget drivers

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

 



(syzkaller to bcc)

Hi Alan,

I hope you could you clarify some things wrt the remote wake up
support in gadget drivers.

Please see the Darrion's message first:

On Fri, Jun 28, 2024 at 5:34 AM Darrion Ramos <darrionramos@xxxxxxxxx> wrote:
>
> Additionally, we have been looking into the raw_gadget and have noticed that the keyboard example (both a physical instance on a raspberry pi and the virtual instance) do not wakeup the host device from suspend. It seems that the emulated device does not communicate to the host that it is a wakeup capable device. The /sys/bus/devices/.../power directory for the respective udc is missing the wakeup files that would enable this. From my research on this I only found that the usb_gadget struct for the device needs to have the wakeup_capable flag set for the host to recognize the device as a remote wakeup source. I have printed the value during the gadget_bind and it seems to be set so I am not sure what else could be causing the host to not have the device recognized for remote wakeup. If anybody has any ideas on what needs to be modified in the raw_gadget or any resources for looking into it more it would be greatly appreciated, thanks!

I assume that to take advantage of remote wake up, the device needs to
first of all set the USB_DEVICE_REMOTE_WAKEUP bit in bmAttributes.

But then, is the wake up supposed to be initiated through the gadget
driver or through the UDC sysfs files as the ones that Darrion
mentioned?

For the former case, I assume that adding a new ioctl to Raw Gadget
that calls usb_gadget_wakeup() would be a way to support this?

AFAICS, only the g_zero gadget driver calls usb_gadget_wakeup(). Do
the other gadget drivers just have no support for remote wake up?

Thank you!





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

  Powered by Linux