PERFORCE change 156600 for review

Hans Petter Selasky hselasky at FreeBSD.org
Sat Jan 24 02:13:31 PST 2009


http://perforce.freebsd.org/chv.cgi?CH=156600

Change 156600 by hselasky at hselasky_laptop001 on 2009/01/24 10:12:35

	
	Revert last USB bluetooth change. It is not
	correct. Print out node refs outstanding in
	detach so that we don't get into any trouble!

Affected files ...

.. //depot/projects/usb/src/sys/dev/usb2/bluetooth/ng_ubt2.c#19 edit

Differences ...

==== //depot/projects/usb/src/sys/dev/usb2/bluetooth/ng_ubt2.c#19 (text+ko) ====

@@ -595,8 +595,14 @@
 	/* Free USB transfers, if any */
 	usb2_transfer_unsetup(sc->sc_xfer, UBT_N_TRANSFER);
 
-	if (node != NULL)
+	if (node != NULL) {
+		if (node->nd_refs != 1) {
+			device_printf(dev, "WARNING: Node "
+			    "reference(%d) is not one!\n",
+			    (int)(node->nd_refs));
+		}
 		NG_NODE_UNREF(node);
+	}
 
 	/* Destroy queues */
 	UBT_LOCK(sc);
@@ -1292,7 +1298,6 @@
 		UBT_UNLOCK(sc);
 
 		NG_NODE_SET_PRIVATE(node, NULL);
-		NG_NODE_UNREF(node);
 	} else
 		NG_NODE_REVIVE(node); /* tell ng_rmnode we are persisant */
 


More information about the p4-projects mailing list