Bug 228436 - please add tp-link usb ethernet device quirk
Summary: please add tp-link usb ethernet device quirk
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: usb (show other bugs)
Version: 11.1-RELEASE
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-usb (Nobody)
URL:
Keywords: easy, needs-patch
Depends on:
Blocks:
 
Reported: 2018-05-23 10:28 UTC by Axel Scheepers
Modified: 2019-02-18 06:32 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Axel Scheepers 2018-05-23 10:28:42 UTC
Dear maintainer,

I have two tp-link usb ethernet adapters which require set_config 1 to work, it would be nice if these could be added to the kernel.

% sudo usbconfig -d ugen0.4 dump_device_desc
ugen0.4: <TP-LINK USB 10100 LAN> at usbus0, 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 = 0x2357 
  idProduct = 0x0602 
  bcdDevice = 0x2000 
  iManufacturer = 0x0001  <TP-LINK>
  iProduct = 0x0002  <USB 10/100 LAN>
  iSerialNumber = 0x0003  <98DED0139A56>
  bNumConfigurations = 0x0002 

% sudo usbconfig -d ugen0.4 set_config 1
% ifconfig ue0
ue0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether 98:de:d0:13:9a:56
        hwaddr 98:de:d0:13:9a:56
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>


and the gigabit variant:
% sudo usbconfig -d ugen0.4 dump_device_desc
ugen0.4: <TP-LINK USB 101001000 LAN> at usbus0, cfg=0 md=HOST spd=SUPER (5.0Gbps) pwr=ON (64mA)

  bLength = 0x0012 
  bDescriptorType = 0x0001 
  bcdUSB = 0x0300 
  bDeviceClass = 0x0000  <Probed by interface class>
  bDeviceSubClass = 0x0000 
  bDeviceProtocol = 0x0000 
  bMaxPacketSize0 = 0x0009 
  idVendor = 0x2357 
  idProduct = 0x0601 
  bcdDevice = 0x3000 
  iManufacturer = 0x0001  <TP-LINK>
  iProduct = 0x0002  <USB 10/100/1000 LAN>
  iSerialNumber = 0x0006  <000001000000>
  bNumConfigurations = 0x0002

% sudo usbconfig -d ugen0.4 set_config 1
% ifconfig ue0
ue0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether d4:6e:0e:1f:a6:40
        hwaddr d4:6e:0e:1f:a6:40
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>


Kind regards,

Axel Scheepers
Comment 1 Hans Petter Selasky freebsd_committer freebsd_triage 2018-05-24 09:55:55 UTC
Hi,

Can you make a patch for:

sys/dev/usb/usbdevs

and

sys/dev/usb/quirk/usb_quirk.c

Follow the examples here:

https://svnweb.freebsd.org/base/head/sys/dev/usb/quirk/usb_quirk.c?view=log

--HPS