Re: [PATCH 0/3] Fix for KSZ DSA switch shutdown

From: Vladimir Oltean
Date: Thu Sep 09 2021 - 07:54:29 EST


On Thu, Sep 09, 2021 at 01:08:26PM +0200, Lino Sanfilippo wrote:
> Hi,
>
> On 09.09.21 at 12:14, Vladimir Oltean wrote:
> >
> > Can you try this patch
> >
> > commit 07b90056cb15ff9877dca0d8f1b6583d1051f724
> > Author: Vladimir Oltean <vladimir.oltean@xxxxxxx>
> > Date: Tue Jan 12 01:09:43 2021 +0200
> >
> > net: dsa: unbind all switches from tree when DSA master unbinds
> >
> > Currently the following happens when a DSA master driver unbinds while
> > there are DSA switches attached to it:
> >
>
> This patch is already part of the kernel which shows the described shutdown issues.

How can I reproduce this issue?

When I test with sysrq-o, I do see the various DSA trees getting torn
down:

[ 16.731468] sysrq: HELP : loglevel(0-9) reboot(b) crash(c) show-all-locks(d) terminate-all-tasks(e) memory-full-oom-kill(f) kill-all-tasks(i) thaw-filesystems(j) sak(k) show-backtrace-all-active-cpus(l) show-memory-usage(m) nice-all-RT-tasks(n) poweroff(o) show-registers(p) show-all-timers(q) unraw(r) sync(s) show-task-states(t) unmount(u) show-blocked-tasks(w) dump-ftrace-buffer(z)
[ 29.912535] sysrq: Power Off
[ 29.917806] kvm: exiting hardware virtualization
[ 29.988036] device swp0 left promiscuous mode
[ 30.370424] sja1105 spi2.0: Link is Down
[ 30.402790] DSA: tree 1 torn down
[ 30.495096] device swp2 left promiscuous mode
[ 31.011576] sja1105 spi2.1: Link is Down
[ 31.032925] DSA: tree 2 torn down
[ 31.074226] reboot: Power down

I feel that something is missing in your system. Is the device link
created? Is it deleted before going into effect on shutdown?