Bug#988966: /boot/vmlinuz-5.10.0-6-armmp-lpae: lamobo-r1 ethernet/bridge failure

2022-12-15 Thread Andrey Jr. Melnikov
Source: linux
Followup-For: Bug #988966
X-Debbugs-Cc: temnota...@gmail.com


Hmm. it's woking as intented with kernel from unstable:

# dmesg | grep -E '(dwmac|bcm5|model)'
[0.00] OF: fdt: Machine model: Lamobo R1.1
[   11.746088] sun7i-dwmac 1c5.ethernet: IRQ eth_wake_irq not found
[   11.755334] sun7i-dwmac 1c5.ethernet: IRQ eth_lpi not found
[   11.785153] sun7i-dwmac 1c5.ethernet: PTP uses main clock
[   11.805181] sun7i-dwmac 1c5.ethernet: Version ID not available
[   11.811698] sun7i-dwmac 1c5.ethernet:DWMAC1000
[   11.816825] sun7i-dwmac 1c5.ethernet: No HW DMA feature register 
supported
[   11.824154] sun7i-dwmac 1c5.ethernet: TX Checksum insertion supported
[   11.831067] sun7i-dwmac 1c5.ethernet: Normal descriptors
[   11.836812] sun7i-dwmac 1c5.ethernet: Ring mode enabled
[   12.812030] bcm53xx stmmac-0:1e: found switch: BCM53125, rev 4
[   13.149519] bcm53xx stmmac-0:1e: Using legacy PHYLIB callbacks. Please 
migrate to PHYLINK!
[   13.181089] bcm53xx stmmac-0:1e: Configured port 8 for rgmii-txid
[   13.199161] bcm53xx stmmac-0:1e lan2 (uninitialized): PHY [dsa-0.0:00] 
driver [Broadcom BCM53125] (irq=POLL)
[   13.219947] bcm53xx stmmac-0:1e lan3 (uninitialized): PHY [dsa-0.0:01] 
driver [Broadcom BCM53125] (irq=POLL)
[   13.241375] bcm53xx stmmac-0:1e lan4 (uninitialized): PHY [dsa-0.0:02] 
driver [Broadcom BCM53125] (irq=POLL)
[   13.262036] bcm53xx stmmac-0:1e wan (uninitialized): PHY [dsa-0.0:03] driver 
[Broadcom BCM53125] (irq=POLL)
[   13.278601] bcm53xx stmmac-0:1e lan1 (uninitialized): PHY [dsa-0.0:04] 
driver [Broadcom BCM53125] (irq=POLL)
[   21.348699] sun7i-dwmac 1c5.ethernet eth0: Register MEM_TYPE_PAGE_POOL 
RxQ-0
[   21.358952] sun7i-dwmac 1c5.ethernet eth0: No Safety Features support 
found
[   21.366375] sun7i-dwmac 1c5.ethernet eth0: RX IPC Checksum Offload 
disabled
[   21.373731] sun7i-dwmac 1c5.ethernet eth0: No MAC Management Counters 
available
[   21.381427] sun7i-dwmac 1c5.ethernet eth0: PTP not supported by HW
[   21.391146] sun7i-dwmac 1c5.ethernet eth0: configuring for fixed/rgmii 
link mode
[   21.401844] sun7i-dwmac 1c5.ethernet eth0: Link is Up - 1Gbps/Full - 
flow control off
[   21.428685] bcm53xx stmmac-0:1e lan1: configuring for phy/gmii link mode
[   21.437145] bcm53xx stmmac-0:1e lan1: Link is Up - 1Gbps/Full - flow control 
off
[   21.520381] bcm53xx stmmac-0:1e lan2: configuring for phy/gmii link mode
[   21.632977] bcm53xx stmmac-0:1e lan3: configuring for phy/gmii link mode
[   21.748557] bcm53xx stmmac-0:1e lan4: configuring for phy/gmii link mode
[   21.758708] bcm53xx stmmac-0:1e lan4: Link is Up - 100Mbps/Full - flow 
control off
[   27.067850] bcm53xx stmmac-0:1e wan: configuring for phy/gmii link mode
[   27.076441] bcm53xx stmmac-0:1e wan: Link is Up - 100Mbps/Full - flow 
control off

# bridge link
3: lan2@eth0:  mtu 1500 master br-lan state 
disabled priority 32 cost 100 
4: lan3@eth0:  mtu 1500 master br-lan state 
disabled priority 32 cost 100 
5: lan4@eth0:  mtu 1500 master br-lan state 
forwarding priority 32 cost 19 
7: lan1@eth0:  mtu 1500 master br-lan state 
forwarding priority 32 cost 4 

But installer stupidity "enable only one interface" prevent use any port on 
bcm53xx
switch - master port eth0 MUST BE ACTIVE.

-- System Information:
Debian Release: 11.5
  APT prefers stable-security
  APT policy: (500, 'stable-security'), (500, 'stable'), (400, 'unstable'), (1, 
'experimental')
Architecture: armhf (armv7l)

Kernel: Linux 6.0.0-4-armmp-lpae (SMP w/2 CPU threads)
Kernel taint flags: TAINT_CRAP
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US:en
Shell: /bin/sh linked to /usr/bin/dash
Init: sysvinit (via /sbin/init)
LSM: AppArmor: enabled



