From patchwork Mon Oct 5 12:22:19 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ajit Khaparde X-Patchwork-Id: 35010 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.176.167]) by ozlabs.org (Postfix) with ESMTP id BBC68B7BD2 for ; Mon, 5 Oct 2009 23:27:30 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753366AbZJEMWz (ORCPT ); Mon, 5 Oct 2009 08:22:55 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752994AbZJEMWz (ORCPT ); Mon, 5 Oct 2009 08:22:55 -0400 Received: from segment-124-30.sify.net ([124.30.166.146]:62211 "EHLO akhaparde.serverengines.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1753310AbZJEMWz (ORCPT ); Mon, 5 Oct 2009 08:22:55 -0400 Received: by akhaparde.serverengines.com (Postfix, from userid 1000) id B22B83312F; Mon, 5 Oct 2009 17:52:19 +0530 (IST) Date: Mon, 5 Oct 2009 17:52:19 +0530 From: Ajit Khaparde To: davem@davemloft.net, netdev@vger.kernel.org Subject: [PATCH 3/3] be2net: Bug fix to properly update ethtool tx-checksumming after ethtool -K tx off Message-ID: <20091005122207.GA22935@serverengines.com> Reply-To: Ajit Khaparde MIME-Version: 1.0 Content-Disposition: inline X-URL: http://www.serverengines.com Organization: ServerEngines Corp User-Agent: "Ajit's Mutt" X-OS: Linux x86_64 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org This is a fix for a bug which was a result of wrong use of checksum offload flag. The status of tx-checksumming was not changed from on to off after a 'ethtool -K tx off' operation. Use the proper checksum offload flag NETIF_F_HW_CSUM instead of NETIF_F_IP_CSUM and NETIF_F_IPV6_CSUM. Patch is against net-2.6 tree. Signed-off-by: Ajit Khaparde --- drivers/net/benet/be_ethtool.c | 2 +- drivers/net/benet/be_main.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/benet/be_ethtool.c b/drivers/net/benet/be_ethtool.c index 11445df..cda5bf2 100644 --- a/drivers/net/benet/be_ethtool.c +++ b/drivers/net/benet/be_ethtool.c @@ -358,7 +358,7 @@ const struct ethtool_ops be_ethtool_ops = { .get_rx_csum = be_get_rx_csum, .set_rx_csum = be_set_rx_csum, .get_tx_csum = ethtool_op_get_tx_csum, - .set_tx_csum = ethtool_op_set_tx_csum, + .set_tx_csum = ethtool_op_set_tx_hw_csum, .get_sg = ethtool_op_get_sg, .set_sg = ethtool_op_set_sg, .get_tso = ethtool_op_get_tso, diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c index e86b2f3..6d5e81f 100644 --- a/drivers/net/benet/be_main.c +++ b/drivers/net/benet/be_main.c @@ -1899,8 +1899,8 @@ static void be_netdev_init(struct net_device *netdev) struct be_adapter *adapter = netdev_priv(netdev); netdev->features |= NETIF_F_SG | NETIF_F_HW_VLAN_RX | NETIF_F_TSO | - NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_FILTER | NETIF_F_IP_CSUM | - NETIF_F_IPV6_CSUM | NETIF_F_GRO; + NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_FILTER | NETIF_F_HW_CSUM | + NETIF_F_GRO; netdev->flags |= IFF_MULTICAST;