From owner-p4-projects@FreeBSD.ORG Tue Jan 29 17:47:46 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1A3F316A46C; Tue, 29 Jan 2008 17:47:46 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BB62816A418 for ; Tue, 29 Jan 2008 17:47:45 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id AADB413C4DB for ; Tue, 29 Jan 2008 17:47:45 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m0THljjo093836 for ; Tue, 29 Jan 2008 17:47:45 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m0THliHI093833 for perforce@freebsd.org; Tue, 29 Jan 2008 17:47:44 GMT (envelope-from hselasky@FreeBSD.org) Date: Tue, 29 Jan 2008 17:47:44 GMT Message-Id: <200801291747.m0THliHI093833@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky To: Perforce Change Reviews Cc: Subject: PERFORCE change 134395 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jan 2008 17:47:46 -0000 http://perforce.freebsd.org/chv.cgi?CH=134395 Change 134395 by hselasky@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",