diff options
author | weongyo <weongyo@FreeBSD.org> | 2009-03-17 05:57:43 +0000 |
---|---|---|
committer | weongyo <weongyo@FreeBSD.org> | 2009-03-17 05:57:43 +0000 |
commit | a204e02a55660ac3bfa2ba55d4efa17fec9167b2 (patch) | |
tree | 59a730346f0814f6d6bead59caf124c9a07a972d | |
parent | b18e0f5075c06e2307305dbd400a30373392860c (diff) | |
download | FreeBSD-src-a204e02a55660ac3bfa2ba55d4efa17fec9167b2.zip FreeBSD-src-a204e02a55660ac3bfa2ba55d4efa17fec9167b2.tar.gz |
grab NDIS USB lock instead of HAL preemption. This change should be
happened in the previous.
-rw-r--r-- | sys/compat/ndis/subr_usbd.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/compat/ndis/subr_usbd.c b/sys/compat/ndis/subr_usbd.c index 83e379c..dde87a4 100644 --- a/sys/compat/ndis/subr_usbd.c +++ b/sys/compat/ndis/subr_usbd.c @@ -707,8 +707,9 @@ usbd_irpcancel(dobj, ip) device_object *dobj; irp *ip; { + device_t dev = IRP_NDIS_DEV(ip); + struct ndis_softc *sc = device_get_softc(dev); struct ndisusb_ep *ne = IRP_NDISUSB_EP(ip); - uint8_t irql; if (ne == NULL) { ip->irp_cancel = TRUE; @@ -720,10 +721,10 @@ usbd_irpcancel(dobj, ip) * Make sure that the current USB transfer proxy is * cancelled and then restarted. */ - KeRaiseIrql(DISPATCH_LEVEL, &irql); + NDISUSB_LOCK(sc); usb2_transfer_stop(ne->ne_xfer[0]); usb2_transfer_start(ne->ne_xfer[0]); - KeLowerIrql(irql); + NDISUSB_UNLOCK(sc); ip->irp_cancel = TRUE; IoReleaseCancelSpinLock(ip->irp_cancelirql); |