1.\" Copyright (c) 2004 Daniel Hartmeier 2.\" All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 8.\" - Redistributions of source code must retain the above copyright 9.\" notice, this list of conditions and the following disclaimer. 10.\" - Redistributions in binary form must reproduce the above 11.\" copyright notice, this list of conditions and the following 12.\" disclaimer in the documentation and/or other materials provided 13.\" with the distribution. 14.\" 15.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 16.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 17.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 18.\" FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 19.\" COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 20.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 21.\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 23.\" CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 25.\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26.\" POSSIBILITY OF SUCH DAMAGE. 27.\" 28.\" $NetBSD: cdce.4,v 1.4 2004/12/08 18:35:56 peter Exp $ 29.\" $FreeBSD$ 30.\" 31.Dd September 25, 2014 32.Dt CDCE 4 33.Os 34.Sh NAME 35.Nm cdce 36.Nd "USB Communication Device Class Ethernet driver" 37.Sh SYNOPSIS 38To compile this driver into the kernel, 39place the following lines in your 40kernel configuration file: 41.Bd -ragged -offset indent 42.Cd "device uhci" 43.Cd "device ohci" 44.Cd "device usb" 45.Cd "device cdce" 46.Ed 47.Pp 48Alternatively, to load the driver as a 49module at boot time, place the following line in 50.Xr loader.conf 5 : 51.Bd -literal -offset indent 52if_cdce_load="YES" 53.Ed 54.Sh DESCRIPTION 55The 56.Nm 57driver provides support for USB Host-to-Host (aka USB-to-USB) and 58USB-to-Ethernet bridges based on the USB Communication Device Class 59(CDC) and Ethernet subclass. 60.Pp 61The USB bridge appears as a regular network interface on both sides, 62transporting Ethernet frames. 63.Pp 64For more information on configuring this device, see 65.Xr ifconfig 8 . 66.Pp 67USB 1.x bridges support speeds of up to 12Mbps, and USB 2.0 speeds of 68up to 480Mbps. 69.Pp 70Packets are 71received and transmitted over separate USB bulk transfer endpoints. 72.Pp 73The 74.Nm 75driver does not support different media types or options. 76.Sh HARDWARE 77The following devices are supported by the 78.Nm 79driver: 80.Pp 81.Bl -bullet -compact 82.It 83Prolific PL-2501 Host-to-Host Bridge Controller 84.It 85Sharp Zaurus PDA 86.It 87Terayon TJ-715 DOCSIS Cable Modem 88.El 89.Sh DIAGNOSTICS 90.Bl -diag 91.It "cdce%d: no union descriptor" 92The driver could not fetch an interface descriptor from the USB 93device. 94For a manually added USB vendor/product, the CDCE_NO_UNION flag 95can be tried to work around the missing descriptor. 96.It "cdce%d: no data interface" 97.It "cdce%d: could not read endpoint descriptor" 98.It "cdce%d: unexpected endpoint" 99.It "cdce%d: could not find data bulk in/out" 100For a manually added USB vendor/product, these errors indicate 101that the bridge is not compatible with the driver. 102.It "cdce%d: watchdog timeout" 103A packet was queued for transmission and a transmit command was 104issued, however the device failed to acknowledge the transmission 105before a timeout expired. 106.It "cdce%d: no memory for rx list -- packet dropped!" 107Memory allocation through MGETHDR or MCLGET failed, the system 108is running low on mbufs. 109.It "cdce%d: abort/close rx/tx pipe failed" 110.It "cdce%d: rx/tx list init failed" 111.It "cdce%d: open rx/tx pipe failed" 112.It "cdce%d: usb error on rx/tx" 113.El 114.Sh SEE ALSO 115.Xr arp 4 , 116.Xr intro 4 , 117.Xr ipheth 4 , 118.Xr netintro 4 , 119.Xr urndis 4 , 120.Xr usb 4 , 121.Xr ifconfig 8 122.Rs 123.%T "Universal Serial Bus Class Definitions for Communication Devices" 124.%U http://www.usb.org/developers/devclass_docs/usbcdc11.pdf 125.Re 126.Rs 127.%T "Data sheet Prolific PL-2501 Host-to-Host Bridge/Network Controller" 128.%U http://tech.prolific.com.tw/visitor/fcabdl.asp?fid=20679530 129.Re 130.Sh HISTORY 131The 132.Nm 133device driver first appeared in 134.Ox 3.6 , 135.Nx 3.0 136and 137.Fx 6.0 . 138.Sh AUTHORS 139.An -nosplit 140The 141.Nm 142driver was written by 143.An Craig Boston Aq Mt craig@tobuj.gank.org 144based on the 145.Xr aue 4 146driver written by 147.An Bill Paul Aq Mt wpaul@windriver.com 148and ported to 149.Ox 150by 151.An Daniel Hartmeier Aq Mt dhartmei@openbsd.org . 152.Sh CAVEATS 153Many USB devices notoriously fail to report their class and interfaces 154correctly. 155Undetected products might work flawlessly when their vendor and product IDs 156are added to the driver manually. 157