Files
kernel_arpi/include/linux
Alan Stern 7dc0c55e9f USB: UDC core: Add udc_async_callbacks gadget op
The Gadget API has a theoretical race when a gadget driver is unbound.
Although the pull-up is turned off before the driver's ->unbind
callback runs, if the USB cable were to be unplugged at just the wrong
moment there would be nothing to prevent the UDC driver from invoking
the ->disconnect callback after the unbind has finished.  In theory,
other asynchronous callbacks could also happen during the time before
the UDC driver's udc_stop routine is called, and the gadget driver
would not be prepared to handle any of them.

We need a way to tell UDC drivers to stop issuing asynchronous (that is,
->suspend, ->resume, ->disconnect, ->reset, or ->setup) callbacks at
some point after the pull-up has been turned off and before the
->unbind callback runs.  This patch adds a new ->udc_async_callbacks
callback to the usb_gadget_ops structure for precisely this purpose,
and it adds the corresponding support to the UDC core.

Later patches in this series add support for udc_async_callbacks to
several UDC drivers.

Acked-by: Felipe Balbi <balbi@kernel.org>
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Link: https://lore.kernel.org/r/20210520202144.GC1216852@rowland.harvard.edu
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-04 13:51:55 +02:00
..
2021-04-22 09:26:22 -07:00
2021-05-18 17:24:52 +01:00
2021-05-06 19:24:11 -07:00
2021-04-14 16:30:30 +03:00
2021-05-08 21:49:48 -06:00
2021-04-08 16:04:20 -07:00
2021-05-24 12:45:26 -04:00
2021-05-24 12:45:26 -04:00
2021-04-08 16:04:20 -07:00
2021-04-08 16:04:20 -07:00
2021-05-06 19:24:11 -07:00
2021-04-19 13:13:26 -04:00
2021-05-31 09:50:26 +02:00
2021-04-12 15:04:23 +02:00
2021-05-07 00:26:34 -07:00
2021-04-30 11:20:40 -07:00
2021-04-05 22:39:38 -04:00
2021-05-14 19:41:32 -07:00
2021-04-08 16:04:20 -07:00
2021-04-06 08:34:39 +02:00
2021-04-21 10:24:41 -05:00
2021-05-06 19:24:11 -07:00
2021-04-15 10:32:17 +02:00
2021-04-26 22:55:12 +01:00
2021-05-07 00:26:35 -07:00
2021-04-16 15:31:02 -07:00