aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/usb/callbacks.txt8
-rw-r--r--include/linux/usb.h6
2 files changed, 9 insertions, 5 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
96int (*pre_reset)(struct usb_interface *intf); 96int (*pre_reset)(struct usb_interface *intf);
97 97
98Another driver or user space is triggering a reset on the device which 98A driver or user space is triggering a reset on the device which
99contains the interface passed as an argument. Cease IO and save any 99contains the interface passed as an argument. Cease IO, wait for all
100device state you need to restore. 100outstanding URBs to complete, and save any device state you need to
101restore. No more URBs may be submitted until the post_reset method
102is called.
101 103
102If you need to allocate memory here, use GFP_NOIO or GFP_ATOMIC, if you 104If you need to allocate memory here, use GFP_NOIO or GFP_ATOMIC, if you
103are in atomic context. 105are in atomic context.
diff --git a/include/linux/usb.h b/include/linux/usb.h
index 65f78ca5d88e..73c7df489607 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -806,8 +806,10 @@ struct usbdrv_wrap {
806 * @resume: Called when the device is being resumed by the system. 806 * @resume: Called when the device is being resumed by the system.
807 * @reset_resume: Called when the suspended device has been reset instead 807 * @reset_resume: Called when the suspended device has been reset instead
808 * of being resumed. 808 * of being resumed.
809 * @pre_reset: Called by usb_reset_device() when the device 809 * @pre_reset: Called by usb_reset_device() when the device is about to be
810 * is about to be reset. 810 * reset. This routine must not return until the driver has no active
811 * URBs for the device, and no more URBs may be submitted until the
812 * post_reset method is called.
811 * @post_reset: Called by usb_reset_device() after the device 813 * @post_reset: Called by usb_reset_device() after the device
812 * has been reset 814 * has been reset
813 * @id_table: USB drivers use ID table to support hotplugging. 815 * @id_table: USB drivers use ID table to support hotplugging.