xref: /netbsd-src/share/man/man4/cdce.4 (revision a11174ffe8f1d8ac25746cc742cf1f773a984054)
1.\" $NetBSD: cdce.4,v 1.19 2023/11/05 17:52:09 mrg Exp $
2.\"
3.\" Copyright (c) 2004 Daniel Hartmeier
4.\" All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
9.\"
10.\"    - Redistributions of source code must retain the above copyright
11.\"      notice, this list of conditions and the following disclaimer.
12.\"    - Redistributions in binary form must reproduce the above
13.\"      copyright notice, this list of conditions and the following
14.\"      disclaimer in the documentation and/or other materials provided
15.\"      with the distribution.
16.\"
17.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
20.\" FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
21.\" COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
22.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
23.\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
25.\" CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
27.\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28.\" POSSIBILITY OF SUCH DAMAGE.
29.\"
30.Dd November 5, 2023
31.Dt CDCE 4
32.Os
33.Sh NAME
34.Nm cdce
35.Nd USB Communication Device Class Ethernet driver
36.Sh SYNOPSIS
37.Cd "cdce*  at uhub? port ?"
38.Sh DESCRIPTION
39The
40.Nm
41driver provides support for USB Host-to-Host (aka USB-to-USB) bridges
42and USB-to-Ethernet adapters based on the USB Communication Device Class (CDC)
43and Ethernet subclass,
44including the following:
45.Pp
46.Bl -bullet -compact
47.It
48Acer Labs USB 2.0 Data Link
49.It
50Anker A7611
51.It
52Club 3D Adapter LAN-Adapter (CAC-1420)
53.It
54DIEWU USB-DW8152
55.It
56G.Mate YP3X00
57.It
58Huawei E5573s-320s
59.It
60Motorola USBNET
61.It
62NetChip EthernetGadget
63.It
64Prolific PL-2501
65.It
66Realtek RTL8152B, RTL8156, and RTL8156B Ethernet controllers
67.It
68Sharp Zaurus
69.El
70.Pp
71The USB bridge appears as a regular network interface on both sides,
72transporting Ethernet frames.
73.Pp
74For more information on configuring this device, see
75.Xr ifconfig 8 .
76.Pp
77USB 1.x bridges support speeds of up to 12Mbps, USB 2.0 speeds of
78up to 480Mbps, and USB 3.0 speeds of up to 5Gbps.
79.Pp
80Packets are
81received and transmitted over separate USB bulk transfer endpoints.
82.Pp
83The
84.Nm
85driver does not support different media types or options.
86.Sh DIAGNOSTICS
87.Bl -diag
88.It "cdce%d: no union descriptor"
89The driver couldn't fetch an interface descriptor from the USB
90device.
91For a manually added USB vendor/product, the CDCE_NO_UNION flag
92can be tried to work around the missing descriptor.
93.It "cdce%d: no data interface"
94.It "cdce%d: could not read endpoint descriptor"
95.It "cdce%d: unexpected endpoint"
96.It "cdce%d: could not find data bulk in/out"
97For a manually added USB vendor/product, these errors indicate
98that the bridge is not compatible with the driver.
99.El
100.Pp
101Also see
102.Xr usbnet 4
103for diagnostics.
104.Sh SEE ALSO
105.Xr arp 4 ,
106.Xr intro 4 ,
107.Xr netintro 4 ,
108.Xr usb 4 ,
109.Xr usbnet 4 ,
110.Xr ifconfig.if 5 ,
111.Xr ifconfig 8
112.Rs
113.%T "Universal Serial Bus Class Definitions for Communication Devices"
114.%U http://www.usb.org/developers/devclass_docs/usbcdc11.pdf
115.Re
116.Rs
117.%T "Data sheet Prolific PL-2501 Host-to-Host Bridge/Network Controller"
118.%U http://tech.prolific.com.tw/visitor/fcabdl.asp?fid=20679530
119.Re
120.Sh HISTORY
121The
122.Nm
123device driver first appeared in
124.Ox 3.6
125and
126.Nx 3.0 .
127.Sh AUTHORS
128.An -nosplit
129The
130.Nm
131driver was written by
132.An Craig Boston Aq Mt craig@tobuj.gank.org
133based on the
134.Xr aue 4
135driver written by
136.An Bill Paul Aq Mt wpaul@windriver.com
137and ported to
138.Ox
139by
140.An Daniel Hartmeier Aq Mt dhartmei@openbsd.org .
141.Sh CAVEATS
142Many USB devices notoriously fail to report their class and interfaces
143correctly.
144Undetected products might work flawlessly when their vendor and product IDs
145are added to the driver manually.
146