Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 895720 - sys-kernel/gentoo-sources-6.1.12 AX88179A does not work
Summary: sys-kernel/gentoo-sources-6.1.12 AX88179A does not work
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-21 12:13 UTC by Petr Bahula
Modified: 2023-03-20 09:03 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
config of 5.15.80 kernel (config.5.15.80,122.73 KB, text/plain)
2023-02-21 12:13 UTC, Petr Bahula
Details
config of 6.1.12 kernel (config.6.1.12,128.57 KB, text/plain)
2023-02-21 12:14 UTC, Petr Bahula
Details
dmesg with 5.15.80 kernel (dmesg.5.15.80,73.75 KB, text/plain)
2023-02-21 12:14 UTC, Petr Bahula
Details
dmesg with 6.1.12 kernel (dmesg.6.1.12,70.05 KB, text/plain)
2023-02-21 12:15 UTC, Petr Bahula
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Bahula 2023-02-21 12:13:29 UTC
Created attachment 853496 [details]
config of 5.15.80 kernel

After update from gentoo-sources-5.15.80 to gentoo-sources-6.1.12 the USB ETH card AX88179A which is in USB-C dock is not accessible as eth1.
New configuration was made through "make olddefconfig" and
 checked according https://linux-hardware.org/index.php?id=usb:0b95-1790.
In attachment are:
 config.5.15.80 and dmesg.5.15.80 with 5.15.80 kernel and
 config.6.1.12 and dmesg.6.1.12 with 6.1.12 kernel.
Comment 1 Petr Bahula 2023-02-21 12:14:10 UTC
Created attachment 853498 [details]
config of 6.1.12 kernel
Comment 2 Petr Bahula 2023-02-21 12:14:56 UTC
Created attachment 853500 [details]
dmesg with 5.15.80 kernel
Comment 3 Petr Bahula 2023-02-21 12:15:32 UTC
Created attachment 853502 [details]
dmesg with 6.1.12 kernel
Comment 4 Arisu Tachibana Gentoo Infrastructure gentoo-dev 2023-02-22 01:41:47 UTC
could you do a kernel git bisect?

https://wiki.gentoo.org/wiki/Kernel_git-bisect
Comment 5 Petr Bahula 2023-02-22 15:18:47 UTC
    !!! IMPORTANT !!!
If the HW is booted with good kernel and then rebooted (without losing power) to bad kernel, it will still work. Only if it is booted with bad kernel from cold state (total no power) then it will not work.

    bisect.log:
