Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Mar 2009 05:57:43 +0000 (UTC)
From:      Weongyo Jeong <weongyo@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r189917 - head/sys/compat/ndis
Message-ID:  <200903170557.n2H5vhQf084294@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: weongyo
Date: Tue Mar 17 05:57:43 2009
New Revision: 189917
URL: http://svn.freebsd.org/changeset/base/189917

Log:
  grab NDIS USB lock instead of HAL preemption.  This change should be
  happened in the previous.

Modified:
  head/sys/compat/ndis/subr_usbd.c

Modified: head/sys/compat/ndis/subr_usbd.c
==============================================================================
--- head/sys/compat/ndis/subr_usbd.c	Tue Mar 17 05:10:12 2009	(r189916)
+++ head/sys/compat/ndis/subr_usbd.c	Tue Mar 17 05:57:43 2009	(r189917)
@@ -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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200903170557.n2H5vhQf084294>