Bug#988966: /boot/vmlinuz-5.10.0-6-armmp-lpae: lamobo-r1 ethernet/bridge failure

2022-12-15 Thread Diederik de Haas
On Saturday, 22 May 2021 00:46:55 CET Vagrant Cascadian wrote:
> Package: src:linux
> Version: 5.10.28-1
> File: /boot/vmlinuz-5.10.0-6-armmp-lpae
> Control: block 986767 by -1
> 
> The ethernet bridge fails to work on 5.10.x (also tried 5.10.38-1),
> but works fine on 4.19.x from buster. (This was also reported in
> https://bugs.debian.org/986767)
> 
> I noticed these messages when booting up:
> 
> [6.254047] bcm53xx stmmac-0:1e: failed to register switch: -517
> [6.339663] bcm53xx stmmac-0:1e: failed to register switch: -517

The best way to determine what caused the change from working to not working 
is `git bisect`: https://wiki.debian.org/DebianKernel/GitBisect

It's probably possible to speed that process up by narrowing the range to 
search. Usually the quickest way is to use snapshot.debian.org and use that to 
retrieve kernels between 4.19 and 5.10 and test with that.

I've also made some observations which could also help in narrowing things 
down.
Kernel 5.10 has CONFIG_NET_DSA_TAG_BRCM_COMMON=m while it's absent in 4.19.
That setting determines whether `tag_bcrm` gets build. Bug #986767 also seems 
to indicate that that is a relevant change. It may be that lamobo-r1 needs 
additional kernel options enabled.
It appears that the networking code made a significant change between 4.19 and 
5.10 and it _could_ be DSA related.

I know OpenWrt is in the process of switching networking to DSA.
https://openwrt.org/toh/lamobo/bananapi_r1?s[]=lamobo[]=r1 indicates that 
the device is supported by OpenWrt version 22.03.2. It's probably worth trying 
their image and see whether it works properly. And then note which kernel 
they're using. And possibly search and/or ask for help on their forum.
https://github.com/openwrt/openwrt/issues/7817 is still open and is titled 
"sunxi / lamobo-r1: switch not working with kernel 5.4", so their issue 
tracker may also provide more info/hints.

HTH

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


Bug#988966: /boot/vmlinuz-5.10.0-6-armmp-lpae: lamobo-r1 ethernet/bridge failure

2021-05-21 Thread Vagrant Cascadian
Package: src:linux
Version: 5.10.28-1
Severity: normal
File: /boot/vmlinuz-5.10.0-6-armmp-lpae
X-Debbugs-Cc: vagr...@debian.org
Control: block 986767 by -1

The ethernet bridge fails to work on 5.10.x (also tried 5.10.38-1),
but works fine on 4.19.x from buster. (This was also reported in
https://bugs.debian.org/986767)

I noticed these messages when booting up:

[6.254047] bcm53xx stmmac-0:1e: failed to register switch: -517
[6.339663] bcm53xx stmmac-0:1e: failed to register switch: -517



-- Package-specific info:
** Kernel log: boot messages should be attached

** Model information
Hardware: Allwinner sun7i (A20) Family
Revision: 
Device Tree model: Lamobo R1

** Network interface configuration:
*** /etc/network/interfaces:

source /etc/network/interfaces.d/*

auto lo
iface lo inet loopback

allow-hotplug eth0
iface eth0 inet dhcp

** PCI devices:

** USB devices:
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


-- System Information:
Debian Release: 11.0
  APT prefers testing-security
  APT policy: (500, 'testing-security'), (500, 'stable-updates'), (500, 
'testing'), (500, 'stable'), (1, 'experimental'), (1, 'unstable')
Architecture: armhf (armv7l)

Kernel: Linux 5.10.0-7-armmp-lpae (SMP w/2 CPU threads)
Kernel taint flags: TAINT_CRAP, TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages linux-image-5.10.0-6-armmp-lpae depends on:
ii  initramfs-tools [linux-initramfs-tool]  0.140
ii  kmod28-1
ii  linux-base  4.6

Versions of packages linux-image-5.10.0-6-armmp-lpae recommends:
ii  apparmor 2.13.6-10
ii  firmware-linux-free  20200122-1

Versions of packages linux-image-5.10.0-6-armmp-lpae suggests:
pn  debian-kernel-handbook  
pn  linux-doc-5.10  

Versions of packages linux-image-5.10.0-6-armmp-lpae is related to:
pn  firmware-amd-graphics 
pn  firmware-atheros  
pn  firmware-bnx2 
pn  firmware-bnx2x
pn  firmware-brcm80211
pn  firmware-cavium   
pn  firmware-intel-sound  
pn  firmware-intelwimax   
pn  firmware-ipw2x00  
pn  firmware-ivtv 
pn  firmware-iwlwifi  
pn  firmware-libertas 
pn  firmware-linux-nonfree
pn  firmware-misc-nonfree 
pn  firmware-myricom  
pn  firmware-netxen   
pn  firmware-qlogic   
pn  firmware-realtek  
pn  firmware-samsung  
pn  firmware-siano
pn  firmware-ti-connectivity  
pn  xen-hypervisor

-- no debconf information