mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-27 09:02:06 +00:00
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>
This commit is contained in:
parent
df45bf84e4
commit
2e8d243e88
2 changed files with 13 additions and 2 deletions
|
@ -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 */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue