net: dsa: lan9303: Protect ALR operations with mutex
authorEgil Hjelmeland <privat@egil-hjelmeland.no>
Thu, 7 Dec 2017 18:56:04 +0000 (19:56 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 8 Dec 2017 19:12:33 +0000 (14:12 -0500)
commit2e8d243e887c8802b373338ddff684aa0578be3b
treea954e778e154c3c6fe325cc51c54e4c5c8cd96c0
parentdf45bf84e4f5a48f23d4b1a07d21d566e8b587b2
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>
drivers/net/dsa/lan9303-core.c
include/linux/dsa/lan9303.h