]> git.itanic.dy.fi Git - linux-stable/commit
net: mscc: ocelot: extend ocelot->fwd_domain_lock to cover ocelot->tas_lock
authorVladimir Oltean <vladimir.oltean@nxp.com>
Wed, 5 Jul 2023 10:44:20 +0000 (13:44 +0300)
committerJakub Kicinski <kuba@kernel.org>
Fri, 7 Jul 2023 02:10:22 +0000 (19:10 -0700)
commit009d30f1a77795014f151ba317fcbfc2f17153c6
tree457ca561c323ab36e13b4394bab66ad0e440621c
parentceb20a3cc52611cb84d164f03e466f64b4ed9fb4
net: mscc: ocelot: extend ocelot->fwd_domain_lock to cover ocelot->tas_lock

In a future commit we will have to call vsc9959_tas_guard_bands_update()
from ocelot_port_update_active_preemptible_tcs(), and that will be
impossible due to the AB/BA locking dependencies between
ocelot->tas_lock and ocelot->fwd_domain_lock.

Just like we did in commit 3ff468ef987e ("net: mscc: ocelot: remove
struct ocelot_mm_state :: lock"), the only solution is to expand the
scope of ocelot->fwd_domain_lock for it to also serialize changes made
to the Time-Aware Shaper, because those will have to result in a
recalculation of cut-through TCs, which is something that depends on the
forwarding domain.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Message-ID: <20230705104422.49025-2-vladimir.oltean@nxp.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/dsa/ocelot/felix.c
drivers/net/dsa/ocelot/felix_vsc9959.c
drivers/net/ethernet/mscc/ocelot.c
drivers/net/ethernet/mscc/ocelot_mm.c
include/soc/mscc/ocelot.h