]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: make slave close symmetrical to open
authorVivien Didelot <vivien.didelot@savoirfairelinux.com>
Fri, 22 Sep 2017 23:01:55 +0000 (19:01 -0400)
committerDavid S. Miller <davem@davemloft.net>
Tue, 26 Sep 2017 03:22:46 +0000 (20:22 -0700)
commitcf837e010031505d8a64c31052ba3c5e6095e44a
tree028eab6b743744f13f351d43d1ef6ae17c35377d
parentff611ae430284b2c1c0029c6d66c3a3baef7c3ab
net: dsa: make slave close symmetrical to open

The DSA slave open function configures the unicast MAC addresses on the
master device, enable the switch port, change its STP state, then start
the PHY device.

Make the close function symmetric, by first stopping the PHY device,
then changing the STP state, disabling the switch port and restore the
master device.

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dsa/slave.c