[Letux-kernel] Ethernet interface on Beaglebone Black broken since 5.15.0-rc1-letux+

H. Nikolaus Schaller hns at goldelico.com
Sun Sep 26 16:03:14 CEST 2021


Hi Jean Rene,

> Am 26.09.2021 um 13:22 schrieb Jean Rene Dawin <jdawin at math.uni-bielefeld.de>:
> 
> H. Nikolaus Schaller wrote on Sun 26/09/21  9:08:
>> Hi Andreas,
>> 
>> 
>>> Am 24.09.2021 um 17:11 schrieb Andreas Kemnade <andreas at kemnade.info>:
>>> 
>>> Hi,
>>> 
>>> On Fri, 24 Sep 2021 00:06:02 +0200
>>>> 
>>>> 
>>>> What would be the best way to find the commit which caused the issue?
>>>> 
>>> If you can see this issue on mainline (maybe with just a custom config
>>> or something) and do not need features in letux-kernel, then you can
>>> bisect just mainline. 
>> 
>> You were right to point to the obvious...
>> 
>> a) mainline with omap2plus_defconfig (+ minor patches for my build system) works.
>> (BTW it has no ethernet gadget).
>> 
>> b) mainline with letux_defconfig (+ minor patches for my build system) fails.
>> 
>> c) git diff letux-5.14 letux-5.15-rc1 arch/arm/configs/letux_defconfig
>> shows a bunch of changes but none is obviously related.
>> 
>> d) git diff letux-5.14 letux-5.15-rc1 arch/arm/configs/omap2plus_defconfig
>> is empty but some unspecified configs may have a different default now.
>> 
>> Note that I used am335x-boneblack+letux.dtb in both cases a+b (taken from
>> last build of letux tree and not am335x-boneblack.dtb from mainline).
>> 
>> So enough ideas for further research and potentially a bisect between
>> v5.14.0 and v5.15-rc1 (each time adding letux_defconfig) may also show
>> some dependency. Or a config bisect (which is more tricky but doable).
> 
> Hi,
> 
> indeed, after bisecting mainline it seems
> 
> c477358e66a3a6db4f1799b7415068d6660c95c3
> "ARM: dts: am335x-bone: switch to new cpsw switch drv"
> 
> is the culprit. It's a change to arch/arm/boot/dts/am335x-bone-common.dtsi
> When booting the same kernel with am335x-boneblack+letux.dtb from 5.14.6-letux+ the 
> ethernet interface works.

Ok fine! Thanks for doing this research.

I tried to bisect the letux_defconfig (starting from omap2plus_defconfig which is still good):

3c23078ebd175d735a87fdc5c8271cfc696079bc is the first bad commit

iMac:master hns$ git show 3c23078ebd175d735a87fdc5c8271cfc696079bc
commit 3c23078ebd175d735a87fdc5c8271cfc696079bc (HEAD, bisect-base, bisect+patches, refs/bisect/bad)
Author: H. Nikolaus Schaller <hns at goldelico.com>
Date:   Sun Sep 26 12:12:01 2021 +0200

    autosplit

diff --git a/arch/arm/configs/letux_defconfig b/arch/arm/configs/letux_defconfig
index 0e64f875b692b..42233a8006b35 100644
--- a/arch/arm/configs/letux_defconfig
+++ b/arch/arm/configs/letux_defconfig
@@ -252,18 +252,7 @@ CONFIG_IP6_NF_TARGET_MASQUERADE=m
 CONFIG_IP6_NF_TARGET_NPT=m
 CONFIG_IP_DCCP=m
 CONFIG_BRIDGE=m
-CONFIG_BRIDGE_VLAN_FILTERING=y
-CONFIG_VLAN_8021Q=m
-CONFIG_PHONET=m
-CONFIG_NET_SCHED=y
-CONFIG_NET_SCH_INGRESS=m
-CONFIG_NET_CLS_U32=m
-CONFIG_NET_CLS_FLOWER=m
-CONFIG_NET_CLS_MATCHALL=m
-CONFIG_NET_CLS_ACT=y
-CONFIG_NET_ACT_POLICE=m
-CONFIG_NET_ACT_GACT=m
-CONFIG_NET_SWITCHDEV=y
+CONFIG_DNS_RESOLVER=y
 CONFIG_CAN=m
 CONFIG_CAN_C_CAN=m
 CONFIG_CAN_C_CAN_PLATFORM=m
iMac:master hns$ 

Hm. How is this related to the cpsw switch driver?
And there was no change in omap2plus_defconfig.
Still it makes a difference... But maybe the bisect is
misleading again.

Well, there are differences in the good and bad
configs related to CPSW:

iMac:master hns$ git checkout good
Zu Branch 'good' gewechselt
iMac:master hns$ fgrep CPSW arch/arm/configs/letux_defconfig
CONFIG_TI_CPSW=y
CONFIG_TI_CPSW_SWITCHDEV=y
iMac:master hns$ git checkout bad
Zu Branch 'bad' gewechselt
iMac:master hns$ fgrep CPSW arch/arm/configs/letux_defconfig
CONFIG_TI_CPSW_PHY_SEL=y
CONFIG_TI_CPSW=y
iMac:master hns$ 

Ok, now we are coming closer.

TI_CPSW_SWITCHDEV depends on CONFIG_NET_SWITCHDEV which is
disabled by the offending commit in my bisect.

So suffices to enable both:

iMac:master hns$ fgrep CPSW arch/arm/configs/letux_defconfig
# CONFIG_TI_CPSW_PHY_SEL is not set
CONFIG_TI_CPSW=m
CONFIG_TI_CPSW_SWITCHDEV=m
iMac:master hns$ fgrep SWITCHDEV arch/arm/configs/letux_defconfig
CONFIG_NET_SWITCHDEV=y
CONFIG_TI_CPSW_SWITCHDEV=m
iMac:master hns$ 

I'll add that as a patch for letux-5.15-rc3 likely coming tomorrow.

BR and thanks,
Nikolaus




More information about the Letux-kernel mailing list