From owner-freebsd-net@freebsd.org Wed Oct 19 18:07:07 2016 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 26AF7C1983B for ; Wed, 19 Oct 2016 18:07:07 +0000 (UTC) (envelope-from david@aogsquid.ucsd.edu) Received: from iport-acv6-out.ucsd.edu (iport-acv6-out.ucsd.edu [132.239.0.13]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client CN "iport-acv1.ucsd.edu", Issuer "InCommon RSA Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 06037F21 for ; Wed, 19 Oct 2016 18:07:06 +0000 (UTC) (envelope-from david@aogsquid.ucsd.edu) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2ApDQD7tQdY/4j574RcHAEBBAEBCgEBgz4BAQEBAR2BSY0/qX+BOIIIARaICj8UAQIBAQEBAQEBYiiFDBVANgIFFgsCCwMCAQIBWAgBAYhOpwiPbYljBoNZgQeLR4YPglsFjz2KUJBxjxKMfoQAHjZHBgiDAhAPgXOGYAaCKQEBAQ X-IPAS-Result: A2ApDQD7tQdY/4j574RcHAEBBAEBCgEBgz4BAQEBAR2BSY0/qX+BOIIIARaICj8UAQIBAQEBAQEBYiiFDBVANgIFFgsCCwMCAQIBWAgBAYhOpwiPbYljBoNZgQeLR4YPglsFjz2KUJBxjxKMfoQAHjZHBgiDAhAPgXOGYAaCKQEBAQ X-IronPort-AV: E=Sophos;i="5.31,367,1473145200"; d="scan'208";a="179582153" X-Spam-Status: No X-Spam-Level: Received: from act-bufferout-b1.ucsd.edu ([132.239.249.136]) by iport-acv6-out.ucsd.edu with ESMTP/TLS/DHE-RSA-AES256-SHA; 19 Oct 2016 11:06:42 -0700 Received: from Davids-MacBook-Pro.local (unknown [137.110.201.97]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by act-bufferout-b1.ucsd.edu (Postfix) with ESMTPS id CA8AB144106; Wed, 19 Oct 2016 11:06:41 -0700 (PDT) Message-ID: <5807B630.1060806@aogsquid.ucsd.edu> Date: Wed, 19 Oct 2016 11:06:40 -0700 From: David Horwitt User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: freebsd-net@freebsd.org Subject: Adding RTL8153 support to rue(4) USB to Ethernet driver Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Oct 2016 18:07:07 -0000 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: at usbus1 Oct 19 07:11:02 TWE6 kernel: ugen1.4: at usbus1 Oct 19 07:11:02 TWE6 kernel: uhub3: 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: at usbus1 Oct 19 07:11:03 TWE6 kernel: cdce0: on usbus1 Oct 19 07:11:03 TWE6 kernel: ue0: 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: 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 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 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: 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 bmAttributes = 0x00a0 bMaxPower = 0x0020 Interface 0 bLength = 0x0009 bDescriptorType = 0x0004 bInterfaceNumber = 0x0000 bAlternateSetting = 0x0000 bNumEndpoints = 0x0003 bInterfaceClass = 0x00ff bInterfaceSubClass = 0x00ff bInterfaceProtocol = 0x0000 iInterface = 0x0000 Endpoint 0 bLength = 0x0007 bDescriptorType = 0x0005 bEndpointAddress = 0x0081 bmAttributes = 0x0002 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 bmAttributes = 0x0002 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 bmAttributes = 0x0003 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 bmAttributes = 0x00a0 bMaxPower = 0x0020 Interface 0 bLength = 0x0009 bDescriptorType = 0x0004 bInterfaceNumber = 0x0000 bAlternateSetting = 0x0000 bNumEndpoints = 0x0001 bInterfaceClass = 0x0002 bInterfaceSubClass = 0x0006 bInterfaceProtocol = 0x0000 iInterface = 0x0005 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 bmAttributes = 0x0003 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 bInterfaceSubClass = 0x0000 bInterfaceProtocol = 0x0000 iInterface = 0x0000 Interface 1 Alt 1 bLength = 0x0009 bDescriptorType = 0x0004 bInterfaceNumber = 0x0001 bAlternateSetting = 0x0001 bNumEndpoints = 0x0002 bInterfaceClass = 0x000a bInterfaceSubClass = 0x0000 bInterfaceProtocol = 0x0000 iInterface = 0x0004 Endpoint 0 bLength = 0x0007 bDescriptorType = 0x0005 bEndpointAddress = 0x0081 bmAttributes = 0x0002 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 bmAttributes = 0x0002 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