'\" t .\" Title: usb_reset_device .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: January 2017 .\" Manual: USB Core APIs .\" Source: Kernel Hackers Manual 4.8.15 .\" Language: English .\" .TH "USB_RESET_DEVICE" "9" "January 2017" "Kernel Hackers Manual 4\&.8\&." "USB Core APIs" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" usb_reset_device \- warn interface drivers and perform a USB port reset .SH "SYNOPSIS" .HP \w'int\ usb_reset_device('u .BI "int usb_reset_device(struct\ usb_device\ *\ " "udev" ");" .SH "ARGUMENTS" .PP \fIudev\fR .RS 4 device to reset (not in SUSPENDED or NOTATTACHED state) .RE .SH "DESCRIPTION" .PP Warns all drivers bound to registered interfaces (using their pre_reset method), performs the port reset, and then lets the drivers know that the reset is over (using their post_reset method)\&. .SH "RETURN" .PP The same as for \fBusb_reset_and_verify_device\fR\&. .SH "NOTE" .PP The caller must own the device lock\&. For example, it\*(Aqs safe to use this from a driver \fBprobe\fR routine after downloading new firmware\&. For calls that might not occur during \fBprobe\fR, drivers should lock the device using \fBusb_lock_device_for_reset\fR\&. .PP If an interface is currently being probed or disconnected, we assume its driver knows how to handle resets\&. For all other interfaces, if the driver doesn\*(Aqt have pre_reset and post_reset methods then we attempt to unbind it and rebind afterward\&. .SH "COPYRIGHT" .br