netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: frank.blaschka@de.ibm.com
To: jgarzik@pobox.com
Cc: netdev@vger.kernel.org, linux-s390@vger.kernel.org
Subject: [patch 10/11] qeth: layer 2 allow ethtool to set TSO
Date: Thu, 24 Apr 2008 10:15:27 +0200	[thread overview]
Message-ID: <20080424081908.864640000@de.ibm.com> (raw)
In-Reply-To: 20080424081517.987104000@de.ibm.com

[-- Attachment #1: 709-qeth-ethtool.diff --]
[-- Type: text/plain, Size: 1534 bytes --]

From: Frank Blaschka <frank.blaschka@de.ibm.com>

Allow ethtool to turn on/off EDDP via ethtool TSO interface.

Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
---

 drivers/s390/net/qeth_l2_main.c |   18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff -urpN linux-2.6/drivers/s390/net/qeth_l2_main.c linux-2.6-patched/drivers/s390/net/qeth_l2_main.c
--- linux-2.6/drivers/s390/net/qeth_l2_main.c	2008-04-23 17:55:52.000000000 +0200
+++ linux-2.6-patched/drivers/s390/net/qeth_l2_main.c	2008-04-23 17:55:54.000000000 +0200
@@ -849,6 +849,22 @@ static void qeth_l2_remove_device(struct
 	return;
 }
 
+static int qeth_l2_ethtool_set_tso(struct net_device *dev, u32 data)
+{
+	struct qeth_card *card = netdev_priv(dev);
+
+	if (data) {
+		if (card->options.large_send == QETH_LARGE_SEND_NO) {
+			card->options.large_send = QETH_LARGE_SEND_EDDP;
+			dev->features |= NETIF_F_TSO;
+		}
+	} else {
+		dev->features &= ~NETIF_F_TSO;
+		card->options.large_send = QETH_LARGE_SEND_NO;
+	}
+	return 0;
+}
+
 static struct ethtool_ops qeth_l2_ethtool_ops = {
 	.get_link = ethtool_op_get_link,
 	.get_tx_csum = ethtool_op_get_tx_csum,
@@ -856,7 +872,7 @@ static struct ethtool_ops qeth_l2_ethtoo
 	.get_sg = ethtool_op_get_sg,
 	.set_sg = ethtool_op_set_sg,
 	.get_tso = ethtool_op_get_tso,
-	.set_tso = ethtool_op_set_tso,
+	.set_tso = qeth_l2_ethtool_set_tso,
 	.get_strings = qeth_core_get_strings,
 	.get_ethtool_stats = qeth_core_get_ethtool_stats,
 	.get_stats_count = qeth_core_get_stats_count,

-- 

  parent reply	other threads:[~2008-04-24  8:19 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-24  8:15 [patch 00/11] s390: network device driver fixes for 2.6.26 frank.blaschka
2008-04-24  8:15 ` [patch 01/11] lcs: CCL-sequ. numbers required for protocol 802.2 only frank.blaschka
2008-04-29  5:59   ` Jeff Garzik
2008-04-24  8:15 ` [patch 02/11] netiucv: get rid of in_atomic() use frank.blaschka
2008-04-24  8:15 ` [patch 03/11] ccwgroup: Unify parsing for group attribute frank.blaschka
2008-04-24  8:15 ` [patch 04/11] qeth module size reduction frank.blaschka
2008-04-24  8:15 ` [patch 05/11] qeth: layer 3 support vlan IPv6 on hiper socket frank.blaschka
2008-04-24  8:15 ` [patch 06/11] qeth: provide get ethtool settings frank.blaschka
2008-04-24  8:15 ` [patch 07/11] qeth: rework fast path frank.blaschka
2008-04-24  8:15 ` [patch 08/11] qeth: layer 3 add missing dev_open/close to ccwgroup handler frank.blaschka
2008-04-24  8:15 ` [patch 09/11] qeth: read number of ports from card frank.blaschka
2008-04-24  8:15 ` frank.blaschka [this message]
2008-04-24  8:15 ` [patch 11/11] netiucv: Fix missing driver attributes frank.blaschka

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=20080424081908.864640000@de.ibm.com \
    --to=frank.blaschka@de.ibm.com \
    --cc=jgarzik@pobox.com \
    --cc=linux-s390@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /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).