]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: mv88e6xxx: force cmode write on 6141/6341
authorBaruch Siach <baruch@tkos.co.il>
Thu, 19 Dec 2019 09:48:22 +0000 (11:48 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 2 Jan 2020 23:30:48 +0000 (15:30 -0800)
commit93c0fc9814e43ae1b4b38c09683c14de90028703
tree85496bbac95eab8e5da236a94c9be3df74ffd784
parent74e8ab0fa64c452b21b414a3bbfd1d954b82a727
net: dsa: mv88e6xxx: force cmode write on 6141/6341

mv88e6xxx_port_set_cmode() relies on cmode stored in struct
mv88e6xxx_port to skip cmode update when the requested value matches the
cached value. It turns out that mv88e6xxx_port_hidden_write() might
change the port cmode setting as a side effect, so we can't rely on the
cached value to determine that cmode update in not necessary.

Force cmode update in mv88e6341_port_set_cmode(), to make
serdes configuration work again. Other mv88e6xxx_port_set_cmode()
callers keep the current behaviour.

This fixes serdes configuration of the 6141 switch on SolidRun Clearfog
GT-8K.

Fixes: 5a2edc8a694 ("net: dsa: mv88e6xxx: fully support SERDES on Topaz family")
Reported-by: Denis Odintsov <d.odintsov@traviangames.com>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/mv88e6xxx/port.c