usb: raw-gadget: don't disable device if usb_ep_queue fails
authorAndrey Konovalov <andreyknvl@gmail.com>
Thu, 26 Oct 2023 20:01:13 +0000 (22:01 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Oct 2023 10:58:16 +0000 (12:58 +0200)
commit1f97e3f429cff941b5f7adc9fcbb1b5138cd6125
treeff754ad42275bc710379ea0fa63f66c9d7bc9cbb
parente8033bde451eddfb9b1bbd6e2d848c1b5c277222
usb: raw-gadget: don't disable device if usb_ep_queue fails

During device operation, the host might decide to reset a device emulated
via Raw Gadget. In this case, if the device emulation code has endpoint
requests queued, usb_ep_queue will fail with -ESHUTDOWN. Currently, this
disables the Raw Gadget device and makes the emulation code unable to
proceed.

Do not disable the Raw Gadget device if usb_ep_queue fails.

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