From 2e8d243e887c8802b373338ddff684aa0578be3b Mon Sep 17 00:00:00 2001 From: Egil Hjelmeland Date: Thu, 7 Dec 2017 19:56:04 +0100 Subject: 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 Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller --- include/linux/dsa/lan9303.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/linux/dsa') 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 */ -- cgit v1.2.3-59-g8ed1b