Re: stmmac on Banana PI CPU stalls since Linux 6.6
From: Andrew Lunn <andrew@lunn.ch>
Date: 2024-01-25 19:55:22
I have checked out 2eb85b750512cc5dc5a93d5ff00e1f83b99651db (which is the first bad commit that the bisect eventually identified) and tried running: [56/4504]mh@fan:~/linux/git/linux ((2eb85b750512...)) $ make BUILDARCH="amd64" ARCH="arm" KBUILD_DEBARCH="armhf" CROSS_COMPILE="arm-linux-gnueabihf-" drivers/net/ethernet/stmicro/stmmac/stmmac_main.lst SYNC include/config/auto.conf.cmd SYSHDR arch/arm/include/generated/uapi/asm/unistd-oabi.h SYSHDR arch/arm/include/generated/uapi/asm/unistd-eabi.h HOSTCC scripts/kallsyms UPD include/config/kernel.release UPD include/generated/uapi/linux/version.h UPD include/generated/utsrelease.h SYSNR arch/arm/include/generated/asm/unistd-nr.h SYSTBL arch/arm/include/generated/calls-oabi.S SYSTBL arch/arm/include/generated/calls-eabi.S CC scripts/mod/empty.o MKELF scripts/mod/elfconfig.h HOSTCC scripts/mod/modpost.o CC scripts/mod/devicetable-offsets.s UPD scripts/mod/devicetable-offsets.h HOSTCC scripts/mod/file2alias.o HOSTCC scripts/mod/sumversion.o HOSTLD scripts/mod/modpost CC kernel/bounds.s CC arch/arm/kernel/asm-offsets.s UPD include/generated/asm-offsets.h CALL scripts/checksyscalls.sh CHKSHA1 include/linux/atomic/atomic-arch-fallback.h CHKSHA1 include/linux/atomic/atomic-instrumented.h MKLST drivers/net/ethernet/stmicro/stmmac/stmmac_main.lst ./scripts/makelst: 1: arithmetic expression: expecting EOF: "0x - 0x00000000" [57/4505]mh@fan:~/linux/git/linux ((2eb85b750512...)) $ That is not what it was suppsoed to yield, right?
No. But did it actually generate drivers/net/ethernet/stmicro/stmmac/stmmac_main.lst Sometime errors like this are not always fatal.
My bisect eventually completed and identified 2eb85b750512cc5dc5a93d5ff00e1f83b99651db as the first bad commit.
I can make a guess. - memset(&priv->xstats, 0, sizeof(struct stmmac_extra_stats)); Its removed, not moved later. Deep within this structure is the stmmac_txq_stats and stmmac_rxq_stats which this function is supposed to return, and the two syncp variables are in it as well. My guess is, they have an invalid state, when this memset is missing. Try putting the memset back. I also guess that is not the real fix, there are missing calls to u64_stats_init(). Andrew