]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: mv88e6xxx: rework port state setter
authorVivien Didelot <vivien.didelot@savoirfairelinux.com>
Mon, 7 Mar 2016 23:24:17 +0000 (18:24 -0500)
committerDavid S. Miller <davem@davemloft.net>
Thu, 10 Mar 2016 21:10:30 +0000 (16:10 -0500)
commitb4545d6151659c2998c6d8a52e13893ec3051b42
treecd5f85c9f3b68b7cf376d25788575dabfbdaf6b6
parentedeb6a340bf1f13cdb91f797b69d9745e435337f
net: dsa: mv88e6xxx: rework port state setter

Apply a few non-functional changes on the port state setter:

  * add a dynamic debug message with state names to track changes
  * explicit states checking instead of assuming their numeric values
  * lock mutex only once when changing several port states
  * use bitmap macros to declare and access port_state_update_mask

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Tested-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/mv88e6xxx.c
drivers/net/dsa/mv88e6xxx.h