PERFORCE change 134395 for review

Hans Petter Selasky hselasky at FreeBSD.org
Tue Jan 29 09:47:46 PST 2008


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

Change 134395 by hselasky at hselasky_laptop001 on 2008/01/29 17:47:23

	
	Add a sysctl to the "cdce" driver that can be used
	to force the new 512x4 protocol. The sysctl can
	be used for experimental purposes, for example when
	using so-called USB to USB cables which emulate a
	CDC Ethernet device.
	
	Digitus USB to USB cable:
	
	USB HS performance before: 6Mbyte/second (max FTP download)
	USB HS performance after: 13Mbyte/second (max FTP download)

Affected files ...

.. //depot/projects/usb/src/sys/dev/usb/if_cdce.c#50 edit

Differences ...

==== //depot/projects/usb/src/sys/dev/usb/if_cdce.c#50 (text+ko) ====

@@ -101,10 +101,13 @@
 	     __FUNCTION__,## __VA_ARGS__); } } while (0)
 
 static int cdce_debug = 0;
+static int cdce_force_512x4 = 0;
 
 SYSCTL_NODE(_hw_usb, OID_AUTO, cdce, CTLFLAG_RW, 0, "USB cdce");
 SYSCTL_INT(_hw_usb_cdce, OID_AUTO, debug, CTLFLAG_RW, &cdce_debug, 0,
     "cdce debug level");
+SYSCTL_INT(_hw_usb_cdce, OID_AUTO, force_512x4, CTLFLAG_RW,
+    &cdce_force_512x4, 0, "cdce force 512x4 protocol");
 #else
 #define	DPRINTF(...)
 #endif
@@ -352,7 +355,11 @@
 	}
 	/* get the interface subclass we are using */
 	sc->sc_iface_protocol = uaa->iface->idesc->bInterfaceProtocol;
-
+#ifdef USB_DEBUG
+	if (cdce_force_512x4) {
+		sc->sc_iface_protocol = UIPROTO_CDC_ETH_512X4;
+	}
+#endif
 	usbd_set_device_desc(dev);
 
 	snprintf(sc->sc_name, sizeof(sc->sc_name), "%s",


More information about the p4-projects mailing list