All of lore.kernel.org
 help / color / mirror / Atom feed
From: frank.blaschka@de.ibm.com
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, linux-s390@vger.kernel.org,
	Ursula Braun <ursula.braun@de.ibm.com>
Subject: [patch 4/7] [PATCH] qeth: allow HiperSockets framesize change in suspend
Date: Tue, 01 Feb 2011 09:16:51 +0100	[thread overview]
Message-ID: <20110201081723.717261632@de.ibm.com> (raw)
In-Reply-To: 20110201081647.173934635@de.ibm.com

[-- Attachment #1: 607-qeth-chparm-change.diff --]
[-- Type: text/plain, Size: 1267 bytes --]

From: Ursula Braun <ursula.braun@de.ibm.com>

For HiperSockets the framesize-definition determines the selected
mtu-size and the size of the allocated qdio buffers.
A framesize-change may occur while a Linux system with probed
HiperSockets device is in suspend state. This patch enables proper
resuming of a HiperSockets device in this case.

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


 drivers/s390/net/qeth_core_main.c |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
--- a/drivers/s390/net/qeth_core_main.c
+++ b/drivers/s390/net/qeth_core_main.c
@@ -1887,8 +1887,16 @@ static int qeth_ulp_enable_cb(struct qet
 			QETH_DBF_TEXT_(SETUP, 2, "  rc%d", iob->rc);
 			return 0;
 		}
-		card->info.max_mtu = mtu;
+		if (card->info.initial_mtu && (card->info.initial_mtu != mtu)) {
+			/* frame size has changed */
+			if (card->dev &&
+			    ((card->dev->mtu == card->info.initial_mtu) ||
+			     (card->dev->mtu > mtu)))
+				card->dev->mtu = mtu;
+			qeth_free_qdio_buffers(card);
+		}
 		card->info.initial_mtu = mtu;
+		card->info.max_mtu = mtu;
 		card->qdio.in_buf_size = mtu + 2 * PAGE_SIZE;
 	} else {
 		card->info.initial_mtu = qeth_get_initial_mtu_for_card(card);

  parent reply	other threads:[~2011-02-01  8:16 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-01  8:16 [patch 0/7] s390: network patches for net-next frank.blaschka
2011-02-01  8:16 ` [patch 1/7] [PATCH] qeth: show new mac-address if its setting fails frank.blaschka
2011-02-01  8:16 ` [patch 2/7] [PATCH] qeth: add more strict MTU checking frank.blaschka
2011-02-01  8:16 ` [patch 3/7] [PATCH] net,s390: provide architecture specific NET_SKB_PAD frank.blaschka
2011-02-01 22:17   ` David Miller
2011-02-01  8:16 ` frank.blaschka [this message]
2011-02-01  8:16 ` [patch 5/7] [PATCH] qeth: allow OSA CHPARM change in suspend state frank.blaschka
2011-02-01  8:16 ` [patch 6/7] [PATCH] s390: Fix wrong size in memcmp (netiucv) frank.blaschka
2011-02-01  8:16 ` [patch 7/7] [PATCH] s390: Fix possibly wrong size in strncmp (smsgiucv) 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=20110201081723.717261632@de.ibm.com \
    --to=frank.blaschka@de.ibm.com \
    --cc=davem@davemloft.net \
    --cc=linux-s390@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=ursula.braun@de.ibm.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.