On Mon, Aug 19, 2019 at 11:27:33AM -0400, Vivien Didelot wrote: > Hi Andrew, > > On Mon, 19 Aug 2019 15:40:57 +0200, Andrew Lunn <and...@lunn.ch> wrote: > > On Sun, Aug 18, 2019 at 01:35:46PM -0400, Vivien Didelot wrote: > > > When disabling a port, that is not for the driver to decide what to > > > do with the STP state. This is already handled by the DSA layer. > > > > Hi Vivien > > > > Putting the port into STP disabled state is how you actually disable > > it, for the mv88e6xxx. So this is not really about STP, it is about > > powering off the port. Maybe a comment is needed, rather than removing > > the code? > > This is not for the driver to decide, the stack already handles that. > Otherwise, calling dsa_port_disable on a bridged port would result in > mv88e6xxx forcing the STP state to Disabled while this is not expected.
Hi Vivien Lets look at this from a different angle. The chip powers up. The older generation, the ports are enabled by default. For newer generations the NO_CPU strapping determines the power up state of a port. What we want is that unused ports get powered off. The previous change in the set does this. It calls mv88e6xxx_port_disable for all unused ports. How do we disable the port? For the mv88ex666, we set the port state to disabled. "The switch port is disabled and it will not receive or transmit and frames." For other switches, there might be other control registers to play with, other than STP. Are you saying the core already sets the STP to disabled, for ports which are unused? I did not spot that in your previous patch? Thanks Andrew