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 17, 2005 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 support for the 39.Nm 40driver into your kernel, place the following lines in your 41kernel configuration file: 42.Bd -ragged -offset indent 43.Cd "device uhci" 44.Cd "device ohci" 45.Cd "device usb" 46.Cd "device cdce" 47.Ed 48.Pp 49Alternatively, to load the 50.Nm 51driver at boot time, place the following line in 52.Xr loader.conf 5 : 53.Bd -literal -offset indent 54if_cdce_load="YES" 55.Ed 56.Sh DESCRIPTION 57The 58.Nm 59driver provides support for USB Host-to-Host (aka USB-to-USB) and 60USB-to-Ethernet bridges based on the USB Communication Device Class 61(CDC) and Ethernet subclass. 62.Pp 63The USB bridge appears as a regular network interface on both sides, 64transporting Ethernet frames. 65.Pp 66For more information on configuring this device, see 67.Xr ifconfig 8 . 68.Pp 69USB 1.x bridges support speeds of up to 12Mbps, and USB 2.0 speeds of 70up to 480Mbps. 71.Pp 72Packets are 73received and transmitted over separate USB bulk transfer endpoints. 74.Pp 75The 76.Nm 77driver does not support different media types or options. 78.Sh HARDWARE 79The following devices are supported by the 80.Nm 81driver: 82.Pp 83.Bl -bullet -compact 84.It 85Prolific PL-2501 Host-to-Host Bridge Controller 86.It 87Sharp Zaurus PDA 88.It 89Terayon TJ-715 DOCSIS Cable Modem 90.El 91.Sh DIAGNOSTICS 92.Bl -diag 93.It "cdce%d: no union descriptor" 94The driver could not fetch an interface descriptor from the USB 95device. 96For a manually added USB vendor/product, the CDCE_NO_UNION flag 97can be tried to work around the missing descriptor. 98.It "cdce%d: no data interface" 99.It "cdce%d: could not read endpoint descriptor" 100.It "cdce%d: unexpected endpoint" 101.It "cdce%d: could not find data bulk in/out" 102For a manually added USB vendor/product, these errors indicate 103that the bridge is not compatible with the driver. 104.It "cdce%d: watchdog timeout" 105A packet was queued for transmission and a transmit command was 106issued, however the device failed to acknowledge the transmission 107before a timeout expired. 108.It "cdce%d: no memory for rx list -- packet dropped!" 109Memory allocation through MGETHDR or MCLGET failed, the system 110is running low on mbufs. 111.It "cdce%d: abort/close rx/tx pipe failed" 112.It "cdce%d: rx/tx list init failed" 113.It "cdce%d: open rx/tx pipe failed" 114.It "cdce%d: usb error on rx/tx" 115.El 116.Sh SEE ALSO 117.Xr arp 4 , 118.Xr intro 4 , 119.Xr netintro 4 , 120.Xr usb 4 , 121.\" .Xr hostname.if 5 , 122.Xr ifconfig 8 123.Rs 124.%T "Universal Serial Bus Class Definitions for Communication Devices" 125.%O http://www.usb.org/developers/devclass_docs/usbcdc11.pdf 126.Re 127.Rs 128.%T "Data sheet Prolific PL-2501 Host-to-Host Bridge/Network Controller" 129.%O http://tech.prolific.com.tw/visitor/fcabdl.asp?fid=20679530 130.Re 131.Sh HISTORY 132The 133.Nm 134device driver first appeared in 135.Ox 3.6 , 136.Nx 3.0 137and 138.Fx 6.0 . 139.Sh AUTHORS 140.An -nosplit 141The 142.Nm 143driver was written by 144.An Craig Boston Aq craig@tobuj.gank.org 145based on the 146.Xr aue 4 147driver written by 148.An Bill Paul Aq wpaul@windriver.com 149and ported to 150.Ox 151by 152.An Daniel Hartmeier Aq dhartmei@openbsd.org . 153.Sh CAVEATS 154Many USB devices notoriously fail to report their class and interfaces 155correctly. 156Undetected products might work flawlessly when their vendor and product IDs 157are added to the driver manually. 158