Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Jul 2008 08:59:45 GMT
From:      Weongyo Jeong <weongyo@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 145686 for review
Message-ID:  <200807230859.m6N8xjO4056314@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=145686

Change 145686 by weongyo@weongyo_ws on 2008/07/23 08:59:10

	handle a event properly to avoid blocking forever if ndis try to reset
	NIC.

Affected files ...

.. //depot/projects/ndisusb/sys/compat/ndis/kern_ndis.c#5 edit

Differences ...

==== //depot/projects/ndisusb/sys/compat/ndis/kern_ndis.c#5 (text+ko) ====

@@ -1101,6 +1101,8 @@
 
 	NDIS_UNLOCK(sc);
 
+	KeResetEvent(&sc->ndis_block->nmb_resetevent);
+
 	if (NDIS_SERIALIZED(sc->ndis_block))
 		KeAcquireSpinLock(&sc->ndis_block->nmb_lock, &irql);
 
@@ -1109,11 +1111,9 @@
 	if (NDIS_SERIALIZED(sc->ndis_block))
 		KeReleaseSpinLock(&sc->ndis_block->nmb_lock, irql);
 
-	if (rval == NDIS_STATUS_PENDING) {
-		KeResetEvent(&sc->ndis_block->nmb_resetevent);
+	if (rval == NDIS_STATUS_PENDING)
 		KeWaitForSingleObject(&sc->ndis_block->nmb_resetevent,
 		    0, 0, FALSE, NULL);
-	}
 
 	return(0);
 }



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