Adding RTL8153 support to rue(4) USB to Ethernet driver
David Horwitt
david at aogsquid.ucsd.edu
Wed Oct 19 18:07:07 UTC 2016
Reviving a thread from June,2015...
My brand-spanking new XPS 13 has a dongle for the Thunderbolt port that implements a RTL8153, which
is recognized by my system (FreeBSD 11.0-RELEASE-p1 #8: Tue Oct 18 22:57:49 PDT 2016):
Oct 19 07:11:01 TWE6 kernel: ugen1.3: <BILLBOARD CLASS> at usbus1
Oct 19 07:11:02 TWE6 kernel: ugen1.4: <GenesysLogic2> at usbus1
Oct 19 07:11:02 TWE6 kernel: uhub3: <GenesysLogic2> on usbus1
Oct 19 07:11:02 TWE6 kernel: uhub3: 4 ports with 3 removable, self powered
Oct 19 07:11:03 TWE6 kernel: ugen1.5: <Realtek> at usbus1
Oct 19 07:11:03 TWE6 kernel: cdce0: <CDC Communications Control> on usbus1
Oct 19 07:11:03 TWE6 kernel: ue0: <USB Ethernet> on cdce0
Oct 19 07:11:03 TWE6 kernel: ue0: Ethernet address: 00:24:9b:1d:90:e5
NB: the MAC address matches that inscribed on the dongle.
usbconfig info:
ugen1.5: <USB 101001000 LAN Realtek> at usbus1, cfg=1 md=HOST spd=SUPER (5.0Gbps) pwr=ON (64mA)
NB: cfg=1 which should be correct for if_cdce and RTL8153. This was verified by
'usbconfig -d 1.5 dump_curr_config_desc" (complete configs dumped below).
I manually set the IP address:
ue0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
ether 00:24:9b:1d:90:e5
inet 192.168.1.2 netmask 0xffffff00 broadcast 192.168.1.255
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
The problem is, "it doesn't work'.
Using wireshark on a ping target machine, I can see that the XPS outputs packets (which look correct), but it
doesn't seem to be receiving the replies. When I set 'sysctl -a hw.usb.cdce.debug=1' I get a constant (~ 5Hz) stream
of "cdce_intr_read_callback: Received 24 bytes" whether there is network traffic or not; when I ping the XPS
this message doesn't change.
The hardware/cable works OK under Windows.
Any guidance is appreciated; TIA
David
usbconfig -d 1.5 dump_all_config_desc
ugen1.5: <USB 101001000 LAN Realtek> at usbus1, cfg=1 md=HOST spd=SUPER (5.0Gbps) pwr=ON (64mA)
Configuration index 0
bLength = 0x0009
bDescriptorType = 0x0002
wTotalLength = 0x0039
bNumInterfaces = 0x0001
bConfigurationValue = 0x0001
iConfiguration = 0x0000 <no string>
bmAttributes = 0x00a0
bMaxPower = 0x0020
Interface 0
bLength = 0x0009
bDescriptorType = 0x0004
bInterfaceNumber = 0x0000
bAlternateSetting = 0x0000
bNumEndpoints = 0x0003
bInterfaceClass = 0x00ff <Vendor specific>
bInterfaceSubClass = 0x00ff
bInterfaceProtocol = 0x0000
iInterface = 0x0000 <no string>
Endpoint 0
bLength = 0x0007
bDescriptorType = 0x0005
bEndpointAddress = 0x0081 <IN>
bmAttributes = 0x0002 <BULK>
wMaxPacketSize = 0x0400
bInterval = 0x0000
bRefresh = 0x0000
bSynchAddress = 0x0000
Additional Descriptor
bLength = 0x06
bDescriptorType = 0x30
bDescriptorSubType = 0x03
RAW dump:
0x00 | 0x06, 0x30, 0x03, 0x00, 0x00, 0x00
Endpoint 1
bLength = 0x0007
bDescriptorType = 0x0005
bEndpointAddress = 0x0002 <OUT>
bmAttributes = 0x0002 <BULK>
wMaxPacketSize = 0x0400
bInterval = 0x0000
bRefresh = 0x0000
bSynchAddress = 0x0000
Additional Descriptor
bLength = 0x06
bDescriptorType = 0x30
bDescriptorSubType = 0x03
RAW dump:
0x00 | 0x06, 0x30, 0x03, 0x00, 0x00, 0x00
Endpoint 2
bLength = 0x0007
bDescriptorType = 0x0005
bEndpointAddress = 0x0083 <IN>
bmAttributes = 0x0003 <INTERRUPT>
wMaxPacketSize = 0x0002
bInterval = 0x0008
bRefresh = 0x0000
bSynchAddress = 0x0000
Additional Descriptor
bLength = 0x06
bDescriptorType = 0x30
bDescriptorSubType = 0x00
RAW dump:
0x00 | 0x06, 0x30, 0x00, 0x00, 0x02, 0x00
Configuration index 1
bLength = 0x0009
bDescriptorType = 0x0002
wTotalLength = 0x0062
bNumInterfaces = 0x0002
bConfigurationValue = 0x0002
iConfiguration = 0x0000 <no string>
bmAttributes = 0x00a0
bMaxPower = 0x0020
Interface 0
bLength = 0x0009
bDescriptorType = 0x0004
bInterfaceNumber = 0x0000
bAlternateSetting = 0x0000
bNumEndpoints = 0x0001
bInterfaceClass = 0x0002 <Communication device>
bInterfaceSubClass = 0x0006
bInterfaceProtocol = 0x0000
iInterface = 0x0005 <CDC Communications Control>
Additional Descriptor
bLength = 0x05
bDescriptorType = 0x24
bDescriptorSubType = 0x00
RAW dump:
0x00 | 0x05, 0x24, 0x00, 0x10, 0x01
Additional Descriptor
bLength = 0x05
bDescriptorType = 0x24
bDescriptorSubType = 0x06
RAW dump:
0x00 | 0x05, 0x24, 0x06, 0x00, 0x01
Additional Descriptor
bLength = 0x0d
bDescriptorType = 0x24
bDescriptorSubType = 0x0f
RAW dump:
0x00 | 0x0d, 0x24, 0x0f, 0x03, 0x00, 0x00, 0x00, 0x00,
0x08 | 0xea, 0x05, 0x00, 0x00, 0x00
Endpoint 0
bLength = 0x0007
bDescriptorType = 0x0005
bEndpointAddress = 0x0083 <IN>
bmAttributes = 0x0003 <INTERRUPT>
wMaxPacketSize = 0x0010
bInterval = 0x0008
bRefresh = 0x0000
bSynchAddress = 0x0000
Additional Descriptor
bLength = 0x06
bDescriptorType = 0x30
bDescriptorSubType = 0x00
RAW dump:
0x00 | 0x06, 0x30, 0x00, 0x00, 0x08, 0x00
Interface 1
bLength = 0x0009
bDescriptorType = 0x0004
bInterfaceNumber = 0x0001
bAlternateSetting = 0x0000
bNumEndpoints = 0x0000
bInterfaceClass = 0x000a <CDC-data>
bInterfaceSubClass = 0x0000
bInterfaceProtocol = 0x0000
iInterface = 0x0000 <no string>
Interface 1 Alt 1
bLength = 0x0009
bDescriptorType = 0x0004
bInterfaceNumber = 0x0001
bAlternateSetting = 0x0001
bNumEndpoints = 0x0002
bInterfaceClass = 0x000a <CDC-data>
bInterfaceSubClass = 0x0000
bInterfaceProtocol = 0x0000
iInterface = 0x0004 <Ethernet Data>
Endpoint 0
bLength = 0x0007
bDescriptorType = 0x0005
bEndpointAddress = 0x0081 <IN>
bmAttributes = 0x0002 <BULK>
wMaxPacketSize = 0x0400
bInterval = 0x0000
bRefresh = 0x0000
bSynchAddress = 0x0000
Additional Descriptor
bLength = 0x06
bDescriptorType = 0x30
bDescriptorSubType = 0x03
RAW dump:
0x00 | 0x06, 0x30, 0x03, 0x00, 0x00, 0x00
Endpoint 1
bLength = 0x0007
bDescriptorType = 0x0005
bEndpointAddress = 0x0002 <OUT>
bmAttributes = 0x0002 <BULK>
wMaxPacketSize = 0x0400
bInterval = 0x0000
bRefresh = 0x0000
bSynchAddress = 0x0000
Additional Descriptor
bLength = 0x06
bDescriptorType = 0x30
bDescriptorSubType = 0x03
RAW dump:
0x00 | 0x06, 0x30, 0x03, 0x00, 0x00, 0x00
More information about the freebsd-net
mailing list