Bug#1061095: linux-image-6.6.11-amd64: 2.5gbit USB device with r8152 chipset only does 100baset

2024-02-12 Thread Ben Hutchings
Control: tag -1 moreinfo

On Thu, 2024-01-18 at 13:42 +1100, Russell Coker wrote:
> Package: src:linux
> Version: 6.6.11-1
> Severity: normal
> Tags: upstream
> 
> [51076.208113] r8152-cfgselector 2-1: reset SuperSpeed USB device number 6 
> using xhci_hcd
> [51076.236596] r8152 2-1:1.0: firmware: direct-loading firmware 
> rtl_nic/rtl8156b-2.fw
> [51076.258622] r8152 2-1:1.0: ram code speedup mode fail
> [51076.258647] r8152 2-1:1.0: load rtl8156b-2 v2 04/27/23 successfully
> [51076.301913] r8152 2-1:1.0 eth0: v1.12.13
> [51076.697896] r8152 2-1:1.0 usb2.5g: renamed from eth0
> [51079.489807] r8152 2-1:1.0 usb2.5g: carrier on
> [51079.745192] r8152 2-1:1.0 usb2.5g: carrier off
> [51082.561105] r8152 2-1:1.0 usb2.5g: carrier on
> [51152.705733] r8152 2-1:1.0 usb2.5g: carrier off
> [51156.353013] r8152-cfgselector 2-1: USB disconnect, device number 6
> [51156.353455] xhci_hcd :00:14.0: WARN Set TR Deq Ptr cmd failed due to 
> incorrect slot or ep state.
> [51156.353492] r8152 2-1:1.0 usb2.5g: Stop submitting intr, status -108
> 
> Above is the relevant kernel message logs.
> 
> # mii-tool usb2.5g
> usb2.5g: 100 Mbit, half duplex, link ok

You should not use mii-tool for this; it only works speeds up to
1 Gbit (and even then only with some PHYs).  Please provide information
from ethtool.

> Above is the output of mii-tool, also the lights on the switch indicate
> 100mbit speed.   It gets 100mbit on a 1000baset switch too, so it's not a
> switch issue.
> 
> [66653.451043] cdc_ncm 2-1.2:2.0 enx00e04c680225: renamed from eth0
> [66656.811499] cdc_ncm 2-1.2:2.0 enx00e04c680225: 2500 mbit/s downlink 2500 
> mbit/s uplink
> [66657.067647] IPv6: ADDRCONF(NETDEV_CHANGE): enx00e04c680225: link becomes 
> ready
> [66657.323360] cdc_ncm 2-1.2:2.0 enx00e04c680225: 2500 mbit/s downlink 2500 
> mbit/s uplink
> [66657.835395] cdc_ncm 2-1.2:2.0 enx00e04c680225: 2500 mbit/s downlink 2500 
> mbit/s uplink
> [66658.347355] cdc_ncm 2-1.2:2.0 enx00e04c680225: 2500 mbit/s downlink 2500 
> mbit/s uplink
> [66658.859227] cdc_ncm 2-1.2:2.0 enx00e04c680225: 2500 mbit/s downlink 2500 
> mbit/s uplink
> [66659.371242] cdc_ncm 2-1.2:2.0 enx00e04c680225: 2500 mbit/s downlink 2500 
> mbit/s uplink
> [66659.883190] cdc_ncm 2-1.2:2.0 enx00e04c680225: 2500 mbit/s downlink 2500 
> mbit/s uplink
> 
> Above is the dmesg output from a LicheePi4A running the
> 5.10.113-g387b6863253c-dirty kernel it ships with, when it does this the
> switch LEDs indicate that it's 2500 speed.  This indicates that it's not
> a problem with the hardware in the USB device but a problem with the kernel.
> 
> # ethtool usb2.5g
> Settings for usb2.5g:
>   Supported ports: [  ]
>   Supported link modes:   Not reported

!!

