From patchwork Wed Oct 15 10:22:24 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhu Yanjun X-Patchwork-Id: 399916 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 0C41E14012D for ; Wed, 15 Oct 2014 21:22:56 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752269AbaJOKWk (ORCPT ); Wed, 15 Oct 2014 06:22:40 -0400 Received: from mail-pa0-f41.google.com ([209.85.220.41]:56678 "EHLO mail-pa0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752250AbaJOKWi (ORCPT ); Wed, 15 Oct 2014 06:22:38 -0400 Received: by mail-pa0-f41.google.com with SMTP id eu11so1085302pac.0 for ; Wed, 15 Oct 2014 03:22:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type; bh=AqolcfntrkHrbwNppQtouSpfDa02ivlFieyaVdCv6v4=; b=vBa2iatwtKJsqxD52qjP9wzPyb1/MO1MKpQXP4mJO2OWxJkl7ZUlPa2FBgkllCwWeZ 8jegsXvILVHpLLpfTi4egMA2zkLKkxCmeX6w8mM5wIJ5hjexSfPM1WNcjWlaxrcBzhlU xzMJWTNMMNSJCWO3dK1Q7zer/vfNWKE4df5f3XHdnnb2upSVz85f3TUkfrtpHIwbmsEA +R1C8GfVnEdpLz2O2ehW88ik12l5bGIsCduHcKF1NA8F92DF2z5O1r5wG4LZHNoKm1Wz jWa5p/nb6oJ8E1zmnd2okdsIiSrJ4XLNigMQ6QhhcBqp49c+oJIGAk5MkrWjaXxTXxAK zBaA== X-Received: by 10.70.102.162 with SMTP id fp2mr11599989pdb.112.1413368557047; Wed, 15 Oct 2014 03:22:37 -0700 (PDT) Received: from [128.224.162.201] ([106.120.101.38]) by mx.google.com with ESMTPSA id fk10sm16675953pdb.49.2014.10.15.03.22.27 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 15 Oct 2014 03:22:36 -0700 (PDT) Message-ID: <543E4AE0.2010207@gmail.com> Date: Wed, 15 Oct 2014 18:22:24 +0800 From: zhuyj User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: yzhu1 , Willy Tarreau CC: 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, roy.xu@huawei.com, sky.wangfeng@huawei.com, zhuyj Subject: Re: [PATCH] gianfar: disable vlan tag insertion by default on 2.6.x References: <1413367234-28652-1-git-send-email-Yanjun.Zhu@windriver.com> <20141015100949.GA30089@1wt.eu> <543E4949.1050606@windriver.com> In-Reply-To: <543E4949.1050606@windriver.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On 10/15/2014 06:15 PM, yzhu1 wrote: > On 10/15/2014 06:09 PM, Willy Tarreau wrote: >> Hi Zhu, >> >> On Wed, Oct 15, 2014 at 06:00:33PM +0800, Zhu Yanjun wrote: >>> In commit f43c75d4b6[gianfar: disable TX vlan based on kernel 2.6.x], >>> gianfar nic disables TX vlan. But gianfar nic enables vlan tag >>> insertion by default. This will lead to unusable connections on >>> some configurations. Since vlan tag insertion is disabled by default >>> and it is not enabled any longer, it is not necessary to disable it >>> again. >>> >>> Zhu Yanjun (1): >>> gianfar: disable vlan tag insertion by default >>> >>> drivers/net/gianfar.c | 6 ------ >>> 1 file changed, 6 deletions(-) >>> >>> -- >>> 1.9.1 >> There's no patch in this e-mail. Since you sent another e-mail with >> almost >> the same subject, I'm confused, it's unclear to me whether I only >> need to >> apply the patch in the other one with this commit message or if it's >> just >> that you accidently dropped the patch when sending this e-mail. Could >> you >> please enlighten me ? >> >> Thanks, >> Willy >> > Hi, Willy > > Sorry. Please apply the patch in the other one with this commit message. > > Thanks a lot. > Zhu Yanjun > Hi, Willy Sorry, it is my fault. Please apply this patch in the attachment. Thanks a lot. Zhu Yanjun From 48cb11f57e363e8831c4bcaa854d6df23ca300f7 Mon Sep 17 00:00:00 2001 From: Zhu Yanjun Date: Wed, 15 Oct 2014 16:52:51 +0800 Subject: [PATCH] gianfar: disable vlan tag insertion by default 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 Suggested-by: Wang Feng Signed-off-by: Zhu Yanjun --- 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