Revert "USB: core: Prevent nested device-reset calls"
This reverts commit abe3cfb7a7
which is
commit 9c6d778800b921bde3bff3cff5003d1650f942d1 upstream.
It breaks the Android kernel ABI and shouldn't be needed for any normal
Android devices. If this is needed in the future, it can be brought
back in an ABI-stable manner.
Bug: 161946584
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: If15008828936f3675e8109f1b13b6b065aed4c46
This commit is contained in:
parent
2e00a2dc61
commit
51659937e3
@ -5967,11 +5967,6 @@ static int usb_reset_and_verify_device(struct usb_device *udev)
|
||||
* the reset is over (using their post_reset method).
|
||||
*
|
||||
* Return: The same as for usb_reset_and_verify_device().
|
||||
* However, if a reset is already in progress (for instance, if a
|
||||
* driver doesn't have pre_ or post_reset() callbacks, and while
|
||||
* being unbound or re-bound during the ongoing reset its disconnect()
|
||||
* or probe() routine tries to perform a second, nested reset), the
|
||||
* routine returns -EINPROGRESS.
|
||||
*
|
||||
* Note:
|
||||
* The caller must own the device lock. For example, it's safe to use
|
||||
@ -6005,10 +6000,6 @@ int usb_reset_device(struct usb_device *udev)
|
||||
return -EISDIR;
|
||||
}
|
||||
|
||||
if (udev->reset_in_progress)
|
||||
return -EINPROGRESS;
|
||||
udev->reset_in_progress = 1;
|
||||
|
||||
port_dev = hub->ports[udev->portnum - 1];
|
||||
|
||||
/*
|
||||
@ -6073,7 +6064,6 @@ int usb_reset_device(struct usb_device *udev)
|
||||
|
||||
usb_autosuspend_device(udev);
|
||||
memalloc_noio_restore(noio_flag);
|
||||
udev->reset_in_progress = 0;
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(usb_reset_device);
|
||||
|
@ -596,7 +596,6 @@ struct usb3_lpm_parameters {
|
||||
* @devaddr: device address, XHCI: assigned by HW, others: same as devnum
|
||||
* @can_submit: URBs may be submitted
|
||||
* @persist_enabled: USB_PERSIST enabled for this device
|
||||
* @reset_in_progress: the device is being reset
|
||||
* @have_langid: whether string_langid is valid
|
||||
* @authorized: policy has said we can use it;
|
||||
* (user space) policy determines if we authorize this device to be
|
||||
@ -682,7 +681,6 @@ struct usb_device {
|
||||
|
||||
unsigned can_submit:1;
|
||||
unsigned persist_enabled:1;
|
||||
unsigned reset_in_progress:1;
|
||||
unsigned have_langid:1;
|
||||
unsigned authorized:1;
|
||||
unsigned authenticated:1;
|
||||
|
Loading…
Reference in New Issue
Block a user