* RTL8156(A|B) chip requires r8156 to be force loaded to operate
@ 2021-12-24 20:30 Ryan Lahfa
2021-12-28 2:21 ` Jakub Kicinski
0 siblings, 1 reply; 6+ messages in thread
From: Ryan Lahfa @ 2021-12-24 20:30 UTC (permalink / raw)
To: netdev
Hi all,
I recently bought an USB-C 2.5Gbps external network card, which shows in
`lsusb` as:
> Bus 002 Device 003: ID 0bda:8156 Realtek Semiconductor Corp. USB 10/100/1G/2.5G LAN
By default, on my distribution (NixOS "21.11pre319254.b5182c214fa")'s
latest kernel (`pkgs.linuxPackages_latest`) which shows in `uname -nar`
as:
> Linux $machine 5.15.10 #1-NixOS SMP Fri Dec 17 09:30:17 UTC 2021 x86_64 GNU/Linux
The network card is loaded with `cdc_ncm` driver and is unable to detect
any carrier even when one is actually plugged in, I tried multiple
things, I confirmed independently that the carrier is working.
Through further investigations and with the help of a user on
Libera.Chat #networking channel, we blacklisted `cdc_ncm`, but nothing
get loaded in turn.
Then, I forced the usage of r8152 for the device 0bda:8156 using `echo
0bda 8156 > /sys/bus/usb/drivers/r8152/new_id`, and... miracle.
Everything just worked.
I am uncertain whether this falls in kernel's responsibility or not, it
seems indeed that my device is listed for r8152: https://github.com/torvalds/linux/blob/master/drivers/net/usb/r8152.c#L9790 introduced by this commit https://github.com/torvalds/linux/commit/195aae321c829dd1945900d75561e6aa79cce208 if I understand well, which is tagged for 5.15.
I am curious to see how difficult would that be to write a patch for
this and fix it, meanwhile, here is my modest contribution with this bug
report, hopefully, this is the right place for them.
Kind regards,
--
Ryan Lahfa
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: RTL8156(A|B) chip requires r8156 to be force loaded to operate
2021-12-24 20:30 RTL8156(A|B) chip requires r8156 to be force loaded to operate Ryan Lahfa
@ 2021-12-28 2:21 ` Jakub Kicinski
2021-12-30 0:03 ` Ryan Lahfa
2022-01-02 23:21 ` Andreas Seiderer
0 siblings, 2 replies; 6+ messages in thread
From: Jakub Kicinski @ 2021-12-28 2:21 UTC (permalink / raw)
To: Ryan Lahfa; +Cc: netdev, Hayes Wang
On Fri, 24 Dec 2021 21:30:18 +0100 Ryan Lahfa wrote:
> Hi all,
>
> I recently bought an USB-C 2.5Gbps external network card, which shows in
> `lsusb` as:
>
> > Bus 002 Device 003: ID 0bda:8156 Realtek Semiconductor Corp. USB 10/100/1G/2.5G LAN
>
> By default, on my distribution (NixOS "21.11pre319254.b5182c214fa")'s
> latest kernel (`pkgs.linuxPackages_latest`) which shows in `uname -nar`
> as:
>
> > Linux $machine 5.15.10 #1-NixOS SMP Fri Dec 17 09:30:17 UTC 2021 x86_64 GNU/Linux
>
> The network card is loaded with `cdc_ncm` driver and is unable to detect
> any carrier even when one is actually plugged in, I tried multiple
> things, I confirmed independently that the carrier is working.
>
> Through further investigations and with the help of a user on
> Libera.Chat #networking channel, we blacklisted `cdc_ncm`, but nothing
> get loaded in turn.
>
> Then, I forced the usage of r8152 for the device 0bda:8156 using `echo
> 0bda 8156 > /sys/bus/usb/drivers/r8152/new_id`, and... miracle.
> Everything just worked.
>
> I am uncertain whether this falls in kernel's responsibility or not, it
> seems indeed that my device is listed for r8152: https://github.com/torvalds/linux/blob/master/drivers/net/usb/r8152.c#L9790 introduced by this commit https://github.com/torvalds/linux/commit/195aae321c829dd1945900d75561e6aa79cce208 if I understand well, which is tagged for 5.15.
>
> I am curious to see how difficult would that be to write a patch for
> this and fix it, meanwhile, here is my modest contribution with this bug
> report, hopefully, this is the right place for them.
Can you please share the output of lsusb -d '0bda:8156' -vv ?
Adding Hayes to the CC list.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: RTL8156(A|B) chip requires r8156 to be force loaded to operate
2021-12-28 2:21 ` Jakub Kicinski
@ 2021-12-30 0:03 ` Ryan Lahfa
2022-01-14 4:17 ` Jakub Kicinski
2022-01-02 23:21 ` Andreas Seiderer
1 sibling, 1 reply; 6+ messages in thread
From: Ryan Lahfa @ 2021-12-30 0:03 UTC (permalink / raw)
To: Jakub Kicinski; +Cc: netdev, Hayes Wang
[-- Attachment #1: Type: text/plain, Size: 1848 bytes --]
On Mon, Dec 27, 2021 at 06:21:24PM -0800, Jakub Kicinski wrote:
> On Fri, 24 Dec 2021 21:30:18 +0100 Ryan Lahfa wrote:
> > Hi all,
> >
> > I recently bought an USB-C 2.5Gbps external network card, which shows in
> > `lsusb` as:
> >
> > > Bus 002 Device 003: ID 0bda:8156 Realtek Semiconductor Corp. USB 10/100/1G/2.5G LAN
> >
> > By default, on my distribution (NixOS "21.11pre319254.b5182c214fa")'s
> > latest kernel (`pkgs.linuxPackages_latest`) which shows in `uname -nar`
> > as:
> >
> > > Linux $machine 5.15.10 #1-NixOS SMP Fri Dec 17 09:30:17 UTC 2021 x86_64 GNU/Linux
> >
> > The network card is loaded with `cdc_ncm` driver and is unable to detect
> > any carrier even when one is actually plugged in, I tried multiple
> > things, I confirmed independently that the carrier is working.
> >
> > Through further investigations and with the help of a user on
> > Libera.Chat #networking channel, we blacklisted `cdc_ncm`, but nothing
> > get loaded in turn.
> >
> > Then, I forced the usage of r8152 for the device 0bda:8156 using `echo
> > 0bda 8156 > /sys/bus/usb/drivers/r8152/new_id`, and... miracle.
> > Everything just worked.
> >
> > I am uncertain whether this falls in kernel's responsibility or not, it
> > seems indeed that my device is listed for r8152: https://github.com/torvalds/linux/blob/master/drivers/net/usb/r8152.c#L9790 introduced by this commit https://github.com/torvalds/linux/commit/195aae321c829dd1945900d75561e6aa79cce208 if I understand well, which is tagged for 5.15.
> >
> > I am curious to see how difficult would that be to write a patch for
> > this and fix it, meanwhile, here is my modest contribution with this bug
> > report, hopefully, this is the right place for them.
>
> Can you please share the output of lsusb -d '0bda:8156' -vv ?
Here it is, attached.
Kind regards,
--
Ryan Lahfa
[-- Attachment #2: lsusb_output --]
[-- Type: text/plain, Size: 9612 bytes --]
Bus 002 Device 006: ID 0bda:8156 Realtek Semiconductor Corp. USB 10/100/1G/2.5G LAN
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 3.20
bDeviceClass 0
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 9
idVendor 0x0bda Realtek Semiconductor Corp.
idProduct 0x8156
bcdDevice 31.04
iManufacturer 1 Realtek
iProduct 2 USB 10/100/1G/2.5G LAN
iSerial 6 401000001
bNumConfigurations 3
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x0039
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xa0
(Bus Powered)
Remote Wakeup
MaxPower 256mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 3
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 255 Vendor Specific Subclass
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0400 1x 1024 bytes
bInterval 0
bMaxBurst 3
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0400 1x 1024 bytes
bInterval 0
bMaxBurst 3
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0002 1x 2 bytes
bInterval 11
bMaxBurst 0
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x0068
bNumInterfaces 2
bConfigurationValue 2
iConfiguration 0
bmAttributes 0xa0
(Bus Powered)
Remote Wakeup
MaxPower 256mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 2 Communications
bInterfaceSubClass 13
bInterfaceProtocol 0
iInterface 5 CDC Communications Control
CDC Header:
bcdCDC 1.10
CDC Union:
bMasterInterface 0
bSlaveInterface 1
CDC Ethernet:
iMacAddress 3 00E04C680590
bmEthernetStatistics 0x0031501f
wMaxSegmentSize 1518
wNumberMCFilters 0x8000
bNumberPowerFilters 0
CDC NCM:
bcdNcmVersion 1.00
bmNetworkCapabilities 0x2b
8-byte ntb input size
max datagram size
net address
packet filter
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0010 1x 16 bytes
bInterval 11
bMaxBurst 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 10 CDC Data
bInterfaceSubClass 0
bInterfaceProtocol 1
iInterface 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 1
bNumEndpoints 2
bInterfaceClass 10 CDC Data
bInterfaceSubClass 0
bInterfaceProtocol 1
iInterface 4 Ethernet Data
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0400 1x 1024 bytes
bInterval 0
bMaxBurst 3
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0400 1x 1024 bytes
bInterval 0
bMaxBurst 3
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x0062
bNumInterfaces 2
bConfigurationValue 3
iConfiguration 0
bmAttributes 0xa0
(Bus Powered)
Remote Wakeup
MaxPower 256mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 2 Communications
bInterfaceSubClass 6 Ethernet Networking
bInterfaceProtocol 0
iInterface 5 CDC Communications Control
CDC Header:
bcdCDC 1.10
CDC Union:
bMasterInterface 0
bSlaveInterface 1
CDC Ethernet:
iMacAddress 3 00E04C680590
bmEthernetStatistics 0x0031501f
wMaxSegmentSize 1518
wNumberMCFilters 0x8000
bNumberPowerFilters 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0010 1x 16 bytes
bInterval 11
bMaxBurst 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 10 CDC Data
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 1
bNumEndpoints 2
bInterfaceClass 10 CDC Data
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 4 Ethernet Data
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0400 1x 1024 bytes
bInterval 0
bMaxBurst 3
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0400 1x 1024 bytes
bInterval 0
bMaxBurst 3
Binary Object Store Descriptor:
bLength 5
bDescriptorType 15
wTotalLength 0x0016
bNumDeviceCaps 2
USB 2.0 Extension Device Capability:
bLength 7
bDescriptorType 16
bDevCapabilityType 2
bmAttributes 0x00000002
HIRD Link Power Management (LPM) Supported
SuperSpeed USB Device Capability:
bLength 10
bDescriptorType 16
bDevCapabilityType 3
bmAttributes 0x02
Latency Tolerance Messages (LTM) Supported
wSpeedsSupported 0x000e
Device can operate at Full Speed (12Mbps)
Device can operate at High Speed (480Mbps)
Device can operate at SuperSpeed (5Gbps)
bFunctionalitySupport 2
Lowest fully-functional device speed is High Speed (480Mbps)
bU1DevExitLat 10 micro seconds
bU2DevExitLat 2047 micro seconds
Device Status: 0x001c
(Bus Powered)
U1 Enabled
U2 Enabled
Latency Tolerance Messaging (LTM) Enabled
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: RTL8156(A|B) chip requires r8156 to be force loaded to operate
2021-12-28 2:21 ` Jakub Kicinski
2021-12-30 0:03 ` Ryan Lahfa
@ 2022-01-02 23:21 ` Andreas Seiderer
1 sibling, 0 replies; 6+ messages in thread
From: Andreas Seiderer @ 2022-01-02 23:21 UTC (permalink / raw)
To: Jakub Kicinski, Ryan Lahfa; +Cc: netdev, Hayes Wang
On 28 Dec 2021 03:21 Jakub Kicinski wrote:
> On Fri, 24 Dec 2021 21:30:18 +0100 Ryan Lahfa wrote:
>> Hi all,
>>
>> I recently bought an USB-C 2.5Gbps external network card, which shows in
>> `lsusb` as:
>>
>>> Bus 002 Device 003: ID 0bda:8156 Realtek Semiconductor Corp. USB 10/100/1G/2.5G LAN
>> By default, on my distribution (NixOS "21.11pre319254.b5182c214fa")'s
>> latest kernel (`pkgs.linuxPackages_latest`) which shows in `uname -nar`
>> as:
>>
>>> Linux $machine 5.15.10 #1-NixOS SMP Fri Dec 17 09:30:17 UTC 2021 x86_64 GNU/Linux
>> The network card is loaded with `cdc_ncm` driver and is unable to detect
>> any carrier even when one is actually plugged in, I tried multiple
>> things, I confirmed independently that the carrier is working.
>>
>> Through further investigations and with the help of a user on
>> Libera.Chat #networking channel, we blacklisted `cdc_ncm`, but nothing
>> get loaded in turn.
>>
>> Then, I forced the usage of r8152 for the device 0bda:8156 using `echo
>> 0bda 8156 > /sys/bus/usb/drivers/r8152/new_id`, and... miracle.
>> Everything just worked.
>>
>> I am uncertain whether this falls in kernel's responsibility or not, it
>> seems indeed that my device is listed for r8152: https://github.com/torvalds/linux/blob/master/drivers/net/usb/r8152.c#L9790 introduced by this commit https://github.com/torvalds/linux/commit/195aae321c829dd1945900d75561e6aa79cce208 if I understand well, which is tagged for 5.15.
>>
>> I am curious to see how difficult would that be to write a patch for
>> this and fix it, meanwhile, here is my modest contribution with this bug
>> report, hopefully, this is the right place for them.
> Can you please share the output of lsusb -d '0bda:8156' -vv ?
>
> Adding Hayes to the CC list.
>
Hi,
I recently faced a similar problem and it could be caused by some energy
saving function of TLP. Please see the solution at:
https://forum.manjaro.org/t/no-carrier-network-link-problem-with-usb-2-5-gbit-lan-adapter-realtek-rtl8156b-on-x86-64/97195
I hope this is helpful for you.
Best regards,
Andreas Seiderer
PS: I post you the output of lsusb of my LAN adapter (MAC address
changed) if you still need it:
Bus 002 Device 002: ID 0bda:8156 Realtek Semiconductor Corp. USB
10/100/1G/2.5G LAN
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 3.20
bDeviceClass 0
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 9
idVendor 0x0bda Realtek Semiconductor Corp.
idProduct 0x8156
bcdDevice 31.00
iManufacturer 1 Realtek
iProduct 2 USB 10/100/1G/2.5G LAN
iSerial 6 001000001
bNumConfigurations 3
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x0039
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xa0
(Bus Powered)
Remote Wakeup
MaxPower 256mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 3
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 255 Vendor Specific Subclass
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0400 1x 1024 bytes
bInterval 0
bMaxBurst 3
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0400 1x 1024 bytes
bInterval 0
bMaxBurst 3
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0002 1x 2 bytes
bInterval 11
bMaxBurst 0
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x0068
bNumInterfaces 2
bConfigurationValue 2
iConfiguration 0
bmAttributes 0xa0
(Bus Powered)
Remote Wakeup
MaxPower 256mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 2 Communications
bInterfaceSubClass 13
bInterfaceProtocol 0
iInterface 5 CDC Communications Control
CDC Header:
bcdCDC 1.10
CDC Union:
bMasterInterface 0
bSlaveInterface 1
CDC Ethernet:
iMacAddress 3 00E04CXXXXXX
bmEthernetStatistics 0x0031501f
wMaxSegmentSize 1518
wNumberMCFilters 0x8000
bNumberPowerFilters 0
CDC NCM:
bcdNcmVersion 1.00
bmNetworkCapabilities 0x2b
8-byte ntb input size
max datagram size
net address
packet filter
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0010 1x 16 bytes
bInterval 11
bMaxBurst 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 10 CDC Data
bInterfaceSubClass 0
bInterfaceProtocol 1
iInterface 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 1
bNumEndpoints 2
bInterfaceClass 10 CDC Data
bInterfaceSubClass 0
bInterfaceProtocol 1
iInterface 4 Ethernet Data
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0400 1x 1024 bytes
bInterval 0
bMaxBurst 3
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0400 1x 1024 bytes
bInterval 0
bMaxBurst 3
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x0062
bNumInterfaces 2
bConfigurationValue 3
iConfiguration 0
bmAttributes 0xa0
(Bus Powered)
Remote Wakeup
MaxPower 256mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 2 Communications
bInterfaceSubClass 6 Ethernet Networking
bInterfaceProtocol 0
iInterface 5 CDC Communications Control
CDC Header:
bcdCDC 1.10
CDC Union:
bMasterInterface 0
bSlaveInterface 1
CDC Ethernet:
iMacAddress 3 00E04CXXXXXX
bmEthernetStatistics 0x0031501f
wMaxSegmentSize 1518
wNumberMCFilters 0x8000
bNumberPowerFilters 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0010 1x 16 bytes
bInterval 11
bMaxBurst 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 10 CDC Data
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 1
bNumEndpoints 2
bInterfaceClass 10 CDC Data
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 4 Ethernet Data
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0400 1x 1024 bytes
bInterval 0
bMaxBurst 3
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0400 1x 1024 bytes
bInterval 0
bMaxBurst 3
Binary Object Store Descriptor:
bLength 5
bDescriptorType 15
wTotalLength 0x0016
bNumDeviceCaps 2
USB 2.0 Extension Device Capability:
bLength 7
bDescriptorType 16
bDevCapabilityType 2
bmAttributes 0x00000002
HIRD Link Power Management (LPM) Supported
SuperSpeed USB Device Capability:
bLength 10
bDescriptorType 16
bDevCapabilityType 3
bmAttributes 0x02
Latency Tolerance Messages (LTM) Supported
wSpeedsSupported 0x000e
Device can operate at Full Speed (12Mbps)
Device can operate at High Speed (480Mbps)
Device can operate at SuperSpeed (5Gbps)
bFunctionalitySupport 2
Lowest fully-functional device speed is High Speed (480Mbps)
bU1DevExitLat 10 micro seconds
bU2DevExitLat 2047 micro seconds
can't get debug descriptor: Resource temporarily unavailable
Device Status: 0x0000
(Bus Powered)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: RTL8156(A|B) chip requires r8156 to be force loaded to operate
2021-12-30 0:03 ` Ryan Lahfa
@ 2022-01-14 4:17 ` Jakub Kicinski
2022-01-14 6:29 ` Hayes Wang
0 siblings, 1 reply; 6+ messages in thread
From: Jakub Kicinski @ 2022-01-14 4:17 UTC (permalink / raw)
To: Ryan Lahfa; +Cc: netdev, Hayes Wang, Andreas Seiderer, linux-usb
On Thu, 30 Dec 2021 01:03:38 +0100 Ryan Lahfa wrote:
> On Mon, Dec 27, 2021 at 06:21:24PM -0800, Jakub Kicinski wrote:
> > On Fri, 24 Dec 2021 21:30:18 +0100 Ryan Lahfa wrote:
> > > The network card is loaded with `cdc_ncm` driver and is unable to detect
> > > any carrier even when one is actually plugged in, I tried multiple
> > > things, I confirmed independently that the carrier is working.
> > >
> > > Through further investigations and with the help of a user on
> > > Libera.Chat #networking channel, we blacklisted `cdc_ncm`, but nothing
> > > get loaded in turn.
> > >
> > > Then, I forced the usage of r8152 for the device 0bda:8156 using `echo
> > > 0bda 8156 > /sys/bus/usb/drivers/r8152/new_id`, and... miracle.
> > > Everything just worked.
> > >
> > > I am uncertain whether this falls in kernel's responsibility or not, it
> > > seems indeed that my device is listed for r8152: https://github.com/torvalds/linux/blob/master/drivers/net/usb/r8152.c#L9790 introduced by this commit https://github.com/torvalds/linux/commit/195aae321c829dd1945900d75561e6aa79cce208 if I understand well, which is tagged for 5.15.
> > >
> > > I am curious to see how difficult would that be to write a patch for
> > > this and fix it, meanwhile, here is my modest contribution with this bug
> > > report, hopefully, this is the right place for them.
> >
> > Can you please share the output of lsusb -d '0bda:8156' -vv ?
>
> Here it is, attached.
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
Let's CC linux-usb@ - any ideas?
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: RTL8156(A|B) chip requires r8156 to be force loaded to operate
2022-01-14 4:17 ` Jakub Kicinski
@ 2022-01-14 6:29 ` Hayes Wang
0 siblings, 0 replies; 6+ messages in thread
From: Hayes Wang @ 2022-01-14 6:29 UTC (permalink / raw)
To: Jakub Kicinski, Ryan Lahfa; +Cc: netdev, Andreas Seiderer, linux-usb
Jakub Kicinski <kuba@kernel.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
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-01-14 6:29 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-24 20:30 RTL8156(A|B) chip requires r8156 to be force loaded to operate Ryan Lahfa
2021-12-28 2:21 ` Jakub Kicinski
2021-12-30 0:03 ` Ryan Lahfa
2022-01-14 4:17 ` Jakub Kicinski
2022-01-14 6:29 ` Hayes Wang
2022-01-02 23:21 ` Andreas Seiderer
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.