[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1e6d7b8c3af444ae900fd4248f2a9d35@realtek.com>
Date: Fri, 14 Jan 2022 06:29:28 +0000
From: Hayes Wang <hayeswang@...ltek.com>
To: Jakub Kicinski <kuba@...nel.org>, Ryan Lahfa <ryan@...fa.xyz>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
Andreas Seiderer <x64multicore@...glemail.com>,
"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>
Subject: RE: RTL8156(A|B) chip requires r8156 to be force loaded to operate
Jakub Kicinski <kuba@...nel.org>
> Sent: Friday, January 14, 2022 12:17 PM
[...]
> Dunno much about USB but it seems the driver matches:
>
> USB_DEVICE_INTERFACE_CLASS(vend, prod, USB_CLASS_VENDOR_SPEC),
> \
>
> and
>
> USB_DEVICE_AND_INTERFACE_INFO(vend, prod, USB_CLASS_COMM, \
> USB_CDC_SUBCLASS_ETHERNET, USB_CDC_PROTO_NONE), \
>
> Both of these should match. Former because:
>
> Bus 002 Device 002: ID 0bda:8156 Realtek Semiconductor Corp. USB
> 10/100/1G/2.5G LAN
> [...]
> Interface Descriptor:
> bLength 9
> bDescriptorType 4
> bInterfaceNumber 0
> bAlternateSetting 0
> bNumEndpoints 3
> bInterfaceClass 255 Vendor Specific Class
> bInterfaceSubClass 255 Vendor Specific Subclass
>
> And the latter because of another config with:
>
> bInterfaceClass 2 Communications
> bInterfaceSubClass 6 Ethernet Networking
> bInterfaceProtocol 0
There are three configurations for RTL8156.
config #1: vendor mode (r8152)
config #2: NCM mode (cdc_ncm)
config #3: ECM mode (cdc_ether)
The USB core selects config #2 for default, so cdc_ncm is loaded.
If you plan to use vendor mode, you have to switch the configuration
to config #1. For example,
echo 1 > /sys/bus/usb/devices/2-7/bConfigurationValue
Best Regards,
Hayes
Powered by blists - more mailing lists