usb: raw-gadget: report suspend, resume, reset, and disconnect events
authorAndrey Konovalov <andreyknvl@gmail.com>
Thu, 26 Oct 2023 20:01:14 +0000 (22:01 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Oct 2023 10:58:16 +0000 (12:58 +0200)
commitc3a383d8d382e066038ab245c8d2b6d02f4bf8a2
treea0dab8fa35c85c372b541d81a4ca42665aa40b2d
parent1f97e3f429cff941b5f7adc9fcbb1b5138cd6125
usb: raw-gadget: report suspend, resume, reset, and disconnect events

Update USB_RAW_IOCTL_EVENT_FETCH to also report suspend, resume, reset,
and disconnect events.

This allows the code that emulates a USB device via Raw Gadget to handle
these events. For example, the device can restart enumeration when it
gets reset.

Also do not print a WARNING when the event queue overflows. With these new
events being queued, the queue might overflow if the device emulation code
stops fetching events.

Also print debug messages when a non-control event is received.

Signed-off-by: Andrey Konovalov <andreyknvl@gmail.com>
Link: https://lore.kernel.org/r/d610b629a5f32fb76c24012180743f7f0f1872c0.1698350424.git.andreyknvl@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/legacy/raw_gadget.c
include/uapi/linux/usb/raw_gadget.h