Re: [PATCHv2 net-next 4/4] net: dsa: mv88e6xxx: Refactor CPU and DSA port setup

2016-12-02 Thread Vivien Didelot
Hi Andrew, Andrew Lunn writes: >> The port's EgressMode, FrameMode and EtherType are really tied together >> to compose the mode of the port. > > Setting the EtherType is somewhat separate. It is only needed on ports > using EDSA. And that can only happen on a CPU port. Humm, actually, i > set i

Re: [PATCHv2 net-next 4/4] net: dsa: mv88e6xxx: Refactor CPU and DSA port setup

2016-12-02 Thread Andrew Lunn
> The port's EgressMode, FrameMode and EtherType are really tied together > to compose the mode of the port. Setting the EtherType is somewhat separate. It is only needed on ports using EDSA. And that can only happen on a CPU port. Humm, actually, i set it when i should not. But putting this in a

Re: [PATCHv2 net-next 4/4] net: dsa: mv88e6xxx: Refactor CPU and DSA port setup

2016-12-02 Thread Vivien Didelot
Hi Andrew, Andrew Lunn writes: > +static int mv88e6xxx_setup_port_dsa(struct mv88e6xxx_chip *chip, int port, > + int upstream_port) > +{ > + int err; > + > + err = chip->info->ops->port_set_frame_mode( > + chip, port, MV88E6XXX_FRAME_MODE_DSA);

[PATCHv2 net-next 4/4] net: dsa: mv88e6xxx: Refactor CPU and DSA port setup

2016-12-02 Thread Andrew Lunn
Older chips only support DSA tagging. Newer chips have both DSA and EDSA tagging. Refactor the code by adding port functions for setting the frame mode, egress mode, and if to forward unknown frames. This results in the helper mv88e6xxx_6065_family() becoming unused, so remove it. Signed-off-by: