net: dsa: mv88e6xxx: add helper to disable ports
authorVivien Didelot <vivien.didelot@savoirfairelinux.com>
Mon, 5 Dec 2016 22:30:25 +0000 (17:30 -0500)
committerDavid S. Miller <davem@davemloft.net>
Tue, 6 Dec 2016 16:32:28 +0000 (11:32 -0500)
commit4ac4b5a623f808e64d4d17b14bc23e934eaed008
tree2ff0f53e4f108ba2e7a9706aa4a3ace1617c3c64
parent9f9ffdffe9112abae781e5f4b44e7d2bc96aa6d5
net: dsa: mv88e6xxx: add helper to disable ports

Before resetting a switch, the ports should be set to the Disabled state
and the transmit queues should be drained.

Add an helper to explicit that.

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