PERFORCE change 157103 for review

Hans Petter Selasky hselasky at FreeBSD.org
Tue Feb 3 11:40:04 PST 2009


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

Change 157103 by hselasky at hselasky_laptop001 on 2009/02/03 19:39:10

	
	Fix a compilation issue when INVARIANTS is enabled.
	
	Move some code around so that the softc pointer
	is always used and we don't get a variable
	not used compilation warning.

Affected files ...

.. //depot/projects/usb/src/sys/dev/usb2/ethernet/if_cdce2.c#18 edit

Differences ...

==== //depot/projects/usb/src/sys/dev/usb2/ethernet/if_cdce2.c#18 (text+ko) ====

@@ -419,7 +419,6 @@
 	 */
 	usb2_transfer_start(sc->sc_xfer[CDCE_BULK_B]);
 	usb2_transfer_start(sc->sc_xfer[CDCE_BULK_A]);
-	usb2_transfer_start(sc->sc_xfer[CDCE_INTR]);
 }
 
 static void
@@ -551,12 +550,18 @@
 static void
 cdce_init(struct usb2_ether *ue)
 {
+	struct cdce_softc *sc = usb2_ether_getsc(ue);
 	struct ifnet *ifp = usb2_ether_getifp(ue);
 
 	CDCE_LOCK_ASSERT(sc, MA_OWNED);
 
 	ifp->if_drv_flags |= IFF_DRV_RUNNING;
+
+	/*
+	 * start all the transfers
+	 */
 	cdce_start(ue);
+	usb2_transfer_start(sc->sc_xfer[CDCE_INTR]);
 }
 
 static void


More information about the p4-projects mailing list