aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/net/qeth_l3_main.c
diff options
context:
space:
mode:
authorStefan Raspl <raspl@linux.vnet.ibm.com>2013-04-07 18:19:27 -0400
committerDavid S. Miller <davem@davemloft.net>2013-04-08 17:16:57 -0400
commit65d8013cbdc661f9cb7645148de1facfe3d0c88a (patch)
treee2a977f555e08b420b9f4c926792d21cd10aba8a /drivers/s390/net/qeth_l3_main.c
parentf9c41a62bba3f3f7ef3541b2a025e3371bcbba97 (diff)
qeth: fix qeth_wait_for_threads() deadlock for OSN devices
Any recovery thread will deadlock when calling qeth_wait_for_threads(), most notably when triggering a recovery on an OSN device. This patch will store the recovery thread's task pointer on recovery invocation and check in qeth_wait_for_threads() respectively to avoid deadlocks. Signed-off-by: Stefan Raspl <raspl@linux.vnet.ibm.com> Signed-off-by: Frank Blaschka <blaschka@linux.vnet.ibm.com> Reviewed-by: Ursula Braun <ursula.braun@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/s390/net/qeth_l3_main.c')
-rw-r--r--drivers/s390/net/qeth_l3_main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c
index 8710337dab3e..1f7edf1b26c3 100644
--- a/drivers/s390/net/qeth_l3_main.c
+++ b/drivers/s390/net/qeth_l3_main.c
@@ -3515,6 +3515,7 @@ static int qeth_l3_recover(void *ptr)
3515 QETH_CARD_TEXT(card, 2, "recover2"); 3515 QETH_CARD_TEXT(card, 2, "recover2");
3516 dev_warn(&card->gdev->dev, 3516 dev_warn(&card->gdev->dev,
3517 "A recovery process has been started for the device\n"); 3517 "A recovery process has been started for the device\n");
3518 qeth_set_recovery_task(card);
3518 __qeth_l3_set_offline(card->gdev, 1); 3519 __qeth_l3_set_offline(card->gdev, 1);
3519 rc = __qeth_l3_set_online(card->gdev, 1); 3520 rc = __qeth_l3_set_online(card->gdev, 1);
3520 if (!rc) 3521 if (!rc)
@@ -3525,6 +3526,7 @@ static int qeth_l3_recover(void *ptr)
3525 dev_warn(&card->gdev->dev, "The qeth device driver " 3526 dev_warn(&card->gdev->dev, "The qeth device driver "
3526 "failed to recover an error on the device\n"); 3527 "failed to recover an error on the device\n");
3527 } 3528 }
3529 qeth_clear_recovery_task(card);
3528 qeth_clear_thread_start_bit(card, QETH_RECOVER_THREAD); 3530 qeth_clear_thread_start_bit(card, QETH_RECOVER_THREAD);
3529 qeth_clear_thread_running_bit(card, QETH_RECOVER_THREAD); 3531 qeth_clear_thread_running_bit(card, QETH_RECOVER_THREAD);
3530 return 0; 3532 return 0;