Update to FreeBSD head 2016-12-10

Git mirror commit 80c55f08a05ab3b26a73b226ccb56adc3122a55c.
This commit is contained in:
Sebastian Huber
2016-12-09 14:19:03 +01:00
parent c4e89a9125
commit 75b706fde4
227 changed files with 3800 additions and 3006 deletions

View File

@@ -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: