1USB_QUEUE_RESET_DEVI(9)          USB Core APIs         USB_QUEUE_RESET_DEVI(9)
2
3
4

NAME

6       usb_queue_reset_device - Reset a USB device from an atomic context
7

SYNOPSIS

9       void usb_queue_reset_device(struct usb_interface * iface);
10

ARGUMENTS

12       iface
13           USB interface belonging to the device to reset
14

DESCRIPTION

16       This function can be used to reset a USB device from an atomic context,
17       where usb_reset_device won´t work (as it blocks).
18
19       Doing a reset via this method is functionally equivalent to calling
20       usb_reset_device, except for the fact that it is delayed to a
21       workqueue. This means that any drivers bound to other interfaces might
22       be unbound, as well as users from usbfs in user space.
23

CORNER CASES

25       - Scheduling two resets at the same time from two different drivers
26       attached to two different interfaces of the same device is possible;
27       depending on how the driver attached to each interface handles
28       ->pre_reset, the second reset might happen or not.
29
30       - If a driver is unbound and it had a pending reset, the reset will be
31       cancelled.
32
33       - This function can be called during .probe or .disconnect times. On
34       return from .disconnect, any pending resets will be cancelled.
35
36       There is no no need to lock/unlock the reset_ws as schedule_work does
37       its own.
38

NOTE

40       We don´t do any reference count tracking because it is not needed. The
41       lifecycle of the work_struct is tied to the usb_interface. Before
42       destroying the interface we cancel the work_struct, so the fact that
43       work_struct is queued and or running means the interface (and thus, the
44       device) exist and are referenced.
45
47Kernel Hackers Manual 2.6.         June 2019           USB_QUEUE_RESET_DEVI(9)
Impressum