From patchwork Sat Jul 3 19:41:29 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Hutchings X-Patchwork-Id: 110045 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o63Jfd3q023175 for ; Sat, 3 Jul 2010 19:41:40 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755862Ab0GCTli (ORCPT ); Sat, 3 Jul 2010 15:41:38 -0400 Received: from exchange.solarflare.com ([216.237.3.220]:46126 "EHLO exchange.solarflare.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755719Ab0GCTli (ORCPT ); Sat, 3 Jul 2010 15:41:38 -0400 Received: from [192.168.4.185] ([88.96.1.126]) by exchange.solarflare.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Sat, 3 Jul 2010 12:42:03 -0700 Subject: [PATCH net-next-2.6] IB/{nes,ipoib}: Pass supported flags to ethtool_op_set_flags() From: Ben Hutchings To: David Miller , Roland Dreier Cc: Randy Dunlap , netdev@vger.kernel.org, linux-net-drivers@solarflare.com, sgruszka@redhat.com, amit.salecha@qlogic.com, amwang@redhat.com, anirban.chakraborty@qlogic.com, dm@chelsio.com, scofeldm@cisco.com, vkolluri@cisco.com, roprabhu@cisco.com, e1000-devel@lists.sourceforge.net, buytenh@wantstofly.org, gallatin@myri.com, brice@myri.com, shemminger@linux-foundation.org, jgarzik@redhat.com, Faisal Latif , Chien Tung , linux-rdma@vger.kernel.org In-Reply-To: <1278184884.4878.559.camel@localhost> References: <1277901872.2082.10.camel@achroite.uk.solarflarecom.com> <20100702095514.7fb324c8.randy.dunlap@oracle.com> <20100702.220711.39188625.davem@davemloft.net> <20100703120729.f2a2715b.randy.dunlap@oracle.com> <1278184884.4878.559.camel@localhost> Organization: Solarflare Communications Date: Sat, 03 Jul 2010 20:41:29 +0100 Message-ID: <1278186089.4878.570.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.30.2 X-OriginalArrivalTime: 03 Jul 2010 19:42:04.0064 (UTC) FILETIME=[D00F9200:01CB1AE7] X-TM-AS-Product-Ver: SMEX-8.0.0.1181-6.000.1038-17482.005 X-TM-AS-Result: No--12.101300-0.000000-31 X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Sat, 03 Jul 2010 19:41:40 +0000 (UTC) diff --git a/drivers/infiniband/hw/nes/nes_nic.c b/drivers/infiniband/hw/nes/nes_nic.c index 5cc0a9a..42e7aad 100644 --- a/drivers/infiniband/hw/nes/nes_nic.c +++ b/drivers/infiniband/hw/nes/nes_nic.c @@ -1567,6 +1567,12 @@ static int nes_netdev_set_settings(struct net_device *netdev, struct ethtool_cmd } +static int nes_netdev_set_flags(struct net_device *netdev, u32 flags) +{ + return ethtool_op_set_flags(netdev, flags, ETH_FLAG_LRO); +} + + static const struct ethtool_ops nes_ethtool_ops = { .get_link = ethtool_op_get_link, .get_settings = nes_netdev_get_settings, @@ -1588,7 +1594,7 @@ static const struct ethtool_ops nes_ethtool_ops = { .get_tso = ethtool_op_get_tso, .set_tso = ethtool_op_set_tso, .get_flags = ethtool_op_get_flags, - .set_flags = ethtool_op_set_flags, + .set_flags = nes_netdev_set_flags, }; diff --git a/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c b/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c index 40e8584..1a1657c 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c @@ -147,6 +147,11 @@ static void ipoib_get_ethtool_stats(struct net_device *dev, data[index++] = priv->lro.lro_mgr.stats.no_desc; } +static int ipoib_set_flags(struct net_device *dev, u32 flags) +{ + return ethtool_op_set_flags(dev, flags, ETH_FLAG_LRO); +} + static const struct ethtool_ops ipoib_ethtool_ops = { .get_drvinfo = ipoib_get_drvinfo, .get_rx_csum = ipoib_get_rx_csum, @@ -154,7 +159,7 @@ static const struct ethtool_ops ipoib_ethtool_ops = { .get_coalesce = ipoib_get_coalesce, .set_coalesce = ipoib_set_coalesce, .get_flags = ethtool_op_get_flags, - .set_flags = ethtool_op_set_flags, + .set_flags = ipoib_set_flags, .get_strings = ipoib_get_strings, .get_sset_count = ipoib_get_sset_count, .get_ethtool_stats = ipoib_get_ethtool_stats,