diff options
| author | Egil Hjelmeland <privat@egil-hjelmeland.no> | 2017-12-07 13:56:04 -0500 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2017-12-08 14:12:33 -0500 |
| commit | 2e8d243e887c8802b373338ddff684aa0578be3b (patch) | |
| tree | a954e778e154c3c6fe325cc51c54e4c5c8cd96c0 /include/linux | |
| parent | df45bf84e4f5a48f23d4b1a07d21d566e8b587b2 (diff) | |
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')
| -rw-r--r-- | include/linux/dsa/lan9303.h | 1 |
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 { | |||
| 26 | bool phy_addr_sel_strap; | 26 | bool phy_addr_sel_strap; |
| 27 | struct dsa_switch *ds; | 27 | struct dsa_switch *ds; |
| 28 | struct mutex indirect_mutex; /* protect indexed register access */ | 28 | struct mutex indirect_mutex; /* protect indexed register access */ |
| 29 | struct mutex alr_mutex; /* protect ALR access */ | ||
| 29 | const struct lan9303_phy_ops *ops; | 30 | const struct lan9303_phy_ops *ops; |
| 30 | bool is_bridged; /* true if port 1 and 2 are bridged */ | 31 | bool is_bridged; /* true if port 1 and 2 are bridged */ |
| 31 | 32 | ||
