Index: usr.sbin/bhyve/pci_xhci.c =================================================================== --- usr.sbin/bhyve/pci_xhci.c +++ usr.sbin/bhyve/pci_xhci.c @@ -1,5 +1,6 @@ /*- * Copyright (c) 2014 Leon Dang + * Copyright 2018 Joyent, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -1661,7 +1662,6 @@ do_intr = 0; xfer = devep->ep_xfer; - USB_DATA_XFER_LOCK(xfer); /* outstanding requests queued up */ if (dev->dev_ue->ue_data != NULL) { @@ -1684,9 +1684,6 @@ } } - USB_DATA_XFER_UNLOCK(xfer); - - return (err); } @@ -1917,7 +1914,9 @@ /* handle pending transfers */ if (devep->ep_xfer->ndata > 0) { + USB_DATA_XFER_LOCK(devep->ep_xfer); pci_xhci_try_usb_xfer(sc, dev, devep, ep_ctx, slot, epid); + USB_DATA_XFER_UNLOCK(devep->ep_xfer); return; }