status: waiting for both good and bad commits
status: waiting for good commit(s), bad commit known
Bisecting: 46994 revisions left to test after this (roughly 16 steps)
[1a01a0751731c807c04e81d3c19c5b782d205af7] Merge git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf-next
Bisecting: 23494 revisions left to test after this (roughly 15 steps)
[9e2e5ea3b28f81512c792f30729edb1db0c21f6a] Merge tag 'usb-6.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Bisecting: 11785 revisions left to test after this (roughly 14 steps)
[4ad680f083ec360e0991c453e18a38ed9ae500d7] Merge tag 'staging-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
Bisecting: 5961 revisions left to test after this (roughly 13 steps)
[42df1cbf6a4726934cc5dac12bf263aa73c49fa3] Merge tag 'for-5.20/io_uring-zerocopy-send-2022-07-29' of git://git.kernel.dk/linux-block
Bisecting: 2911 revisions left to test after this (roughly 12 steps)
[f86d1fbbe7858884d6754534a0afbb74fc30bc26] Merge tag 'net-next-6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next
Bisecting: 1564 revisions left to test after this (roughly 11 steps)
[5030a9a03f0107f645772450bcba521b2ec19a51] dt-bindings: net: fsl,fec: Add nvmem-cells / nvmem-cell-names properties
Bisecting: 781 revisions left to test after this (roughly 10 steps)
[ab17c0cd376f240bb8ead6f03be2bb4748bbc61a] Merge tag 'efi-efivars-removal-for-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi
Bisecting: 391 revisions left to test after this (roughly 9 steps)
[6957730e20389a63eb333afb6fcf38b45f549ea8] Merge branch 'mtk_eth_soc-xdp-multi-frame'
Bisecting: 189 revisions left to test after this (roughly 8 steps)
[7c6327c77d509e78bff76f2a4551fcfee851682e] Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Bisecting: 106 revisions left to test after this (roughly 7 steps)
[63757225a93353bc2ce4499af5501eabdbbf23f9] Merge tag 'mlx5-updates-2022-07-28' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux
Bisecting: 53 revisions left to test after this (roughly 6 steps)
[ad3564ccc3670843c913b01ada77c167233bd5b5] dt-bindings: net: fsl,fec: Add i.MX8ULP FEC items
Bisecting: 26 revisions left to test after this (roughly 5 steps)
[c67cc4315a8e605ec875bd3a1210a549e3562ddc] net: usb: ax88179_178a: Bind only to vendor-specific interface
Bisecting: 10 revisions left to test after this (roughly 4 steps)
[9e98f8c7707f8bf4552806b17e42c54548d29527] Merge tag 'mlx5-fixes-2022-07-28' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux
Bisecting: 5 revisions left to test after this (roughly 3 steps)
[7dc839fe47611e6995f370cae37b9797cf7d2672] net: ice: fix error NETIF_F_HW_VLAN_CTAG_FILTER check in ice_vsi_sync_fltr()
Bisecting: 2 revisions left to test after this (roughly 2 steps)
[a41b17ff9dacd22f5f118ee53d82da0f3e52d5e3] dccp: put dccp_qpolicy_full() and dccp_qpolicy_push() in the same lock
Bisecting: 0 revisions left to test after this (roughly 1 step)
[f56530dcdb0684406661ac9f1accf48319d07600] net: usb: make USB_RTL8153_ECM non user configurable
c67cc4315a8e605ec875bd3a1210a549e3562ddc is the first bad commit
commit c67cc4315a8e605ec875bd3a1210a549e3562ddc
Author: Hector Martin <marcan@marcan.st>
Date:   Sun Jul 31 16:22:09 2022 +0900

    net: usb: ax88179_178a: Bind only to vendor-specific interface
    
    The Anker PowerExpand USB-C to Gigabit Ethernet adapter uses this
    chipset, but exposes CDC Ethernet configurations as well as the
    vendor specific one. This driver tries to bind by PID:VID
    unconditionally and ends up picking up the CDC configuration, which
    is supposed to be handled by the class driver. To make things even
    more confusing, it sees both of the CDC class interfaces and tries
    to bind twice, resulting in two broken Ethernet devices.
    
    Change all the ID matches to specifically match the vendor-specific
    interface. By default the device comes up in CDC mode and is bound by
    that driver (which works fine); users may switch it to the vendor
    interface using sysfs to set bConfigurationValue, at which point the
    device actually goes through a reconnect cycle and comes back as a
    vendor specific only device, and then this driver binds and works too.
    
    The affected device uses VID/PID 0b95:1790, but we might as well change
    all of them for good measure, since there is no good reason for this
    driver to bind to standard CDC Ethernet interfaces.
    
    v3: Added VID/PID info to commit message
    
    Signed-off-by: Hector Martin <marcan@marcan.st>
    Link: https://lore.kernel.org/r/20220731072209.45504-1-marcan@marcan.st
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>

 drivers/net/usb/ax88179_178a.c | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)
Comment 6 Petr Bahula 2023-02-22 16:07:29 UTC
I've reverted changes made in the c67cc4315a8e605ec875bd3a1210a549e3562ddc commit and gentoo-sources-6.1.12 works correctly now.
Comment 7 Mike Pagano gentoo-dev 2023-03-02 13:39:02 UTC
Can you show us the output of

