diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2011-04-28 10:45:24 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-04-29 20:24:29 -0400 |
commit | 6498d9db6d2dad4cf5deb2dd09e0816904f41ca5 (patch) | |
tree | 68ebcb03c7d9fc1caf9205d96943ce46d0a08c4c /Documentation/usb/callbacks.txt | |
parent | 15b2f3204a5c878c32939094775fb7349f707263 (diff) |
USB: documentation update for the pre_reset method
This patch (as1459) updates the documentation for the pre_reset method
in struct usb_driver. When a driver is notified of an impending
reset, it must cancel all outstanding I/O and not start any new I/O
until it has been notified that the reset is complete.
As far as I know, most existing drivers that implement pre_reset do
this now. The major exceptions appear to be the SpeedTouch and
CDC-WDM drivers.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'Documentation/usb/callbacks.txt')
-rw-r--r-- | Documentation/usb/callbacks.txt | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Documentation/usb/callbacks.txt b/Documentation/usb/callbacks.txt index bfb36b34b79e..9e85846bdb98 100644 --- a/Documentation/usb/callbacks.txt +++ b/Documentation/usb/callbacks.txt | |||
@@ -95,9 +95,11 @@ pre_reset | |||
95 | 95 | ||
96 | int (*pre_reset)(struct usb_interface *intf); | 96 | int (*pre_reset)(struct usb_interface *intf); |
97 | 97 | ||
98 | Another driver or user space is triggering a reset on the device which | 98 | A driver or user space is triggering a reset on the device which |
99 | contains the interface passed as an argument. Cease IO and save any | 99 | contains the interface passed as an argument. Cease IO, wait for all |
100 | device state you need to restore. | 100 | outstanding URBs to complete, and save any device state you need to |
101 | restore. No more URBs may be submitted until the post_reset method | ||
102 | is called. | ||
101 | 103 | ||
102 | If you need to allocate memory here, use GFP_NOIO or GFP_ATOMIC, if you | 104 | If you need to allocate memory here, use GFP_NOIO or GFP_ATOMIC, if you |
103 | are in atomic context. | 105 | are in atomic context. |