linux/include/soc/mscc
Vladimir Oltean ca0b272b48 net: mscc: ocelot: install MAC addresses in .ndo_set_rx_mode from process context
Currently ocelot_set_rx_mode calls ocelot_mact_learn directly, which has
a very nice ocelot_mact_wait_for_completion at the end. Introduced in
commit 639c1b2625 ("net: mscc: ocelot: Register poll timeout should be
wall time not attempts"), this function uses readx_poll_timeout which
triggers a lot of lockdep warnings and is also dangerous to use from
atomic context, potentially leading to lockups and panics.

Steen Hegelund added a poll timeout of 100 ms for checking the MAC
table, a duration which is clearly absurd to poll in atomic context.
So we need to defer the MAC table access to process context, which we do
via a dynamically allocated workqueue which contains all there is to
know about the MAC table operation it has to do.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Link: https://lore.kernel.org/r/20201212191612.222019-1-vladimir.oltean@nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2020-12-14 19:28:22 -08:00
..
ocelot.h net: mscc: ocelot: install MAC addresses in .ndo_set_rx_mode from process context 2020-12-14 19:28:22 -08:00
ocelot_ana.h net: mscc: ocelot: fix fields offset in SG_CONFIG_REG_3 2020-09-24 20:00:40 -07:00
ocelot_dev.h net: mscc: ocelot: convert port registers to regmap 2020-07-13 17:40:01 -07:00
ocelot_hsio.h
ocelot_ptp.h net: mscc: ocelot: make ocelot_init_timestamp take a const struct ptp_clock_info 2020-09-18 17:52:40 -07:00
ocelot_qsys.h net: mscc: ocelot: convert QSYS_SWITCH_PORT_MODE and SYS_PORT_MODE to regfields 2020-07-13 17:40:01 -07: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: mscc: ocelot: automatically detect VCAP constants 2020-09-29 18:26:24 -07:00