]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: qca8k: clear MASTER_EN after phy read/write
authorAnsuel Smith <ansuelsmth@gmail.com>
Fri, 14 May 2021 21:00:07 +0000 (23:00 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 14 May 2021 22:30:22 +0000 (15:30 -0700)
commit948d670aff06222c1e3154ec7e87924c00d6b920
treed625ecad77a0d596333b1e4c911fc4ac9397e221
parenta7e24bbc1d433f87b90e8eacd92d433904379d8e
net: dsa: qca8k: clear MASTER_EN after phy read/write

Clear MDIO_MASTER_EN bit from MDIO_MASTER_CTRL after read/write
operation. The MDIO_MASTER_EN bit is not reset after read/write
operation and the next operation can be wrongly interpreted by the
switch as a mdio operation. This cause a production of wrong/garbage
data from the switch and underfined bheavior. (random port drop,
unplugged port flagged with link up, wrong port speed)
Also on driver remove the MASTER_CTRL can be left set and cause the
malfunction of any next driver using the mdio device.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/qca8k.c