mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-10-17 14:05:54 +08:00
Update to FreeBSD head 2016-12-10
Git mirror commit 80c55f08a05ab3b26a73b226ccb56adc3122a55c.
This commit is contained in:
@@ -457,21 +457,14 @@ usbd_do_request_flags(struct usb_device *udev, struct mtx *mtx,
|
||||
return (USB_ERR_INVAL);
|
||||
#endif
|
||||
if ((mtx != NULL) && (mtx != &Giant)) {
|
||||
mtx_unlock(mtx);
|
||||
mtx_assert(mtx, MA_NOTOWNED);
|
||||
USB_MTX_UNLOCK(mtx);
|
||||
USB_MTX_ASSERT(mtx, MA_NOTOWNED);
|
||||
}
|
||||
|
||||
/*
|
||||
* Grab the USB device enumeration SX-lock serialization is
|
||||
* achieved when multiple threads are involved:
|
||||
* Serialize access to this function:
|
||||
*/
|
||||
do_unlock = usbd_enum_lock(udev);
|
||||
|
||||
/*
|
||||
* We need to allow suspend and resume at this point, else the
|
||||
* control transfer will timeout if the device is suspended!
|
||||
*/
|
||||
usbd_sr_unlock(udev);
|
||||
do_unlock = usbd_ctrl_lock(udev);
|
||||
|
||||
hr_func = usbd_get_hr_func(udev);
|
||||
|
||||
@@ -715,13 +708,11 @@ usbd_do_request_flags(struct usb_device *udev, struct mtx *mtx,
|
||||
USB_XFER_UNLOCK(xfer);
|
||||
|
||||
done:
|
||||
usbd_sr_lock(udev);
|
||||
|
||||
if (do_unlock)
|
||||
usbd_enum_unlock(udev);
|
||||
usbd_ctrl_unlock(udev);
|
||||
|
||||
if ((mtx != NULL) && (mtx != &Giant))
|
||||
mtx_lock(mtx);
|
||||
USB_MTX_LOCK(mtx);
|
||||
|
||||
switch (err) {
|
||||
case USB_ERR_NORMAL_COMPLETION:
|
||||
|
Reference in New Issue
Block a user