netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Zhu Yanjun <zyjzyj2000@gmail.com>
To: sandeep.kumar@freescale.com, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, Yue.Tao@windriver.com,
	guang.yang@windriver.com, joe@perches.com, festevam@gmail.com,
	richardcochran@gmail.com, clarocq@gmail.com,
	yongjun_wei@trendmicro.com.cn, claudiu.manoil@freescale.com,
	w@1wt.eu, roy.xu@huawei.com, sky.wangfeng@huawei.com,
	zyjzyj2000@gmail.com
Cc: Zhu Yanjun <Yanjun.Zhu@windriver.com>
Subject: [PATCH] gianfar: disable vlan tag insertion by default
Date: Wed, 15 Oct 2014 18:00:34 +0800	[thread overview]
Message-ID: <1413367234-28652-2-git-send-email-Yanjun.Zhu@windriver.com> (raw)
In-Reply-To: <1413367234-28652-1-git-send-email-Yanjun.Zhu@windriver.com>

2.6.x kernels require a similar logic change as commit 51b8cbfc
[gianfar: fix bug caused by e1653c3e] introduces for newer kernels.

Gianfar driver originally enables vlan tag insertion by default.
This will lead to unusable connections on some configurations.

Since gianfar nic vlan tag insertion is disabled by default and 
it is not enabled any longer, it is not necessary to disable it 
again.

Reported-by: Xu Jianrong <roy.xu@huawei.com>
Suggested-by: Wang Feng <sky.wangfeng@huawei.com>
---
 drivers/net/gianfar.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c
index 8aa2cf6..afdcb41 100644
--- a/drivers/net/gianfar.c
+++ b/drivers/net/gianfar.c
@@ -1115,7 +1115,6 @@ int startup_gfar(struct net_device *dev)
 	/* keep vlan related bits if it's enabled */
 	if (priv->vlgrp) {
 		rctrl |= RCTRL_VLEX | RCTRL_PRSDEP_INIT;
-		tctrl |= TCTRL_VLINS;
 	}
 
 	/* Init rctrl based on our settings */
@@ -1456,11 +1455,6 @@ static void gfar_vlan_rx_register(struct net_device *dev,
 		tempval |= (RCTRL_VLEX | RCTRL_PRSDEP_INIT);
 		gfar_write(&priv->regs->rctrl, tempval);
 	} else {
-		/* Disable VLAN tag insertion */
-		tempval = gfar_read(&priv->regs->tctrl);
-		tempval &= ~TCTRL_VLINS;
-		gfar_write(&priv->regs->tctrl, tempval);
-
 		/* Disable VLAN tag extraction */
 		tempval = gfar_read(&priv->regs->rctrl);
 		tempval &= ~RCTRL_VLEX;
-- 
1.9.1

  reply	other threads:[~2014-10-15 10:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-15 10:00 [PATCH] gianfar: disable vlan tag insertion by default on 2.6.x Zhu Yanjun
2014-10-15 10:00 ` Zhu Yanjun [this message]
2014-10-15 10:09 ` Willy Tarreau
2014-10-15 10:15   ` yzhu1
2014-10-15 10:22     ` zhuyj
2014-10-15 12:01       ` Willy Tarreau

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=1413367234-28652-2-git-send-email-Yanjun.Zhu@windriver.com \
    --to=zyjzyj2000@gmail.com \
    --cc=Yanjun.Zhu@windriver.com \
    --cc=Yue.Tao@windriver.com \
    --cc=clarocq@gmail.com \
    --cc=claudiu.manoil@freescale.com \
    --cc=festevam@gmail.com \
    --cc=guang.yang@windriver.com \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=richardcochran@gmail.com \
    --cc=roy.xu@huawei.com \
    --cc=sandeep.kumar@freescale.com \
    --cc=sky.wangfeng@huawei.com \
    --cc=w@1wt.eu \
    --cc=yongjun_wei@trendmicro.com.cn \
    /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).