Date: Wed, 3 Jun 2015 23:42:27 +0800 From: Ben Woods <woodsb02@gmail.com> To: Hans Petter Selasky <hps@selasky.org> Cc: freebsd-net@freebsd.org Subject: Re: Adding RTL8153 support to rue(4) USB to Ethernet driver Message-ID: <CAOc73CBxtkx5BOxUxB4jq4FGW5tVLn=pcGwoAGO-DmucKCQKdg@mail.gmail.com> In-Reply-To: <556F1AC7.3030505@selasky.org> References: <CAOc73CBSWNrVc8i07x=Fkxk_u2%2B4yoGteYFdhryEUP-YZJczTg@mail.gmail.com> <CAOc73CDj1B1jWFVKhJ7CK4OqJbJ%2Bbiw1pSVH1YmKU6RvmO0OEw@mail.gmail.com> <556F1AC7.3030505@selasky.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 3 June 2015 at 23:18, Hans Petter Selasky <hps@selasky.org> wrote: > On 06/03/15 17:01, Ben Woods wrote: >> >> On 3 June 2015 at 22:59, Ben Woods <woodsb02@gmail.com> wrote: >>> >>> Hi everyone, >>> >>> I am wondering what it would take to add support for RTL8153 to the >>> rue(4) USB to Fast Ethernet driver for Realtek. >>> >>> I bought one of these from NEC in Japan (their part number >>> PC-VP-BK06), as shown here (use Google translate): >>> http://121ware.com/product/option/cable/pc-vp-bk06/index.html >>> >>> Here is the diff when support was added to the Linux kernel: >>> https://lkml.org/lkml/2013/7/7/127 >>> >>> Regards, >>> Ben >>> >>> -- >>> From: Benjamin Woods >>> woodsb02@gmail.com >> >> >> I nearly forgot the output from my usbconfig(8): >> >> # usbconfig -u 1 -a 2 dump_device_desc >> ugen1.5: <USB 101001000 LAN Realtek> at usbus1, cfg=0 md=HOST spd=HIGH >> (480Mbps) pwr=ON (100mA) >> >> bLength = 0x0012 >> bDescriptorType = 0x0001 >> bcdUSB = 0x0210 >> bDeviceClass = 0x0000 <Probed by interface class> >> bDeviceSubClass = 0x0000 >> bDeviceProtocol = 0x0000 >> bMaxPacketSize0 = 0x0040 >> idVendor = 0x0bda >> idProduct = 0x8153 >> bcdDevice = 0x3000 >> iManufacturer = 0x0001 <Realtek> >> iProduct = 0x0002 <USB 10/100/1000 LAN> >> iSerialNumber = 0x0003 <9CEBE81A1976> >> bNumConfigurations = 0x0002 >> >> Regards, >> Ben > > > Hi, > > Can you dump the configuration descriptors? > > Have you tried: > > usbconfig -d X.Y set_config 1 > > --HPS > Wow - it works after running your recommended "usbconfig -d X.Y set_config 1"! It shows up as interface ue0, I can get an IP address with DHCLIENT and networking works fine. Note that I am running FreeBSD 11-current r283879. Thank you for your help HPS! How can we make this work out of the box in the future? Here is the dmesg output: kernel: ugen0.3: <Realtek> at usbus0 root: Unknown USB device: vendor 0x0bda product 0x8153 bus uhub0 kernel: cdce0: <CDC Communications Control> on usbus0 kernel: ue0: <USB Ethernet> on cdce0 kernel: ue0: Ethernet address: 9c:eb:e8:1a:19:76 root: Unknown USB device: vendor 0x0bda product 0x8153 bus uhub0 root: Unknown USB device: vendor 0x064e product 0xc801 bus uhub0 root: Unknown USB device: vendor 0x064e product 0xc801 bus uhub0 Here is a copy of the configuration descriptors BEFORE running the above command: ugen0.3: <USB 101001000 LAN Realtek> at usbus0, cfg=0 md=HOST spd=SUPER (5.0Gbps) pwr=ON (36mA) Configuration index 0 bLength = 0x0009 bDescriptorType = 0x0002 wTotalLength = 0x0039 bNumInterfaces = 0x0001 bConfigurationValue = 0x0001 iConfiguration = 0x0000 <no string> bmAttributes = 0x00a0 bMaxPower = 0x0012 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 Here is a copy of the configuration descriptors AFTER running the command: ugen0.3: <USB 101001000 LAN Realtek> at usbus0, cfg=1 md=HOST spd=SUPER (5.0Gbps) pwr=ON (36mA) Configuration index 1 bLength = 0x0009 bDescriptorType = 0x0002 wTotalLength = 0x0062 bNumInterfaces = 0x0002 bConfigurationValue = 0x0002 iConfiguration = 0x0000 <no string> bmAttributes = 0x00a0 bMaxPower = 0x0012 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 Regards, Ben
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOc73CBxtkx5BOxUxB4jq4FGW5tVLn=pcGwoAGO-DmucKCQKdg>