aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/net/qeth_l3_main.c
diff options
context:
space:
mode:
authorJulian Wiedmann <jwi@linux.ibm.com>2019-02-28 18:59:37 +0100
committerDavid S. Miller <davem@davemloft.net>2019-02-28 12:55:25 -0800
commitd7ef489f8261208b8a21b3c563e4d3d40b674e01 (patch)
tree107f386af20aef7f35aa762487504a4a61ddf4ed /drivers/s390/net/qeth_l3_main.c
parents390/qeth: remove RECOVER state (diff)
downloadlinux-dev-d7ef489f8261208b8a21b3c563e4d3d40b674e01.tar.xz
linux-dev-d7ef489f8261208b8a21b3c563e4d3d40b674e01.zip
s390/qeth: enable/disable the HW trap a little earlier
When setting a L2 qeth device online, enable the HW trap as soon as the control plane is available. This allows us to catch any error that occurs during the very first commands. In the same spirit, the offline code should disable the HW trap as the very first step of its processing. Signed-off-by: Julian Wiedmann <jwi@linux.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.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c
index fe6b9a82f69e..c299e84cf5d1 100644
--- a/drivers/s390/net/qeth_l3_main.c
+++ b/drivers/s390/net/qeth_l3_main.c
@@ -2419,16 +2419,17 @@ static int __qeth_l3_set_offline(struct ccwgroup_device *cgdev,
QETH_DBF_TEXT(SETUP, 3, "setoffl");
QETH_DBF_HEX(SETUP, 3, &card, sizeof(void *));
+ if ((!recovery_mode && card->info.hwtrap) || card->info.hwtrap == 2) {
+ qeth_hw_trap(card, QETH_DIAGS_TRAP_DISARM);
+ card->info.hwtrap = 1;
+ }
+
rtnl_lock();
card->info.open_when_online = card->dev->flags & IFF_UP;
netif_device_detach(card->dev);
netif_carrier_off(card->dev);
rtnl_unlock();
- if ((!recovery_mode && card->info.hwtrap) || card->info.hwtrap == 2) {
- qeth_hw_trap(card, QETH_DIAGS_TRAP_DISARM);
- card->info.hwtrap = 1;
- }
qeth_l3_stop_card(card, recovery_mode);
if ((card->options.cq == QETH_CQ_ENABLED) && card->dev) {
rtnl_lock();