Commit 3f36b890 authored by Frank Blaschka's avatar Frank Blaschka Committed by David S. Miller

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: default avatarFrank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 08e3356c
...@@ -1329,6 +1329,7 @@ static int qeth_do_start_thread(struct qeth_card *card, unsigned long thread) ...@@ -1329,6 +1329,7 @@ static int qeth_do_start_thread(struct qeth_card *card, unsigned long thread)
static void qeth_start_kernel_thread(struct work_struct *work) static void qeth_start_kernel_thread(struct work_struct *work)
{ {
struct task_struct *ts;
struct qeth_card *card = container_of(work, struct qeth_card, struct qeth_card *card = container_of(work, struct qeth_card,
kernel_thread_starter); kernel_thread_starter);
QETH_CARD_TEXT(card , 2, "strthrd"); QETH_CARD_TEXT(card , 2, "strthrd");
...@@ -1336,9 +1337,15 @@ static void qeth_start_kernel_thread(struct work_struct *work) ...@@ -1336,9 +1337,15 @@ static void qeth_start_kernel_thread(struct work_struct *work)
if (card->read.state != CH_STATE_UP && if (card->read.state != CH_STATE_UP &&
card->write.state != CH_STATE_UP) card->write.state != CH_STATE_UP)
return; return;
if (qeth_do_start_thread(card, QETH_RECOVER_THREAD)) if (qeth_do_start_thread(card, QETH_RECOVER_THREAD)) {
kthread_run(card->discipline.recover, (void *) card, ts = kthread_run(card->discipline.recover, (void *)card,
"qeth_recover"); "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) static int qeth_setup_card(struct qeth_card *card)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment