---
name: "usb_queue_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_queue_reset_device"
---

# usb\_queue\_reset\_device(9)

Reset a USB device from an atomic context

## NAME

usb\_queue\_reset\_device - Reset a USB device from an atomic context

## SYNOPSIS

**void usb\_queue\_reset\_device(struct usb\_interface \*** *iface***);**

## ARGUMENTS

*iface*

USB interface belonging to the device to reset

## DESCRIPTION

This function can be used to reset a USB device from an atomic context, where **usb\_reset\_device** won't work (as it blocks).

Doing a reset via this method is functionally equivalent to calling **usb\_reset\_device**, except for the fact that it is delayed to a workqueue. This means that any drivers bound to other interfaces might be unbound, as well as users from usbfs in user space.

Corner cases:

\- Scheduling two resets at the same time from two different drivers attached to two different interfaces of the same device is possible; depending on how the driver attached to each interface handles -\>**pre\_reset**, the second reset might happen or not.

\- If the reset is delayed so long that the interface is unbound from its driver, the reset will be skipped.

\- This function can be called during .**probe**. It can also be called during .**disconnect**, but doing so is pointless because the reset will not occur. If you really want to reset the device during .**disconnect**, call **usb\_reset\_device** directly -- but watch out for nested unbinding issues!

## COPYRIGHT