ifconfig -a
Comment 8 Petr Bahula 2023-03-02 14:09:28 UTC
(In reply to Mike Pagano from comment #7)
> Can you show us the output of
> 
> ifconfig -a

My current status:
pet@petkub ~ $ uname -a
Linux petkub 6.1.12-gentoo #6 SMP PREEMPT_DYNAMIC Wed Feb 22 16:58:50 CET 2023 x86_64 AMD Ryzen 5 2500U with Radeon Vega Mobile Gfx AuthenticAMD GNU/Linux

pet@petkub ~ $  cat /etc/portage/patches/sys-kernel/gentoo-sources/ASIX_AX88179.patch 
--- a/drivers/net/usb/ax88179_178a.c    2022-12-11 23:15:18.000000000 +0100
+++ b/drivers/net/usb/ax88179_178a.c    2023-02-23 10:04:47.534060336 +0100
@@ -1844,7 +1844,8 @@
 static const struct usb_device_id products[] = {
 {
        /* ASIX AX88179 10/100/1000 */
-       USB_DEVICE_AND_INTERFACE_INFO(0x0b95, 0x1790, 0xff, 0xff, 0),
+       /*USB_DEVICE_AND_INTERFACE_INFO(0x0b95, 0x1790, 0xff, 0xff, 0),*/
+       USB_DEVICE(0x0b95, 0x1790),
        .driver_info = (unsigned long)&ax88179_info,
 }, {
        /* ASIX AX88178A 10/100/1000 */

pet@petkub ~ $ LANC=C LC_ALL=C ifconfig -a
br0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.100.254  netmask 255.255.255.0  broadcast 192.168.100.255
        ether b2:c4:b5:09:79:b8  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2  bytes 108 (108.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eth0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 8c:16:45:ea:73:ce  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 172.18.20.6  netmask 255.255.255.0  broadcast 172.18.20.255
        ether 34:29:8f:70:3b:37  txqueuelen 1000  (Ethernet)
        RX packets 596469  bytes 699744033 (667.3 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 463700  bytes 55366470 (52.8 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eth1.200: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 172.20.228.6  netmask 255.255.255.0  broadcast 172.20.228.255
        ether 34:29:8f:70:3b:37  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 2  bytes 140 (140.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2  bytes 140 (140.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4098<BROADCAST,MULTICAST>  mtu 1500
        ether 00:f4:8d:b3:3c:a7  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

pet@petkub ~ $

The eth1 is the ASIX AX88179.
The eth1 is missing (not existing) without the ASIX_AX88179.patch
Comment 9 Mike Pagano gentoo-dev 2023-03-02 15:03:20 UTC
(In reply to Petr Bahula from comment #8)
> (In reply to Mike Pagano from comment #7)
> > Can you show us the output of
> > 
> > ifconfig -a
> 
> My current status:
> pet@petkub ~ $ uname -a
> Linux petkub 6.1.12-gentoo #6 SMP PREEMPT_DYNAMIC Wed Feb 22 16:58:50 CET
> 2023 x86_64 AMD Ryzen 5 2500U with Radeon Vega Mobile Gfx AuthenticAMD
> GNU/Linux
> 
> pet@petkub ~ $  cat
> /etc/portage/patches/sys-kernel/gentoo-sources/ASIX_AX88179.patch 
> --- a/drivers/net/usb/ax88179_178a.c    2022-12-11 23:15:18.000000000 +0100
> +++ b/drivers/net/usb/ax88179_178a.c    2023-02-23 10:04:47.534060336 +0100
> @@ -1844,7 +1844,8 @@
>  static const struct usb_device_id products[] = {
>  {
>         /* ASIX AX88179 10/100/1000 */
> -       USB_DEVICE_AND_INTERFACE_INFO(0x0b95, 0x1790, 0xff, 0xff, 0),
> +       /*USB_DEVICE_AND_INTERFACE_INFO(0x0b95, 0x1790, 0xff, 0xff, 0),*/
> +       USB_DEVICE(0x0b95, 0x1790),
>         .driver_info = (unsigned long)&ax88179_info,
>  }, {
>         /* ASIX AX88178A 10/100/1000 */
> 
> pet@petkub ~ $ LANC=C LC_ALL=C ifconfig -a
> br0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
>         inet 192.168.100.254  netmask 255.255.255.0  broadcast
> 192.168.100.255
>         ether b2:c4:b5:09:79:b8  txqueuelen 1000  (Ethernet)
>         RX packets 0  bytes 0 (0.0 B)
>         RX errors 0  dropped 0  overruns 0  frame 0
>         TX packets 2  bytes 108 (108.0 B)
>         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
> 
> eth0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
>         ether 8c:16:45:ea:73:ce  txqueuelen 1000  (Ethernet)
>         RX packets 0  bytes 0 (0.0 B)
>         RX errors 0  dropped 0  overruns 0  frame 0
>         TX packets 0  bytes 0 (0.0 B)
>         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
> 
> eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
>         inet 172.18.20.6  netmask 255.255.255.0  broadcast 172.18.20.255
>         ether 34:29:8f:70:3b:37  txqueuelen 1000  (Ethernet)
>         RX packets 596469  bytes 699744033 (667.3 MiB)
>         RX errors 0  dropped 0  overruns 0  frame 0
>         TX packets 463700  bytes 55366470 (52.8 MiB)
>         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
> 
> eth1.200: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
>         inet 172.20.228.6  netmask 255.255.255.0  broadcast 172.20.228.255
>         ether 34:29:8f:70:3b:37  txqueuelen 1000  (Ethernet)
>         RX packets 0  bytes 0 (0.0 B)
>         RX errors 0  dropped 0  overruns 0  frame 0
>         TX packets 0  bytes 0 (0.0 B)
>         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
> 
> lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
>         inet 127.0.0.1  netmask 255.0.0.0
>         loop  txqueuelen 1000  (Local Loopback)
>         RX packets 2  bytes 140 (140.0 B)
>         RX errors 0  dropped 0  overruns 0  frame 0
>         TX packets 2  bytes 140 (140.0 B)
>         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
> 
> wlan0: flags=4098<BROADCAST,MULTICAST>  mtu 1500
>         ether 00:f4:8d:b3:3c:a7  txqueuelen 1000  (Ethernet)
>         RX packets 0  bytes 0 (0.0 B)
>         RX errors 0  dropped 0  overruns 0  frame 0
>         TX packets 0  bytes 0 (0.0 B)
>         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
> 
> pet@petkub ~ $
> 
> The eth1 is the ASIX AX88179.
> The eth1 is missing (not existing) without the ASIX_AX88179.patch

Sorry I should been more clear.

What's ifconfig -a without the patch ?
Comment 10 Petr Bahula 2023-03-03 09:26:31 UTC
(In reply to Mike Pagano from comment #9)
> (In reply to Petr Bahula from comment #8)
> > (In reply to Mike Pagano from comment #7)

> Sorry I should been more clear.
> 
> What's ifconfig -a without the patch ?

pet@petkub ~ $ LANG=C LC_ALL=C ifconfig -a
br0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.100.254  netmask 255.255.255.0  broadcast 192.168.100.255
        ether fe:1a:e5:d7:2b:f0  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2  bytes 108 (108.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eth0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 8c:16:45:ea:73:ce  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 2  bytes 140 (140.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2  bytes 140 (140.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4098<BROADCAST,MULTICAST>  mtu 1500
        ether 00:f4:8d:b3:3c:a7  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

pet@petkub ~ $
Comment 11 Petr Bahula 2023-03-20 09:03:45 UTC
Need CONFIG_USB_NET_CDC_NCM.
See https://bugzilla.kernel.org/show_bug.cgi?id=217204