]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: mv88e6xxx: get serdes lane after lock
authorVivien Didelot <vivien.didelot@gmail.com>
Wed, 28 Aug 2019 16:26:11 +0000 (12:26 -0400)
committerDavid S. Miller <davem@davemloft.net>
Fri, 30 Aug 2019 00:20:04 +0000 (17:20 -0700)
commitd640b25b4ea0a5f5a944a242c57398fc79bc07d4
tree8933dae4ba76e30e1090249e2e6f6e3404fd54c9
parentcdb2b2577578dcb2e1d1489c0a8b7c1f71616b8e
net: dsa: mv88e6xxx: get serdes lane after lock

This is a follow-up patch for commit 4e3bd5e755d8 ("net: dsa:
mv88e6xxx: create serdes_get_lane chip operation").

The .serdes_get_lane implementations access the CMODE of a port,
even though it is cached at the moment, it is safer to call them
after the mutex is locked, not before.

At the same time, check for an eventual error and return IRQ_DONE,
instead of blindly ignoring it.

Signed-off-by: Vivien Didelot <vivien.didelot@gmail.com>
Reviewed-by: Marek BehĂșn <marek.behun@nic.cz>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/mv88e6xxx/serdes.c