All of lore.kernel.org
 help / color / mirror / Atom feed
* [BUG?] drivers: net:ethernet: cpsw: add support for VLAN
@ 2015-04-22 22:28 ` Christoph Fritz
  0 siblings, 0 replies; 4+ messages in thread
From: Christoph Fritz @ 2015-04-22 22:28 UTC (permalink / raw)
  To: Mugunthan V N, Felipe Balbi; +Cc: linux-omap, linux-arm-kernel

Hi,

 has commit 3b72c2fe0c6bbec42e ("drivers: net:ethernet: cpsw: add
support for VLAN") introduced a bug by defining CPSW_VLAN_AWARE as
BIT(1) instead of BIT(2)?

+#define CPSW_VLAN_AWARE		BIT(1)
<snip>
 	/* switch to vlan unaware mode */
-	cpsw_ale_control_set(priv->ale, 0, ALE_VLAN_AWARE, 0);
+	cpsw_ale_control_set(priv->ale, priv->host_port, ALE_VLAN_AWARE,
+			     CPSW_ALE_VLAN_AWARE);
+	control_reg = readl(&priv->regs->control);
+	control_reg |= CPSW_VLAN_AWARE;
+	writel(control_reg, &priv->regs->control);

See TRM [1] page 1980 (14.5.1.2 CONTROL Register), there bit
CPSW_VLAN_AWARE is number 2.

I didn't do any tests, just stumbled upon.

[1]: http://www.ti.com/lit/ug/spruh73l/spruh73l.pdf

Thanks
 -- Christoph


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

* [BUG?] drivers: net:ethernet: cpsw: add support for VLAN
@ 2015-04-22 22:28 ` Christoph Fritz
  0 siblings, 0 replies; 4+ messages in thread
From: Christoph Fritz @ 2015-04-22 22:28 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

 has commit 3b72c2fe0c6bbec42e ("drivers: net:ethernet: cpsw: add
support for VLAN") introduced a bug by defining CPSW_VLAN_AWARE as
BIT(1) instead of BIT(2)?

+#define CPSW_VLAN_AWARE		BIT(1)
<snip>
 	/* switch to vlan unaware mode */
-	cpsw_ale_control_set(priv->ale, 0, ALE_VLAN_AWARE, 0);
+	cpsw_ale_control_set(priv->ale, priv->host_port, ALE_VLAN_AWARE,
+			     CPSW_ALE_VLAN_AWARE);
+	control_reg = readl(&priv->regs->control);
+	control_reg |= CPSW_VLAN_AWARE;
+	writel(control_reg, &priv->regs->control);

See TRM [1] page 1980 (14.5.1.2 CONTROL Register), there bit
CPSW_VLAN_AWARE is number 2.

I didn't do any tests, just stumbled upon.

[1]: http://www.ti.com/lit/ug/spruh73l/spruh73l.pdf

Thanks
 -- Christoph

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

* Re: [BUG?] drivers: net:ethernet: cpsw: add support for VLAN
  2015-04-22 22:28 ` Christoph Fritz
@ 2015-04-24  5:57   ` Mugunthan V N
  -1 siblings, 0 replies; 4+ messages in thread
From: Mugunthan V N @ 2015-04-24  5:57 UTC (permalink / raw)
  To: chf.fritz, Felipe Balbi; +Cc: linux-omap, linux-arm-kernel

On Thursday 23 April 2015 03:58 AM, Christoph Fritz wrote:
> Hi,
> 
>  has commit 3b72c2fe0c6bbec42e ("drivers: net:ethernet: cpsw: add
> support for VLAN") introduced a bug by defining CPSW_VLAN_AWARE as
> BIT(1) instead of BIT(2)?
> 
> +#define CPSW_VLAN_AWARE		BIT(1)
> <snip>
>  	/* switch to vlan unaware mode */
> -	cpsw_ale_control_set(priv->ale, 0, ALE_VLAN_AWARE, 0);
> +	cpsw_ale_control_set(priv->ale, priv->host_port, ALE_VLAN_AWARE,
> +			     CPSW_ALE_VLAN_AWARE);
> +	control_reg = readl(&priv->regs->control);
> +	control_reg |= CPSW_VLAN_AWARE;
> +	writel(control_reg, &priv->regs->control);
> 
> See TRM [1] page 1980 (14.5.1.2 CONTROL Register), there bit
> CPSW_VLAN_AWARE is number 2.
> 
> I didn't do any tests, just stumbled upon.
> 
> [1]: http://www.ti.com/lit/ug/spruh73l/spruh73l.pdf
> 

Its bug in TRM, will check with TRM team and update here.

Regards
Mugunthan V N


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

* [BUG?] drivers: net:ethernet: cpsw: add support for VLAN
@ 2015-04-24  5:57   ` Mugunthan V N
  0 siblings, 0 replies; 4+ messages in thread
From: Mugunthan V N @ 2015-04-24  5:57 UTC (permalink / raw)
  To: linux-arm-kernel

On Thursday 23 April 2015 03:58 AM, Christoph Fritz wrote:
> Hi,
> 
>  has commit 3b72c2fe0c6bbec42e ("drivers: net:ethernet: cpsw: add
> support for VLAN") introduced a bug by defining CPSW_VLAN_AWARE as
> BIT(1) instead of BIT(2)?
> 
> +#define CPSW_VLAN_AWARE		BIT(1)
> <snip>
>  	/* switch to vlan unaware mode */
> -	cpsw_ale_control_set(priv->ale, 0, ALE_VLAN_AWARE, 0);
> +	cpsw_ale_control_set(priv->ale, priv->host_port, ALE_VLAN_AWARE,
> +			     CPSW_ALE_VLAN_AWARE);
> +	control_reg = readl(&priv->regs->control);
> +	control_reg |= CPSW_VLAN_AWARE;
> +	writel(control_reg, &priv->regs->control);
> 
> See TRM [1] page 1980 (14.5.1.2 CONTROL Register), there bit
> CPSW_VLAN_AWARE is number 2.
> 
> I didn't do any tests, just stumbled upon.
> 
> [1]: http://www.ti.com/lit/ug/spruh73l/spruh73l.pdf
> 

Its bug in TRM, will check with TRM team and update here.

Regards
Mugunthan V N

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

end of thread, other threads:[~2015-04-24  5:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-22 22:28 [BUG?] drivers: net:ethernet: cpsw: add support for VLAN Christoph Fritz
2015-04-22 22:28 ` Christoph Fritz
2015-04-24  5:57 ` Mugunthan V N
2015-04-24  5:57   ` Mugunthan V N

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.