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
Subject: [patch 09/10] [PATCH] qeth: improve recovery during resource shortage
Date: Tue, 20 Dec 2011 09:56:35 +0100	[thread overview]
Message-ID: <20111220085736.446526376@de.ibm.com> (raw)
In-Reply-To: 20111220085626.924756639@de.ibm.com

[-- Attachment #1: 610-qeth-resource-shortage.diff --]
[-- Type: text/plain, Size: 1372 bytes --]

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

In case there are no system resources to run a recovery we have to clear
recovery bitmasks so a further automatic or manual driven recovery can
fix up the device.

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

 drivers/s390/net/qeth_core_main.c |   11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

--- a/drivers/s390/net/qeth_core_main.c
+++ b/drivers/s390/net/qeth_core_main.c
@@ -1329,6 +1329,7 @@ static int qeth_do_start_thread(struct q
 
 static void qeth_start_kernel_thread(struct work_struct *work)
 {
+	struct task_struct *ts;
 	struct qeth_card *card = container_of(work, struct qeth_card,
 					kernel_thread_starter);
 	QETH_CARD_TEXT(card , 2, "strthrd");
@@ -1336,9 +1337,15 @@ static void qeth_start_kernel_thread(str
 	if (card->read.state != CH_STATE_UP &&
 	    card->write.state != CH_STATE_UP)
 		return;
-	if (qeth_do_start_thread(card, QETH_RECOVER_THREAD))
-		kthread_run(card->discipline.recover, (void *) card,
+	if (qeth_do_start_thread(card, QETH_RECOVER_THREAD)) {
+		ts = kthread_run(card->discipline.recover, (void *)card,
 				"qeth_recover");
+		if (IS_ERR(ts)) {
+			qeth_clear_thread_start_bit(card, QETH_RECOVER_THREAD);
+			qeth_clear_thread_running_bit(card,
+				QETH_RECOVER_THREAD);
+		}
+	}
 }
 
 static int qeth_setup_card(struct qeth_card *card)

  parent reply	other threads:[~2011-12-20  8:56 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-20  8:56 [patch 00/10] s390: network driver features and fixes for net-next frank.blaschka
2011-12-20  8:56 ` [patch 01/10] [PATCH] af_iucv: support ancillary data with HS transport frank.blaschka
2011-12-20  8:56 ` [patch 02/10] [PATCH] af_iucv: accelerate close for " frank.blaschka
2011-12-20  8:56 ` [patch 03/10] [PATCH] af_iucv: release reference to HS device frank.blaschka
2011-12-20  8:56 ` [patch 04/10] [PATCH] af_iucv: remove unused timer infrastructure frank.blaschka
2011-12-20  8:56 ` [patch 05/10] [PATCH] af_iucv: get rid of state IUCV_SEVERED frank.blaschka
2011-12-20  8:56 ` [patch 06/10] [PATCH] qeth: suspicious rcu_dereference_check in recovery frank.blaschka
2011-12-20  8:56 ` [patch 07/10] [PATCH] qeth: forbid recovery during shutdown frank.blaschka
2011-12-20  8:56 ` [patch 08/10] [PATCH] netiucv: allow multiple interfaces to same peer frank.blaschka
2011-12-20  8:56 ` frank.blaschka [this message]
2011-12-20  8:56 ` [patch 10/10] [PATCH] qeth: recovery through asynchronous delivery frank.blaschka
2011-12-20 19:05 ` [patch 00/10] s390: network driver features and fixes for net-next David Miller

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=20111220085736.446526376@de.ibm.com \
    --to=frank.blaschka@de.ibm.com \
    --cc=davem@davemloft.net \
    --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 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.