Subject: Re: [RFC PATCH net-next 14/20] net: dsa: mv88e6xxx: factorize VLAN Ethertype

From: Andrew Lunn <[email-masked]>
Date: Fri, 6 May 2016 02:57:59 +0200

On Thu, May 05, 2016 at 06:40:58PM -0400, Vivien Didelot wrote:
> Only the 6131 driver was setting the VLAN Ethertype to 0x8100. Set it to
> all models.
> 
> Signed-off-by: Vivien Didelot <[email-masked]>
> ---
>  drivers/net/dsa/mv88e6131.c | 9 ++++-----
>  drivers/net/dsa/mv88e6xxx.c | 8 ++++++++
>  drivers/net/dsa/mv88e6xxx.h | 7 +++++++
>  3 files changed, 19 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/net/dsa/mv88e6131.c b/drivers/net/dsa/mv88e6131.c
> index 013668c..4c0b1e9 100644
> --- a/drivers/net/dsa/mv88e6131.c
> +++ b/drivers/net/dsa/mv88e6131.c
> @@ -25,6 +25,7 @@ static const struct mv88e6xxx_info mv88e6131_table[] = {
>  		.num_databases = 256,
>  		.num_ports = 11,
>  		.flags = MV88E6XXX_FLAG_ATU |
> +			MV88E6XXX_FLAG_CORE_TAG_TYPE |
>  			MV88E6XXX_FLAG_PPU |
>  			MV88E6XXX_FLAG_VLANTABLE |
>  			MV88E6XXX_FLAG_VTU,
> @@ -35,6 +36,7 @@ static const struct mv88e6xxx_info mv88e6131_table[] = {
>  		.num_databases = 4096,
>  		.num_ports = 10,
>  		.flags = MV88E6XXX_FLAG_ATU |
> +			MV88E6XXX_FLAG_CORE_TAG_TYPE |
>  			MV88E6XXX_FLAG_PPU |
>  			MV88E6XXX_FLAG_VLANTABLE |
>  			MV88E6XXX_FLAG_VTU,
> @@ -45,6 +47,7 @@ static const struct mv88e6xxx_info mv88e6131_table[] = {
>  		.num_databases = 256,
>  		.num_ports = 8,
>  		.flags = MV88E6XXX_FLAG_ATU |
> +			MV88E6XXX_FLAG_CORE_TAG_TYPE |
>  			MV88E6XXX_FLAG_PPU |
>  			MV88E6XXX_FLAG_VLANTABLE |
>  			MV88E6XXX_FLAG_VTU,
> @@ -55,6 +58,7 @@ static const struct mv88e6xxx_info mv88e6131_table[] = {
>  		.num_databases = 256,
>  		.num_ports = 10,
>  		.flags = MV88E6XXX_FLAG_ATU |
> +			MV88E6XXX_FLAG_CORE_TAG_TYPE |
>  			MV88E6XXX_FLAG_PPU |
>  			MV88E6XXX_FLAG_VLANTABLE |
>  			MV88E6XXX_FLAG_VTU,

Hi Vivien

Rather than repeating these flags again and again, could you add one
#define containing the flags, and then use that to initialise .flags.

	Andrew