diff options
author | Julian Wiedmann <jwi@linux.ibm.com> | 2019-02-28 12:59:43 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-02-28 15:55:26 -0500 |
commit | 62ca98d475d1839f90d209bb47cc0192dc3db946 (patch) | |
tree | 18b37a79e734a006fa235e53ab30d13a83892e96 | |
parent | dcef5cad639e0c24dd562e777b31533f5c97baa1 (diff) |
s390/qeth: don't special-case HW trap during suspend
It makes no difference whether we
1. manually disarm the HW trap and call the offline code with
recovery_mode == 1, or
2. call the offline code with recovery_mode == 0, and let it disarm the
HW trap for us.
So consolidate the two code paths in the suspend callback.
Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/s390/net/qeth_l2_main.c | 8 | ||||
-rw-r--r-- | drivers/s390/net/qeth_l3_main.c | 8 |
2 files changed, 4 insertions, 12 deletions
diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c index f34fe983012c..6380d29c10f7 100644 --- a/drivers/s390/net/qeth_l2_main.c +++ b/drivers/s390/net/qeth_l2_main.c | |||
@@ -988,12 +988,8 @@ static int qeth_l2_pm_suspend(struct ccwgroup_device *gdev) | |||
988 | wait_event(card->wait_q, qeth_threads_running(card, 0xffffffff) == 0); | 988 | wait_event(card->wait_q, qeth_threads_running(card, 0xffffffff) == 0); |
989 | if (gdev->state == CCWGROUP_OFFLINE) | 989 | if (gdev->state == CCWGROUP_OFFLINE) |
990 | return 0; | 990 | return 0; |
991 | if (card->state == CARD_STATE_UP) { | 991 | |
992 | if (card->info.hwtrap) | 992 | qeth_l2_set_offline(gdev); |
993 | qeth_hw_trap(card, QETH_DIAGS_TRAP_DISARM); | ||
994 | __qeth_l2_set_offline(card->gdev, 1); | ||
995 | } else | ||
996 | __qeth_l2_set_offline(card->gdev, 0); | ||
997 | return 0; | 993 | return 0; |
998 | } | 994 | } |
999 | 995 | ||
diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c index d424a6704811..375ad03ea4c5 100644 --- a/drivers/s390/net/qeth_l3_main.c +++ b/drivers/s390/net/qeth_l3_main.c | |||
@@ -2476,12 +2476,8 @@ static int qeth_l3_pm_suspend(struct ccwgroup_device *gdev) | |||
2476 | wait_event(card->wait_q, qeth_threads_running(card, 0xffffffff) == 0); | 2476 | wait_event(card->wait_q, qeth_threads_running(card, 0xffffffff) == 0); |
2477 | if (gdev->state == CCWGROUP_OFFLINE) | 2477 | if (gdev->state == CCWGROUP_OFFLINE) |
2478 | return 0; | 2478 | return 0; |
2479 | if (card->state == CARD_STATE_UP) { | 2479 | |
2480 | if (card->info.hwtrap) | 2480 | qeth_l3_set_offline(gdev); |
2481 | qeth_hw_trap(card, QETH_DIAGS_TRAP_DISARM); | ||
2482 | __qeth_l3_set_offline(card->gdev, 1); | ||
2483 | } else | ||
2484 | __qeth_l3_set_offline(card->gdev, 0); | ||
2485 | return 0; | 2481 | return 0; |
2486 | } | 2482 | } |
2487 | 2483 | ||