'\" t .\" Title: usb_reset_configuration .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 .\" Date: January 2017 .\" Manual: USB Core APIs .\" Source: Kernel Hackers Manual 4.8.15 .\" Language: English .\" .TH "USB_RESET_CONFIGURAT" "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_configuration \- lightweight device reset .SH "SYNOPSIS" .HP \w'int\ usb_reset_configuration('u .BI "int usb_reset_configuration(struct\ usb_device\ *\ " "dev" ");" .SH "ARGUMENTS" .PP \fIdev\fR .RS 4 the device whose configuration is being reset .RE .SH "DESCRIPTION" .PP This issues a standard SET_CONFIGURATION request to the device using the current configuration\&. The effect is to reset most USB\-related state in the device, including interface altsettings (reset to zero), endpoint halts (cleared), and endpoint state (only for bulk and interrupt endpoints)\&. Other usbcore state is unchanged, including bindings of usb device drivers to interfaces\&. .PP Because this affects multiple interfaces, avoid using this with composite (multi\-interface) devices\&. Instead, the driver for each interface may use \fBusb_set_interface\fR on the interfaces it claims\&. Be careful though; some devices don\*(Aqt support the SET_INTERFACE request, and others won\*(Aqt reset all the interface state (notably endpoint state)\&. Resetting the whole configuration would affect other drivers\*(Aq interfaces\&. .PP The caller must own the device lock\&. .SH "RETURN" .PP Zero on success, else a negative error code\&. .SH "COPYRIGHT" .br