All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] net: dsa: b53: Fix for brcm tag issue in Cygnus SoC
@ 2018-06-05 20:38 Arun Parameswaran
  2018-06-05 20:55 ` Scott Branden
  2018-06-05 21:41 ` Florian Fainelli
  0 siblings, 2 replies; 5+ messages in thread
From: Arun Parameswaran @ 2018-06-05 20:38 UTC (permalink / raw)
  To: Florian Fainelli, Vivien Didelot, Andrew Lunn, David S. Miller
  Cc: netdev, linux-kernel, bcm-kernel-feedback-list, Arun Parameswaran

In the Broadcom Cygnus SoC, the brcm tag needs to be inserted
in between the mac address and the ether type (should use
'DSA_PROTO_TAG_BRCM') for the packets sent to the internal
b53 switch.

Since the Cygnus was added with the BCM58XX device id and the
BCM58XX uses 'DSA_PROTO_TAG_BRCM_PREPEND', the data path is
broken, due to the incorrect brcm tag location.

Add a new b53 device id (BCM583XX) for Cygnus family to fix the
issue. Add the new device id to the BCM58XX family as Cygnus
is similar to the BCM58XX in most other functionalities.

Fixes: 11606039604c ("net: dsa: b53: Support prepended Broadcom tags")

Signed-off-by: Arun Parameswaran <arun.parameswaran@broadcom.com>
---
 drivers/net/dsa/b53/b53_common.c | 15 ++++++++++++++-
 drivers/net/dsa/b53/b53_priv.h   |  2 ++
 drivers/net/dsa/b53/b53_srab.c   |  4 ++--
 3 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c
index 3da5fca..bbc6cc6 100644
--- a/drivers/net/dsa/b53/b53_common.c
+++ b/drivers/net/dsa/b53/b53_common.c
@@ -684,7 +684,8 @@ static int b53_switch_reset(struct b53_device *dev)
 	 * still use this driver as a library and need to perform the reset
 	 * earlier.
 	 */