>   Supported pause frame use: No
>   Supports auto-negotiation: No
>   Supported FEC modes: Not reported
>   Advertised link modes:  Not reported
>   Advertised pause frame use: No
>   Advertised auto-negotiation: No
>   Advertised FEC modes: Not reported
>   Speed: 1000Mb/s
>   Duplex: Half
>   Auto-negotiation: off

!!

>   Port: Twisted Pair
>   PHYAD: 0
>   Transceiver: internal
>   MDI-X: Unknown
> Current message level: 0x0007 (7)
>drv probe link
>   Link detected: yes
> 
> Above is the output of running ethtool on a Debian/Stable system running
> kernel 6.1.0-13-amd64.

Is this using the cdc-ncm or r8152 driver?

> Half duplex is a problem, but less of a problem than
> 100baseT.  This is a regression from Debian/Stable.

The above also looks very broken, so I would hesitate to say that this
has regressed as opposed to showing different symptoms.

Ben.

-- 
Ben Hutchings
It is easier to change the specification to fit the program
than vice versa.



signature.asc
Description: This is a digitally signed message part


Bug#1061095: linux-image-6.6.11-amd64: 2.5gbit USB device with r8152 chipset only does 100baset

2024-01-17 Thread Russell Coker
Package: src:linux
Version: 6.6.11-1
Severity: normal
Tags: upstream

[51076.208113] r8152-cfgselector 2-1: reset SuperSpeed USB device number 6 
using xhci_hcd
[51076.236596] r8152 2-1:1.0: firmware: direct-loading firmware 
rtl_nic/rtl8156b-2.fw
[51076.258622] r8152 2-1:1.0: ram code speedup mode fail
[51076.258647] r8152 2-1:1.0: load rtl8156b-2 v2 04/27/23 successfully
[51076.301913] r8152 2-1:1.0 eth0: v1.12.13
[51076.697896] r8152 2-1:1.0 usb2.5g: renamed from eth0
[51079.489807] r8152 2-1:1.0 usb2.5g: carrier on
[51079.745192] r8152 2-1:1.0 usb2.5g: carrier off
[51082.561105] r8152 2-1:1.0 usb2.5g: carrier on
[51152.705733] r8152 2-1:1.0 usb2.5g: carrier off
[51156.353013] r8152-cfgselector 2-1: USB disconnect, device number 6
[51156.353455] xhci_hcd :00:14.0: WARN Set TR Deq Ptr cmd failed due to 
incorrect slot or ep state.
[51156.353492] r8152 2-1:1.0 usb2.5g: Stop submitting intr, status -108

Above is the relevant kernel message logs.

# mii-tool usb2.5g
usb2.5g: 100 Mbit, half duplex, link ok

Above is the output of mii-tool, also the lights on the switch indicate
100mbit speed.   It gets 100mbit on a 1000baset switch too, so it's not a
switch issue.

[66653.451043] cdc_ncm 2-1.2:2.0 enx00e04c680225: renamed from eth0
[66656.811499] cdc_ncm 2-1.2:2.0 enx00e04c680225: 2500 mbit/s downlink 2500 
mbit/s uplink
[66657.067647] IPv6: ADDRCONF(NETDEV_CHANGE): enx00e04c680225: link becomes 
ready
[66657.323360] cdc_ncm 2-1.2:2.0 enx00e04c680225: 2500 mbit/s downlink 2500 
mbit/s uplink
[66657.835395] cdc_ncm 2-1.2:2.0 enx00e04c680225: 2500 mbit/s downlink 2500 
mbit/s uplink
[66658.347355] cdc_ncm 2-1.2:2.0 enx00e04c680225: 2500 mbit/s downlink 2500 
mbit/s uplink
[66658.859227] cdc_ncm 2-1.2:2.0 enx00e04c680225: 2500 mbit/s downlink 2500 
mbit/s uplink
[66659.371242] cdc_ncm 2-1.2:2.0 enx00e04c680225: 2500 mbit/s downlink 2500 
mbit/s uplink
[66659.883190] cdc_ncm 2-1.2:2.0 enx00e04c680225: 2500 mbit/s downlink 2500 
mbit/s uplink

