summaryrefslogtreecommitdiff
path: root/include/linux/dsa/lan9303.h
diff options
context:
space:
mode:
authorEgil Hjelmeland <privat@egil-hjelmeland.no>2017-12-07 21:56:04 +0300
committerDavid S. Miller <davem@davemloft.net>2017-12-08 22:12:33 +0300
commit2e8d243e887c8802b373338ddff684aa0578be3b (patch)
treea954e778e154c3c6fe325cc51c54e4c5c8cd96c0 /include/linux/dsa/lan9303.h
parentdf45bf84e4f5a48f23d4b1a07d21d566e8b587b2 (diff)
downloadlinux-2e8d243e887c8802b373338ddff684aa0578be3b.tar.xz
net: dsa: lan9303: Protect ALR operations with mutex
ALR table operations are a sequence of related register operations which should be protected from concurrent access. The alr_cache should also be protected. Add alr_mutex doing that. Signed-off-by: Egil Hjelmeland <privat@egil-hjelmeland.no> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/dsa/lan9303.h')
-rw-r--r--include/linux/dsa/lan9303.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/dsa/lan9303.h b/include/linux/dsa/lan9303.h
index f48a85c377de..b6514c29563f 100644
--- a/include/linux/dsa/lan9303.h
+++ b/include/linux/dsa/lan9303.h
@@ -26,6 +26,7 @@ struct lan9303 {
bool phy_addr_sel_strap;
struct dsa_switch *ds;
struct mutex indirect_mutex; /* protect indexed register access */
+ struct mutex alr_mutex; /* protect ALR access */
const struct lan9303_phy_ops *ops;
bool is_bridged; /* true if port 1 and 2 are bridged */