---
name: "usb_reset_device"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/usb_reset_device"
---

# usb\_reset\_device(9)

warn interface drivers and perform a USB port reset

## NAME

usb\_reset\_device - warn interface drivers and perform a USB port reset

## SYNOPSIS

**int usb\_reset\_device(struct usb\_device \*** *udev***);**

## ARGUMENTS

*udev*

device to reset (not in NOTATTACHED state)

## DESCRIPTION

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).

## RETURN

The same as for **usb\_reset\_and\_verify\_device**.

## NOTE

The caller must own the device lock. For example, it's safe to use this from a driver **probe** routine after downloading new firmware. For calls that might not occur during **probe**, drivers should lock the device using **usb\_lock\_device\_for\_reset**.

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't have pre\_reset and post\_reset methods then we attempt to unbind it and rebind afterward.

## COPYRIGHT
