Thread (6 messages) 6 messages, 4 authors, 2022-01-14

RE: RTL8156(A|B) chip requires r8156 to be force loaded to operate

flat view

From: Hayes Wang <hidden>
Date: 2022-01-14 06:29:52
Also in: linux-usb

Jakub Kicinski [off-list ref]
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help