linux/include/soc/mscc
Vladimir Oltean 3ff468ef98 net: mscc: ocelot: remove struct ocelot_mm_state :: lock
Unfortunately, the workarounds for the hardware bugs make it pointless
to keep fine-grained locking for the MAC Merge state of each port.

Our vsc9959_cut_through_fwd() implementation requires
ocelot->fwd_domain_lock to be held, in order to serialize with changes
to the bridging domains and to port speed changes (which affect which
ports can be cut-through). Simultaneously, the traffic classes which can
be cut-through cannot be preemptible at the same time, and this will
depend on the MAC Merge layer state (which changes from threaded
interrupt context).

Since vsc9959_cut_through_fwd() would have to hold the mm->lock of all
ports for a correct and race-free implementation with respect to
ocelot_mm_irq(), in practice it means that any time a port's mm->lock is
held, it would potentially block holders of ocelot->fwd_domain_lock.

In the interest of simple locking rules, make all MAC Merge layer state
changes (and preemptible traffic class changes) be serialized by the
ocelot->fwd_domain_lock.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2023-04-17 19:01:18 -07:00
..
ocelot_ana.h net: dsa: felix: support psfp filter on vsc9959 2021-11-18 12:07:24 +00:00
ocelot_dev.h net: mscc: ocelot: add MAC Merge layer support for VSC9959 2023-01-23 12:44:18 +00:00
ocelot_hsio.h
ocelot_ptp.h net: mscc: ocelot: avoid overflowing the PTP timestamp FIFO 2021-10-12 17:35:17 -07:00
ocelot_qsys.h net: mscc: ocelot: add ops for decoding watermark threshold and occupancy 2021-01-15 20:02:34 -08:00
ocelot_sys.h net: mscc: ocelot: convert SYS_PAUSE_CFG register access to regfield 2020-07-13 17:40:02 -07:00
ocelot_vcap.h net: dsa: felix: tag_8021q preparation for multiple CPU ports 2022-05-23 10:39:55 +01:00
ocelot.h net: mscc: ocelot: remove struct ocelot_mm_state :: lock 2023-04-17 19:01:18 -07:00
vsc7514_regs.h net: mscc: ocelot: un-export unused regmap symbols 2023-02-06 22:33:15 -08:00