linux/Documentation/driver-api/usb
Michal Pecio 9f2a3933be USB: document some API requirements on disconnection
A call to usb_set_interface() crashes if the device is deallocated
concurrently, such as due to physical removal or a serious IO error.
It could also interfere with other drivers using the device if the
current driver is unbound before the call is finished.

Document the need to delay driver unbinding until this call returns,
which solves both issues.

Document the same regarding usb_clear_halt(), which is equally known
to be routinely called by drivers.

Explicitly mention finishing pending operations in the documentation
of the driver disconnect callback.

Signed-off-by: Michal Pecio <michal.pecio@gmail.com>
Link: https://lore.kernel.org/r/20240218092515.7635ff8c@foxbook
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-03-02 20:37:14 +01:00
..
anchors.rst usb/anchors.txt: convert to ReST and add to driver-api book 2017-04-11 14:38:44 -06:00
bulk-streams.rst Replace HTTP links with HTTPS ones: documentation 2020-06-08 09:30:19 -06:00
callbacks.rst USB: document some API requirements on disconnection 2024-03-02 20:37:14 +01:00
dma.rst docs: driver-api: usb: update dma info 2023-10-05 09:35:12 +02:00
dwc3.rst Documentation: driver-api: correct spelling 2023-02-02 11:05:16 -07:00
error-codes.rst USB: core: Check buffer length matches wLength for control transfers 2021-05-27 13:46:21 +02:00
gadget.rst docs: get rid of :c:type explicit declarations for structs 2020-10-15 07:49:40 +02:00
hotplug.rst docs: get rid of :c:type explicit declarations for structs 2020-10-15 07:49:40 +02:00
index.rst usb: typec: Improve Alt Mode documentation 2018-12-19 08:13:25 +01:00
persist.rst docs-rst: fix usb cross-references 2017-04-11 14:41:29 -06:00
power-management.rst docs: power: convert docs to ReST and rename to *.rst 2019-06-14 16:08:36 -05:00
typec_bus.rst usb: docs: document altmode register/unregister functions 2020-10-15 07:49:48 +02:00
typec.rst usb: typec: Improve Alt Mode documentation 2018-12-19 08:13:25 +01:00
URB.rst docs: get rid of :c:type explicit declarations for structs 2020-10-15 07:49:40 +02:00
usb3-debug-port.rst Documentation: driver-api: correct spelling 2023-02-02 11:05:16 -07:00
usb.rst USB: Remove Wireless USB and UWB documentation 2023-08-09 14:17:32 +02:00
writing_musb_glue_layer.rst Replace HTTP links with HTTPS ones: documentation 2020-06-08 09:30:19 -06:00
writing_usb_driver.rst Docs: usb: update writesize, copy_from_user, usb_fill_bulk_urb, usb_submit_urb 2021-11-17 14:54:58 +01:00