-	if (dev->chip_id == BCM58XX_DEVICE_ID) {
+	if (dev->chip_id == BCM58XX_DEVICE_ID ||
+	    dev->chip_id == BCM583XX_DEVICE_ID) {
 		b53_read8(dev, B53_CTRL_PAGE, B53_SOFTRESET, &reg);
 		reg |= SW_RST | EN_SW_RST | EN_CH_RST;
 		b53_write8(dev, B53_CTRL_PAGE, B53_SOFTRESET, reg);
@@ -1880,6 +1881,18 @@ struct b53_chip_data {
 		.jumbo_size_reg = B53_JUMBO_MAX_SIZE,
 	},
 	{
+		.chip_id = BCM583XX_DEVICE_ID,
+		.dev_name = "BCM583xx/11360",
+		.vlans = 4096,
+		.enabled_ports = 0x103,
+		.arl_entries = 4,
+		.cpu_port = B53_CPU_PORT,
+		.vta_regs = B53_VTA_REGS,
+		.duplex_reg = B53_DUPLEX_STAT_GE,
+		.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
+		.jumbo_size_reg = B53_JUMBO_MAX_SIZE,
+	},
+	{
 		.chip_id = BCM7445_DEVICE_ID,
 		.dev_name = "BCM7445",
 		.vlans	= 4096,
diff --git a/drivers/net/dsa/b53/b53_priv.h b/drivers/net/dsa/b53/b53_priv.h
index 3b57f47..b232aaa 100644
--- a/drivers/net/dsa/b53/b53_priv.h
+++ b/drivers/net/dsa/b53/b53_priv.h
@@ -62,6 +62,7 @@ enum {
 	BCM53018_DEVICE_ID = 0x53018,
 	BCM53019_DEVICE_ID = 0x53019,
 	BCM58XX_DEVICE_ID = 0x5800,
+	BCM583XX_DEVICE_ID = 0x58300,
 	BCM7445_DEVICE_ID = 0x7445,
 	BCM7278_DEVICE_ID = 0x7278,
 };
@@ -181,6 +182,7 @@ static inline int is5301x(struct b53_device *dev)
 static inline int is58xx(struct b53_device *dev)
 {
 	return dev->chip_id == BCM58XX_DEVICE_ID ||
+		dev->chip_id == BCM583XX_DEVICE_ID ||
 		dev->chip_id == BCM7445_DEVICE_ID ||
 		dev->chip_id == BCM7278_DEVICE_ID;
 }
diff --git a/drivers/net/dsa/b53/b53_srab.c b/drivers/net/dsa/b53/b53_srab.c
index c37ffd1..8247481 100644
--- a/drivers/net/dsa/b53/b53_srab.c
+++ b/drivers/net/dsa/b53/b53_srab.c
@@ -364,7 +364,7 @@ static int b53_srab_write64(struct b53_device *dev, u8 page, u8 reg,
 	{ .compatible = "brcm,bcm53018-srab" },
 	{ .compatible = "brcm,bcm53019-srab" },
 	{ .compatible = "brcm,bcm5301x-srab" },
-	{ .compatible = "brcm,bcm11360-srab", .data = (void *)BCM58XX_DEVICE_ID },
+	{ .compatible = "brcm,bcm11360-srab", .data = (void *)BCM583XX_DEVICE_ID },
 	{ .compatible = "brcm,bcm58522-srab", .data = (void *)BCM58XX_DEVICE_ID },
 	{ .compatible = "brcm,bcm58525-srab", .data = (void *)BCM58XX_DEVICE_ID },
 	{ .compatible = "brcm,bcm58535-srab", .data = (void *)BCM58XX_DEVICE_ID },
@@ -372,7 +372,7 @@ static int b53_srab_write64(struct b53_device *dev, u8 page, u8 reg,
 	{ .compatible = "brcm,bcm58623-srab", .data = (void *)BCM58XX_DEVICE_ID },
 	{ .compatible = "brcm,bcm58625-srab", .data = (void *)BCM58XX_DEVICE_ID },
 	{ .compatible = "brcm,bcm88312-srab", .data = (void *)BCM58XX_DEVICE_ID },
-	{ .compatible = "brcm,cygnus-srab", .data = (void *)BCM58XX_DEVICE_ID },
+	{ .compatible = "brcm,cygnus-srab", .data = (void *)BCM583XX_DEVICE_ID },
 	{ .compatible = "brcm,nsp-srab", .data = (void *)BCM58XX_DEVICE_ID },
 	{ /* sentinel */ },
 };
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/1] net: dsa: b53: Fix for brcm tag issue in Cygnus SoC
  2018-06-05 20:38 [PATCH 1/1] net: dsa: b53: Fix for brcm tag issue in Cygnus SoC Arun Parameswaran
@ 2018-06-05 20:55 ` Scott Branden
  2018-06-06  8:32   ` Clément Péron
  2018-06-05 21:41 ` Florian Fainelli
  1 sibling, 1 reply; 5+ messages in thread
From: Scott Branden @ 2018-06-05 20:55 UTC (permalink / raw)
  To: Arun Parameswaran, Florian Fainelli, Vivien Didelot, Andrew Lunn,
	David S. Miller, Clément Péron
  Cc: netdev, linux-kernel, bcm-kernel-feedback-list

Clement,

Please test this works for your issue.


On 18-06-05 01:38 PM, Arun Parameswaran wrote:
> In the Broadcom Cygnus SoC, the brcm tag needs to be inserted
> in between the mac address and the ether type (should use
> 'DSA_PROTO_TAG_BRCM') for the packets sent to the internal
> b53 switch.
>
> Since the Cygnus was added with the BCM58XX device id and the
> BCM58XX uses 'DSA_PROTO_TAG_BRCM_PREPEND', the data path is
> broken, due to the incorrect brcm tag location.
>
> Add a new b53 device id (BCM583XX) for Cygnus family to fix the
> issue. Add the new device id to the BCM58XX family as Cygnus
> is similar to the BCM58XX in most other functionalities.
>
> Fixes: 11606039604c ("net: dsa: b53: Support prepended Broadcom tags")
>
> Signed-off-by: Arun Parameswaran <arun.parameswaran@broadcom.com>
Acked-by: Scott Branden <scott.branden@broadcom.com>
> ---
>   drivers/net/dsa/b53/b53_common.c | 15 ++++++++++++++-
>   drivers/net/dsa/b53/b53_priv.h   |  2 ++
>   drivers/net/dsa/b53/b53_srab.c   |  4 ++--
>   3 files changed, 18 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c
> index 3da5fca..bbc6cc6 100644
> --- a/drivers/net/dsa/b53/b53_common.c
> +++ b/drivers/net/dsa/b53/b53_common.c
> @@ -684,7 +684,8 @@ static int b53_switch_reset(struct b53_device *dev)
>   	 * still use this driver as a library and need to perform the reset
>   	 * earlier.
>   	 */
> -	if (dev->chip_id == BCM58XX_DEVICE_ID) {
> +	if (dev->chip_id == BCM58XX_DEVICE_ID ||
> +	    dev->chip_id == BCM583XX_DEVICE_ID) {
>   		b53_read8(dev, B53_CTRL_PAGE, B53_SOFTRESET, &reg);
>   		reg |= SW_RST | EN_SW_RST | EN_CH_RST;
>   		b53_write8(dev, B53_CTRL_PAGE, B53_SOFTRESET, reg);
> @@ -1880,6 +1881,18 @@ struct b53_chip_data {
>   		.jumbo_size_reg = B53_JUMBO_MAX_SIZE,
>   	},
>   	{
> +		.chip_id = BCM583XX_DEVICE_ID,
> +		.dev_name = "BCM583xx/11360",
> +		.vlans = 4096,
> +		.enabled_ports = 0x103,
> +		.arl_entries = 4,
> +		.cpu_port = B53_CPU_PORT,
> +		.vta_regs = B53_VTA_REGS,
> +		.duplex_reg = B53_DUPLEX_STAT_GE,
> +		.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
> +		.jumbo_size_reg = B53_JUMBO_MAX_SIZE,
> +	},
> +	{
>   		.chip_id = BCM7445_DEVICE_ID,
>   		.dev_name = "BCM7445",
>   		.vlans	= 4096,
> diff --git a/drivers/net/dsa/b53/b53_priv.h b/drivers/net/dsa/b53/b53_priv.h
> index 3b57f47..b232aaa 100644
> --- a/drivers/net/dsa/b53/b53_priv.h
> +++ b/drivers/net/dsa/b53/b53_priv.h
> @@ -62,6 +62,7 @@ enum {
>   	BCM53018_DEVICE_ID = 0x53018,
>   	BCM53019_DEVICE_ID = 0x53019,
>   	BCM58XX_DEVICE_ID = 0x5800,
> +	BCM583XX_DEVICE_ID = 0x58300,
>   	BCM7445_DEVICE_ID = 0x7445,
>   	BCM7278_DEVICE_ID = 0x7278,
>   };
> @@ -181,6 +182,7 @@ static inline int is5301x(struct b53_device *dev)
>   static inline int is58xx(struct b53_device *dev)
>   {
>   	return dev->chip_id == BCM58XX_DEVICE_ID ||
> +		dev->chip_id == BCM583XX_DEVICE_ID ||
>   		dev->chip_id == BCM7445_DEVICE_ID ||
>   		dev->chip_id == BCM7278_DEVICE_ID;
>   }
> diff --git a/drivers/net/dsa/b53/b53_srab.c b/drivers/net/dsa/b53/b53_srab.c
> index c37ffd1..8247481 100644
> --- a/drivers/net/dsa/b53/b53_srab.c
> +++ b/drivers/net/dsa/b53/b53_srab.c
> @@ -364,7 +364,7 @@ static int b53_srab_write64(struct b53_device *dev, u8 page, u8 reg,
>   	{ .compatible = "brcm,bcm53018-srab" },
>   	{ .compatible = "brcm,bcm53019-srab" },
>   	{ .compatible = "brcm,bcm5301x-srab" },
> -	{ .compatible = "brcm,bcm11360-srab", .data = (void *)BCM58XX_DEVICE_ID },
> +	{ .compatible = "brcm,bcm11360-srab", .data = (void *)BCM583XX_DEVICE_ID },
>   	{ .compatible = "brcm,bcm58522-srab", .data = (void *)BCM58XX_DEVICE_ID },
>   	{ .compatible = "brcm,bcm58525-srab", .data = (void *)BCM58XX_DEVICE_ID },
>   	{ .compatible = "brcm,bcm58535-srab", .data = (void *)BCM58XX_DEVICE_ID },
> @@ -372,7 +372,7 @@ static int b53_srab_write64(struct b53_device *dev, u8 page, u8 reg,
>   	{ .compatible = "brcm,bcm58623-srab", .data = (void *)BCM58XX_DEVICE_ID },
>   	{ .compatible = "brcm,bcm58625-srab", .data = (void *)BCM58XX_DEVICE_ID },
>   	{ .compatible = "brcm,bcm88312-srab", .data = (void *)BCM58XX_DEVICE_ID },
> -	{ .compatible = "brcm,cygnus-srab", .data = (void *)BCM58XX_DEVICE_ID },
> +	{ .compatible = "brcm,cygnus-srab", .data = (void *)BCM583XX_DEVICE_ID },
>   	{ .compatible = "brcm,nsp-srab", .data = (void *)BCM58XX_DEVICE_ID },
>   	{ /* sentinel */ },
>   };

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/1] net: dsa: b53: Fix for brcm tag issue in Cygnus SoC
  2018-06-05 20:38 [PATCH 1/1] net: dsa: b53: Fix for brcm tag issue in Cygnus SoC Arun Parameswaran
  2018-06-05 20:55 ` Scott Branden
@ 2018-06-05 21:41 ` Florian Fainelli
  2018-06-06 17:48   ` David Miller
  1 sibling, 1 reply; 5+ messages in thread
From: Florian Fainelli @ 2018-06-05 21:41 UTC (permalink / raw)
  To: Arun Parameswaran, Vivien Didelot, Andrew Lunn, David S. Miller
  Cc: netdev, linux-kernel, bcm-kernel-feedback-list, Clément Péron

On 06/05/2018 01:38 PM, Arun Parameswaran wrote:
> In the Broadcom Cygnus SoC, the brcm tag needs to be inserted
> in between the mac address and the ether type (should use
> 'DSA_PROTO_TAG_BRCM') for the packets sent to the internal
> b53 switch.
> 
> Since the Cygnus was added with the BCM58XX device id and the
> BCM58XX uses 'DSA_PROTO_TAG_BRCM_PREPEND', the data path is
> broken, due to the incorrect brcm tag location.
> 
> Add a new b53 device id (BCM583XX) for Cygnus family to fix the
> issue. Add the new device id to the BCM58XX family as Cygnus
> is similar to the BCM58XX in most other functionalities.
> 
> Fixes: 11606039604c ("net: dsa: b53: Support prepended Broadcom tags")
> 
> Signed-off-by: Arun Parameswaran <arun.parameswaran@broadcom.com>

Clement originally reported this to me/us:

Reported-by: Clément Péron <peron.clem@gmail.com>

I completely overlooked that when adding support for prepended Broadcom
tags, thanks for the fix Arun!

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>

David, can you also queue this up for -stable? Thank you

> ---
>  drivers/net/dsa/b53/b53_common.c | 15 ++++++++++++++-
>  drivers/net/dsa/b53/b53_priv.h   |  2 ++
>  drivers/net/dsa/b53/b53_srab.c   |  4 ++--
>  3 files changed, 18 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c
> index 3da5fca..bbc6cc6 100644
> --- a/drivers/net/dsa/b53/b53_common.c
> +++ b/drivers/net/dsa/b53/b53_common.c
> @@ -684,7 +684,8 @@ static int b53_switch_reset(struct b53_device *dev)
>  	 * still use this driver as a library and need to perform the reset
>  	 * earlier.
>  	 */
> -	if (dev->chip_id == BCM58XX_DEVICE_ID) {
> +	if (dev->chip_id == BCM58XX_DEVICE_ID ||
> +	    dev->chip_id == BCM583XX_DEVICE_ID) {
>  		b53_read8(dev, B53_CTRL_PAGE, B53_SOFTRESET, &reg);
>  		reg |= SW_RST | EN_SW_RST | EN_CH_RST;
>  		b53_write8(dev, B53_CTRL_PAGE, B53_SOFTRESET, reg);
> @@ -1880,6 +1881,18 @@ struct b53_chip_data {
>  		.jumbo_size_reg = B53_JUMBO_MAX_SIZE,
>  	},
>  	{
> +		.chip_id = BCM583XX_DEVICE_ID,
> +		.dev_name = "BCM583xx/11360",
> +		.vlans = 4096,
> +		.enabled_ports = 0x103,
> +		.arl_entries = 4,
> +		.cpu_port = B53_CPU_PORT,
> +		.vta_regs = B53_VTA_REGS,
> +		.duplex_reg = B53_DUPLEX_STAT_GE,
> +		.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
> +		.jumbo_size_reg = B53_JUMBO_MAX_SIZE,
> +	},
> +	{
>  		.chip_id = BCM7445_DEVICE_ID,
>  		.dev_name = "BCM7445",
>  		.vlans	= 4096,
> diff --git a/drivers/net/dsa/b53/b53_priv.h b/drivers/net/dsa/b53/b53_priv.h
> index 3b57f47..b232aaa 100644
> --- a/drivers/net/dsa/b53/b53_priv.h
> +++ b/drivers/net/dsa/b53/b53_priv.h
> @@ -62,6 +62,7 @@ enum {
>  	BCM53018_DEVICE_ID = 0x53018,
>  	BCM53019_DEVICE_ID = 0x53019,
>  	BCM58XX_DEVICE_ID = 0x5800,
> +	BCM583XX_DEVICE_ID = 0x58300,
>  	BCM7445_DEVICE_ID = 0x7445,
>  	BCM7278_DEVICE_ID = 0x7278,
>  };
> @@ -181,6 +182,7 @@ static inline int is5301x(struct b53_device *dev)
>  static inline int is58xx(struct b53_device *dev)
>  {
>  	return dev->chip_id == BCM58XX_DEVICE_ID ||
> +		dev->chip_id == BCM583XX_DEVICE_ID ||
>  		dev->chip_id == BCM7445_DEVICE_ID ||
>  		dev->chip_id == BCM7278_DEVICE_ID;
>  }
> diff --git a/drivers/net/dsa/b53/b53_srab.c b/drivers/net/dsa/b53/b53_srab.c
> index c37ffd1..8247481 100644
> --- a/drivers/net/dsa/b53/b53_srab.c
> +++ b/drivers/net/dsa/b53/b53_srab.c
> @@ -364,7 +364,7 @@ static int b53_srab_write64(struct b53_device *dev, u8 page, u8 reg,
>  	{ .compatible = "brcm,bcm53018-srab" },
>  	{ .compatible = "brcm,bcm53019-srab" },
>  	{ .compatible = "brcm,bcm5301x-srab" },
> -	{ .compatible = "brcm,bcm11360-srab", .data = (void *)BCM58XX_DEVICE_ID },
> +	{ .compatible = "brcm,bcm11360-srab", .data = (void *)BCM583XX_DEVICE_ID },
>  	{ .compatible = "brcm,bcm58522-srab", .data = (void *)BCM58XX_DEVICE_ID },
>  	{ .compatible = "brcm,bcm58525-srab", .data = (void *)BCM58XX_DEVICE_ID },
>  	{ .compatible = "brcm,bcm58535-srab", .data = (void *)BCM58XX_DEVICE_ID },
> @@ -372,7 +372,7 @@ static int b53_srab_write64(struct b53_device *dev, u8 page, u8 reg,
>  	{ .compatible = "brcm,bcm58623-srab", .data = (void *)BCM58XX_DEVICE_ID },
>  	{ .compatible = "brcm,bcm58625-srab", .data = (void *)BCM58XX_DEVICE_ID },
>  	{ .compatible = "brcm,bcm88312-srab", .data = (void *)BCM58XX_DEVICE_ID },
> -	{ .compatible = "brcm,cygnus-srab", .data = (void *)BCM58XX_DEVICE_ID },
> +	{ .compatible = "brcm,cygnus-srab", .data = (void *)BCM583XX_DEVICE_ID },
>  	{ .compatible = "brcm,nsp-srab", .data = (void *)BCM58XX_DEVICE_ID },
>  	{ /* sentinel */ },
>  };
> 


-- 
Florian

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/1] net: dsa: b53: Fix for brcm tag issue in Cygnus SoC
  2018-06-05 20:55 ` Scott Branden
@ 2018-06-06  8:32   ` Clément Péron
  0 siblings, 0 replies; 5+ messages in thread
From: Clément Péron @ 2018-06-06  8:32 UTC (permalink / raw)
  To: scott.branden
  Cc: arun.parameswaran, Florian Fainelli, vivien.didelot, andrew,
	davem, netdev, linux-kernel, BCM Kernel Feedback

Hi Scott,

On Tue, 5 Jun 2018 at 22:55, Scott Branden <scott.branden@broadcom.com> wrote:
>
> Clement,
>
> Please test this works for your issue.

Tested on top of 4.17.0 with a BCM58305

Tested-by: Clément Péron <peron.clem@gmail.com>

>
>
> On 18-06-05 01:38 PM, Arun Parameswaran wrote:
> > In the Broadcom Cygnus SoC, the brcm tag needs to be inserted
> > in between the mac address and the ether type (should use
> > 'DSA_PROTO_TAG_BRCM') for the packets sent to the internal
> > b53 switch.
> >
> > Since the Cygnus was added with the BCM58XX device id and the
> > BCM58XX uses 'DSA_PROTO_TAG_BRCM_PREPEND', the data path is
> > broken, due to the incorrect brcm tag location.
> >
> > Add a new b53 device id (BCM583XX) for Cygnus family to fix the
> > issue. Add the new device id to the BCM58XX family as Cygnus
> > is similar to the BCM58XX in most other functionalities.
> >
> > Fixes: 11606039604c ("net: dsa: b53: Support prepended Broadcom tags")
> >
> > Signed-off-by: Arun Parameswaran <arun.parameswaran@broadcom.com>
> Acked-by: Scott Branden <scott.branden@broadcom.com>
> > ---
> >   drivers/net/dsa/b53/b53_common.c | 15 ++++++++++++++-
> >   drivers/net/dsa/b53/b53_priv.h   |  2 ++
> >   drivers/net/dsa/b53/b53_srab.c   |  4 ++--
> >   3 files changed, 18 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c
> > index 3da5fca..bbc6cc6 100644
> > --- a/drivers/net/dsa/b53/b53_common.c
> > +++ b/drivers/net/dsa/b53/b53_common.c
> > @@ -684,7 +684,8 @@ static int b53_switch_reset(struct b53_device *dev)
> >        * still use this driver as a library and need to perform the reset
> >        * earlier.
> >        */
> > -     if (dev->chip_id == BCM58XX_DEVICE_ID) {
> > +     if (dev->chip_id == BCM58XX_DEVICE_ID ||
> > +         dev->chip_id == BCM583XX_DEVICE_ID) {
> >               b53_read8(dev, B53_CTRL_PAGE, B53_SOFTRESET, &reg);
> >               reg |= SW_RST | EN_SW_RST | EN_CH_RST;
> >               b53_write8(dev, B53_CTRL_PAGE, B53_SOFTRESET, reg);
> > @@ -1880,6 +1881,18 @@ struct b53_chip_data {
> >               .jumbo_size_reg = B53_JUMBO_MAX_SIZE,
> >       },
> >       {
> > +             .chip_id = BCM583XX_DEVICE_ID,
> > +             .dev_name = "BCM583xx/11360",
> > +             .vlans = 4096,
> > +             .enabled_ports = 0x103,
> > +             .arl_entries = 4,
> > +             .cpu_port = B53_CPU_PORT,
> > +             .vta_regs = B53_VTA_REGS,
> > +             .duplex_reg = B53_DUPLEX_STAT_GE,
> > +             .jumbo_pm_reg = B53_JUMBO_PORT_MASK,
> > +             .jumbo_size_reg = B53_JUMBO_MAX_SIZE,
> > +     },
> > +     {
> >               .chip_id = BCM7445_DEVICE_ID,
> >               .dev_name = "BCM7445",
> >               .vlans  = 4096,
> > diff --git a/drivers/net/dsa/b53/b53_priv.h b/drivers/net/dsa/b53/b53_priv.h
> > index 3b57f47..b232aaa 100644
> > --- a/drivers/net/dsa/b53/b53_priv.h
> > +++ b/drivers/net/dsa/b53/b53_priv.h
> > @@ -62,6 +62,7 @@ enum {
> >       BCM53018_DEVICE_ID = 0x53018,
> >       BCM53019_DEVICE_ID = 0x53019,
> >       BCM58XX_DEVICE_ID = 0x5800,
> > +     BCM583XX_DEVICE_ID = 0x58300,
> >       BCM7445_DEVICE_ID = 0x7445,
> >       BCM7278_DEVICE_ID = 0x7278,
> >   };
> > @@ -181,6 +182,7 @@ static inline int is5301x(struct b53_device *dev)
> >   static inline int is58xx(struct b53_device *dev)
> >   {
> >       return dev->chip_id == BCM58XX_DEVICE_ID ||
> > +             dev->chip_id == BCM583XX_DEVICE_ID ||
> >               dev->chip_id == BCM7445_DEVICE_ID ||
> >               dev->chip_id == BCM7278_DEVICE_ID;
> >   }
> > diff --git a/drivers/net/dsa/b53/b53_srab.c b/drivers/net/dsa/b53/b53_srab.c
> > index c37ffd1..8247481 100644
> > --- a/drivers/net/dsa/b53/b53_srab.c
> > +++ b/drivers/net/dsa/b53/b53_srab.c
> > @@ -364,7 +364,7 @@ static int b53_srab_write64(struct b53_device *dev, u8 page, u8 reg,
> >       { .compatible = "brcm,bcm53018-srab" },
> >       { .compatible = "brcm,bcm53019-srab" },
> >       { .compatible = "brcm,bcm5301x-srab" },
> > -     { .compatible = "brcm,bcm11360-srab", .data = (void *)BCM58XX_DEVICE_ID },
> > +     { .compatible = "brcm,bcm11360-srab", .data = (void *)BCM583XX_DEVICE_ID },
> >       { .compatible = "brcm,bcm58522-srab", .data = (void *)BCM58XX_DEVICE_ID },
> >       { .compatible = "brcm,bcm58525-srab", .data = (void *)BCM58XX_DEVICE_ID },
> >       { .compatible = "brcm,bcm58535-srab", .data = (void *)BCM58XX_DEVICE_ID },
> > @@ -372,7 +372,7 @@ static int b53_srab_write64(struct b53_device *dev, u8 page, u8 reg,
> >       { .compatible = "brcm,bcm58623-srab", .data = (void *)BCM58XX_DEVICE_ID },
> >       { .compatible = "brcm,bcm58625-srab", .data = (void *)BCM58XX_DEVICE_ID },
> >       { .compatible = "brcm,bcm88312-srab", .data = (void *)BCM58XX_DEVICE_ID },
> > -     { .compatible = "brcm,cygnus-srab", .data = (void *)BCM58XX_DEVICE_ID },
> > +     { .compatible = "brcm,cygnus-srab", .data = (void *)BCM583XX_DEVICE_ID },
> >       { .compatible = "brcm,nsp-srab", .data = (void *)BCM58XX_DEVICE_ID },
> >       { /* sentinel */ },
> >   };
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/1] net: dsa: b53: Fix for brcm tag issue in Cygnus SoC
  2018-06-05 21:41 ` Florian Fainelli
@ 2018-06-06 17:48   ` David Miller
  0 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2018-06-06 17:48 UTC (permalink / raw)
  To: f.fainelli
  Cc: arun.parameswaran, vivien.didelot, andrew, netdev, linux-kernel,
	bcm-kernel-feedback-list, peron.clem

From: Florian Fainelli <f.fainelli@gmail.com>
Date: Tue, 5 Jun 2018 14:41:41 -0700

> On 06/05/2018 01:38 PM, Arun Parameswaran wrote:
>> In the Broadcom Cygnus SoC, the brcm tag needs to be inserted
>> in between the mac address and the ether type (should use
>> 'DSA_PROTO_TAG_BRCM') for the packets sent to the internal
>> b53 switch.
>> 
>> Since the Cygnus was added with the BCM58XX device id and the
>> BCM58XX uses 'DSA_PROTO_TAG_BRCM_PREPEND', the data path is
>> broken, due to the incorrect brcm tag location.
>> 
>> Add a new b53 device id (BCM583XX) for Cygnus family to fix the
>> issue. Add the new device id to the BCM58XX family as Cygnus
>> is similar to the BCM58XX in most other functionalities.
>> 
>> Fixes: 11606039604c ("net: dsa: b53: Support prepended Broadcom tags")
>> 
>> Signed-off-by: Arun Parameswaran <arun.parameswaran@broadcom.com>
> 
> Clement originally reported this to me/us:
> 
> Reported-by: Clément Péron <peron.clem@gmail.com>
> 
> I completely overlooked that when adding support for prepended Broadcom
> tags, thanks for the fix Arun!
> 
> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
> 
> David, can you also queue this up for -stable? Thank you

Applied and queued up for -stable, thanks everyone.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-06-06 17:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-05 20:38 [PATCH 1/1] net: dsa: b53: Fix for brcm tag issue in Cygnus SoC Arun Parameswaran
2018-06-05 20:55 ` Scott Branden
2018-06-06  8:32   ` Clément Péron
2018-06-05 21:41 ` Florian Fainelli
2018-06-06 17:48   ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.