All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mugunthan V N <mugunthanvnm@ti.com>
To: <yegorslists@googlemail.com>, <netdev@vger.kernel.org>
Subject: Re: [PATCH v2] net: cpsw: fix dual_emac VLAN issue
Date: Wed, 9 Apr 2014 18:39:38 +0530	[thread overview]
Message-ID: <53454692.309@ti.com> (raw)
In-Reply-To: <1397048023-10522-1-git-send-email-yegorslists@googlemail.com>

On Wednesday 09 April 2014 06:23 PM, yegorslists@googlemail.com wrote:
> From: Yegor Yefremov <yegorslists@googlemail.com>
>
> dual_emac mode was first introduced in TI's PSP kernel 3.2.
> See repository git://arago-project.org/git/projects/linux-am33x.git
> commit 6afa003a0b06a0376c941436b38204ba2edc4a98.
>
> Since commit d9ba8f9e6298af71ec1c1fd3d88c3ef68abd0ec3 dual_emac
> feature was upstreamed, but with some changes compared to the original
> source, that led to following behavior:
>
> Some stations in LAN don't answer CPSW's ARP request. PSP kernel 3.2
> could talk to all stations in the same LAN.
>
> Use the same cpsw_ale_add_vlan procedure as in PSP kernel 3.2 to fix
> this regression.
>
> Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
> CC: Mugunthan V N <mugunthanvnm@ti.com>
> ---
> Changes:
> 	v2: make more detailed description
>
>  drivers/net/ethernet/ti/cpsw.c |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
> index 5d5fec6..aa06370 100644
> --- a/drivers/net/ethernet/ti/cpsw.c
> +++ b/drivers/net/ethernet/ti/cpsw.c
> @@ -1040,11 +1040,13 @@ static inline void cpsw_add_dual_emac_def_ale_entries(
>  	else
>  		slave_write(slave, slave->port_vlan, CPSW2_PORT_VLAN);
>  	cpsw_ale_add_vlan(priv->ale, slave->port_vlan, port_mask,
> -			  port_mask, port_mask, 0);
> +			  0, port_mask, port_mask);

Dual EMAC VLAN must be untagged on egress and why you need unregistered
multicast packet to be passed to CPU?

>  	cpsw_ale_add_mcast(priv->ale, priv->ndev->broadcast,
>  			   port_mask, ALE_VLAN, slave->port_vlan, 0);
>  	cpsw_ale_add_ucast(priv->ale, priv->mac_addr,
>  		priv->host_port, ALE_VLAN, slave->port_vlan);
> +	cpsw_ale_add_vlan(priv->ale, 0, ALE_ALL_PORTS << priv->host_port,
> +		ALE_ALL_PORTS << priv->host_port, priv->host_port, 0);

Vlan ID 0 must not be used, cpsw default vlan id should be used,
currently 0 is used as default VLAN for internal packet switching, in
case some one using different default vlan id, then this fix will break.

I have fixed the issue already and submitted a patch.
http://patchwork.ozlabs.org/patch/337769/

Regards
Mugunthan V N

  reply	other threads:[~2014-04-09 13:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-09 12:53 [PATCH v2] net: cpsw: fix dual_emac VLAN issue yegorslists
2014-04-09 13:09 ` Mugunthan V N [this message]
2014-04-09 13:47   ` Yegor Yefremov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53454692.309@ti.com \
    --to=mugunthanvnm@ti.com \
    --cc=netdev@vger.kernel.org \
    --cc=yegorslists@googlemail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.