lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220113201720.3aa6cb0f@kicinski-fedora-PC1C0HJN.hsd1.ca.comcast.net>
Date:   Thu, 13 Jan 2022 20:17:20 -0800
From:   Jakub Kicinski <kuba@...nel.org>
To:     Ryan Lahfa <ryan@...fa.xyz>
Cc:     netdev@...r.kernel.org, Hayes Wang <hayeswang@...ltek.com>,
        Andreas Seiderer <x64multicore@...glemail.com>,
        linux-usb@...r.kernel.org
Subject: Re: RTL8156(A|B) chip requires r8156 to be force loaded to operate

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?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