aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390
diff options
context:
space:
mode:
authorFrank Blaschka <frank.blaschka@de.ibm.com>2011-12-19 17:56:35 -0500
committerDavid S. Miller <davem@davemloft.net>2011-12-20 14:05:04 -0500
commit3f36b890dea7c2fc2fe25fb507552a46a226048a (patch)
tree692b10c0a64af8ed7585fd540b786318122ca29b /drivers/s390
parent08e3356cc2c0ce8f3359b3d2636c897ac71240ce (diff)
qeth: improve recovery during resource shortage
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> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/s390')
-rw-r--r--drivers/s390/net/qeth_core_main.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c
index fff57de78943..680040572bcb 100644
--- 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 qeth_card *card, unsigned long thread)
1329 1329
1330static void qeth_start_kernel_thread(struct work_struct *work) 1330static void qeth_start_kernel_thread(struct work_struct *work)
1331{ 1331{
1332 struct task_struct *ts;
1332 struct qeth_card *card = container_of(work, struct qeth_card, 1333 struct qeth_card *card = container_of(work, struct qeth_card,
1333 kernel_thread_starter); 1334 kernel_thread_starter);
1334 QETH_CARD_TEXT(card , 2, "strthrd"); 1335 QETH_CARD_TEXT(card , 2, "strthrd");
@@ -1336,9 +1337,15 @@ static void qeth_start_kernel_thread(struct work_struct *work)
1336 if (card->read.state != CH_STATE_UP && 1337 if (card->read.state != CH_STATE_UP &&
1337 card->write.state != CH_STATE_UP) 1338 card->write.state != CH_STATE_UP)
1338 return; 1339 return;
1339 if (qeth_do_start_thread(card, QETH_RECOVER_THREAD)) 1340 if (qeth_do_start_thread(card, QETH_RECOVER_THREAD)) {
1340 kthread_run(card->discipline.recover, (void *) card, 1341 ts = kthread_run(card->discipline.recover, (void *)card,
1341 "qeth_recover"); 1342 "qeth_recover");
1343 if (IS_ERR(ts)) {
1344 qeth_clear_thread_start_bit(card, QETH_RECOVER_THREAD);
1345 qeth_clear_thread_running_bit(card,
1346 QETH_RECOVER_THREAD);
1347 }
1348 }
1342} 1349}
1343 1350
1344static int qeth_setup_card(struct qeth_card *card) 1351static int qeth_setup_card(struct qeth_card *card)