106
22.1 Legacy Series / Re: Strange behaviour with realtek USB NIC
« on: March 17, 2022, 09:15:40 pm »
I did some more investigation and found out that the Realtek 8153 chipset family provide two different interfaces. The vendor specific which is the default one when connecting the USB ethernet adapter. The second is based on USB CDC-ECM (USB Communications Device Class - Ethernet Control Model). The second interface mode can be selected by configuring the device to the second USB configuration set (see link, Ch. 6.1.1).
The ECM based interface works well and is used in conjunction with another driver ("if_cdce" instead of "if_ure"). According to its doucmentation the vendor specific interface can perform better than the ECM interface. But for my connected printer it doesn't matter.
In my case the following command sets the device (ugen0.2) into ECM mode:
For permanently setting the device into this mode usb_quirks helps out. The following line needs to be added to configuration file /boot/loader.conf.local:
Details of the configuration string can be found in the manpage of "usb_quirk"
The ECM based interface works well and is used in conjunction with another driver ("if_cdce" instead of "if_ure"). According to its doucmentation the vendor specific interface can perform better than the ECM interface. But for my connected printer it doesn't matter.
In my case the following command sets the device (ugen0.2) into ECM mode:
Code: [Select]
$ usbconfig -d 0.2 set_config 1
For permanently setting the device into this mode usb_quirks helps out. The following line needs to be added to configuration file /boot/loader.conf.local:
Code: [Select]
hw.usb.quirk.0="0x0bda 0x8153 0 0xffff UQ_CFG_INDEX_1"
Details of the configuration string can be found in the manpage of "usb_quirk"