summaryrefslogtreecommitdiffstats
path: root/drivers/net/dsa/b53/b53_priv.h
diff options
context:
space:
mode:
authorVladimir Oltean <vladimir.oltean@nxp.com>2021-10-22 20:43:07 +0200
committerDavid S. Miller <davem@davemloft.net>2021-10-24 14:47:44 +0200
commitf239934cffe5e6ebd4ad55fb643a526eb4774a31 (patch)
tree5585a8aec124503de2f7b23a092fbdfacf36c4b2 /drivers/net/dsa/b53/b53_priv.h
parentnet: mscc: ocelot: serialize access to the MAC table (diff)
downloadlinux-f239934cffe5e6ebd4ad55fb643a526eb4774a31.tar.xz
linux-f239934cffe5e6ebd4ad55fb643a526eb4774a31.zip
net: dsa: b53: serialize access to the ARL table
The b53 driver performs non-atomic transactions to the ARL table when adding, deleting and reading FDB and MDB entries. Traditionally these were all serialized by the rtnl_lock(), but now it is possible that DSA calls ->port_fdb_add and ->port_fdb_del without holding that lock. So the driver must have its own serialization logic. Add a mutex and hold it from all entry points (->port_fdb_{add,del,dump}, ->port_mdb_{add,del}). Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/b53/b53_priv.h')
-rw-r--r--drivers/net/dsa/b53/b53_priv.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/dsa/b53/b53_priv.h b/drivers/net/dsa/b53/b53_priv.h
index 544101e74bca..579da74ada64 100644
--- a/drivers/net/dsa/b53/b53_priv.h
+++ b/drivers/net/dsa/b53/b53_priv.h
@@ -107,6 +107,7 @@ struct b53_device {
struct mutex reg_mutex;
struct mutex stats_mutex;
+ struct mutex arl_mutex;
const struct b53_io_ops *ops;
/* chip specific data */