netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: yegorslists@googlemail.com
To: netdev@vger.kernel.org
Cc: mugunthanvnm@ti.com, Yegor Yefremov <yegorslists@googlemail.com>
Subject: [PATCH] net: cpsw: fix dual_emac VLAN issue
Date: Tue,  8 Apr 2014 16:58:30 +0200	[thread overview]
Message-ID: <1396969110-3114-2-git-send-email-yegorslists@googlemail.com> (raw)
In-Reply-To: <1396969110-3114-1-git-send-email-yegorslists@googlemail.com>

From: Yegor Yefremov <yegorslists@googlemail.com>

CPSW shows following behavior: some stations in LAN don't
answer CPSW's ARP request. Kernel 3.2 could talk to all stations in
the same LAN.

Use the same cpsw_ale_add_vlan procedure as in kernel 3.2.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
---
 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);
 	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);
 }
 
 static void soft_reset_slave(struct cpsw_slave *slave)
-- 
1.7.7

  reply	other threads:[~2014-04-08 14:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-08 14:58 CPSW: dual_emac issue (D-01525) yegorslists
2014-04-08 14:58 ` yegorslists [this message]
2014-04-08 18:15   ` [PATCH] net: cpsw: fix dual_emac VLAN issue David Miller
2014-04-08 18:57     ` 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=1396969110-3114-2-git-send-email-yegorslists@googlemail.com \
    --to=yegorslists@googlemail.com \
    --cc=mugunthanvnm@ti.com \
    --cc=netdev@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).