From patchwork Tue Feb 12 12:47:16 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Manoil X-Patchwork-Id: 219848 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 E419E2C0330 for ; Tue, 12 Feb 2013 23:48:24 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933148Ab3BLMsV (ORCPT ); Tue, 12 Feb 2013 07:48:21 -0500 Received: from va3ehsobe001.messaging.microsoft.com ([216.32.180.11]:28816 "EHLO va3outboundpool.messaging.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932967Ab3BLMsU (ORCPT ); Tue, 12 Feb 2013 07:48:20 -0500 Received: from mail185-va3-R.bigfish.com (10.7.14.246) by VA3EHSOBE011.bigfish.com (10.7.40.61) with Microsoft SMTP Server id 14.1.225.23; Tue, 12 Feb 2013 12:48:19 +0000 Received: from mail185-va3 (localhost [127.0.0.1]) by mail185-va3-R.bigfish.com (Postfix) with ESMTP id A998F2A014E; Tue, 12 Feb 2013 12:48:19 +0000 (UTC) X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPV:NLI; H:mail.freescale.net; RD:none; EFVD:NLI X-SpamScore: 0 X-BigFish: VS0(zzzz1f42h1ee6h1de0h1202h1e76h1d1ah1d2ahzz8275bhz2dh2a8h668h839hd24he5bhf0ah107ah11b5h121eh1288h12a5h12a9h12bdh12e5h137ah139eh13b6h1441h14afh1504h1537h162dh1631h1758h1898h18e1h1946h19b5h1155h) Received: from mail185-va3 (localhost.localdomain [127.0.0.1]) by mail185-va3 (MessageSwitch) id 1360673247149008_5577; Tue, 12 Feb 2013 12:47:27 +0000 (UTC) Received: from VA3EHSMHS022.bigfish.com (unknown [10.7.14.237]) by mail185-va3.bigfish.com (Postfix) with ESMTP id 17864420367; Tue, 12 Feb 2013 12:47:27 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by VA3EHSMHS022.bigfish.com (10.7.99.32) with Microsoft SMTP Server (TLS) id 14.1.225.23; Tue, 12 Feb 2013 12:47:23 +0000 Received: from az84smr01.freescale.net (10.64.34.197) by 039-SN1MMR1-005.039d.mgd.msft.net (10.84.1.17) with Microsoft SMTP Server (TLS) id 14.2.328.11; Tue, 12 Feb 2013 12:47:22 +0000 Received: from zro04cle141.ea.freescale.net (udp157456uds.ea.freescale.net [140.101.223.141]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id r1CClITV000473; Tue, 12 Feb 2013 05:47:21 -0700 Received: by zro04cle141.ea.freescale.net (Postfix, from userid 23113) id BA8B040080; Tue, 12 Feb 2013 14:47:17 +0200 (EET) From: Claudiu Manoil To: CC: Paul Gortmaker , "David S. Miller" Subject: [PATCH net-next 4/5] gianfar: Remove wrong buffer size conditioning to VLAN h/w offload Date: Tue, 12 Feb 2013 14:47:16 +0200 Message-ID: <1360673237-349-4-git-send-email-claudiu.manoil@freescale.com> X-Mailer: git-send-email 1.6.6 In-Reply-To: <1360673237-349-3-git-send-email-claudiu.manoil@freescale.com> References: <1360673237-349-1-git-send-email-claudiu.manoil@freescale.com> <1360673237-349-2-git-send-email-claudiu.manoil@freescale.com> <1360673237-349-3-git-send-email-claudiu.manoil@freescale.com> MIME-Version: 1.0 X-OriginatorOrg: freescale.net Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org The controller's ref manual states clearly that when the hw Rx vlan offload feature is enabled, meaning that the VLEX bit from RCTRL is correctly enabled, then the hw performs automatic VLAN tag extraction and deletion from the ethernet frames. So there's no point in trying to increase the rx buff size when rxvlan is on, as the frame is actually smaller. And the Tx vlan hw accel feature (VLINS) has nothing to do with rx buff size computation. Cc: Paul Gortmaker Signed-off-by: Claudiu Manoil --- drivers/net/ethernet/freescale/gianfar.c | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/freescale/gianfar.c b/drivers/net/ethernet/freescale/gianfar.c index 5622134..59fb3bf 100644 --- a/drivers/net/ethernet/freescale/gianfar.c +++ b/drivers/net/ethernet/freescale/gianfar.c @@ -2390,9 +2390,6 @@ static int gfar_change_mtu(struct net_device *dev, int new_mtu) int oldsize = priv->rx_buffer_size; int frame_size = new_mtu + ETH_HLEN; - if (gfar_is_vlan_on(priv)) - frame_size += VLAN_HLEN; - if ((frame_size < 64) || (frame_size > JUMBO_FRAME_SIZE)) { netif_err(priv, drv, dev, "Invalid MTU setting\n"); return -EINVAL;