Above is the dmesg output from a LicheePi4A running the
5.10.113-g387b6863253c-dirty kernel it ships with, when it does this the
switch LEDs indicate that it's 2500 speed.  This indicates that it's not
a problem with the hardware in the USB device but a problem with the kernel.

# ethtool usb2.5g
Settings for usb2.5g:
Supported ports: [  ]
Supported link modes:   Not reported
Supported pause frame use: No
Supports auto-negotiation: No
Supported FEC modes: Not reported
Advertised link modes:  Not reported
Advertised pause frame use: No
Advertised auto-negotiation: No
Advertised FEC modes: Not reported
Speed: 1000Mb/s
Duplex: Half
Auto-negotiation: off
Port: Twisted Pair
PHYAD: 0
Transceiver: internal
MDI-X: Unknown
Current message level: 0x0007 (7)
   drv probe link
Link detected: yes

Above is the output of running ethtool on a Debian/Stable system running
kernel 6.1.0-13-amd64.  Half duplex is a problem, but less of a problem than
100baseT.  This is a regression from Debian/Stable.

-- Package-specific info:
** Version:
Linux version 6.6.11-amd64 (debian-ker...@lists.debian.org) (gcc-13 (Debian 
13.2.0-9) 13.2.0, GNU ld (GNU Binutils for Debian) 2.41.50.20231227) #1 SMP 
PREEMPT_DYNAMIC Debian 6.6.11-1 (2024-01-14)

** Command line:
BOOT_IMAGE=/vmlinuz-6.6.11-amd64 root=UUID=3ff23875-d2db-43c2-ae7c-a8ead11e9e04 
ro kaslr pti=on slab_nomerge page_poison=1 slub_debug=FPZ nosmt intel_iommu=on 
security=selinux zswap.enabled=1 zswap.zpool=z3fold enforcing=0

** Not tainted

** Kernel log:
Unable to read kernel log; any relevant messages should be attached

** Model information

** Loaded modules:
cpuid
nft_chain_nat
xt_MASQUERADE
nf_nat
nf_conntrack
nf_defrag_ipv6
nf_defrag_ipv4
nft_compat
nf_tables
r8153_ecm
r8152
hid_generic
snd_usb_audio
snd_usbmidi_lib
snd_rawmidi
mc
usbhid
ccm
rfcomm
snd_seq_dummy
snd_hrtimer
snd_seq
snd_seq_device
cmac
algif_hash
algif_skcipher
af_alg
bnep
uinput
btusb
btrtl
btintel
btbcm
btmtk
bluetooth
cdc_mbim
cdc_wdm
cdc_ncm
qcserial
cdc_ether
usb_wwan
usbnet
usbserial
mii
ecdh_generic
snd_sof_pci_intel_skl
snd_sof_intel_hda_common
soundwire_intel
binfmt_misc
soundwire_generic_allocation
snd_sof_intel_hda_mlink
iwlmvm
soundwire_cadence
snd_sof_intel_hda
snd_sof_pci
snd_sof_xtensa_dsp
snd_sof
snd_sof_utils
intel_rapl_msr
soundwire_bus
intel_rapl_common
snd_soc_avs
nls_ascii
intel_pmc_core_pltdrv
snd_soc_hda_codec
intel_pmc_core
mac80211
snd_soc_skl
x86_pkg_temp_thermal
nls_cp437
intel_powerclamp
coretemp
vfat
snd_soc_hdac_hda
fat
kvm_intel
snd_hda_ext_core
snd_hda_codec_hdmi
snd_soc_sst_ipc
snd_soc_sst_dsp
intel_xhci_usb_role_switch
snd_soc_acpi_intel_match
kvm
snd_ctl_led
snd_soc_acpi
libarc4
snd_hda_codec_conexant
snd_soc_core
snd_hda_codec_generic
ext4
iwlwifi
irqbypass
snd_compress
crc32_pclmul
snd_pcm_dmaengine
xhci_pci
snd_hda_intel
ghash_clmulni_intel
crc16