diff options
author | Alexandra Winter <wintera@linux.ibm.com> | 2023-08-01 10:00:16 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-08-02 10:12:51 +0100 |
commit | 1cfef80d4c2b2c599189f36f36320b205d9447d9 (patch) | |
tree | 6421f77900eae35c9b173e0c9fcea9d1b356ef74 /drivers/s390/net/qeth_l3_main.c | |
parent | 666c135b2d859a00ee74c8645b2affacfae45421 (diff) | |
download | linux-1cfef80d4c2b2c599189f36f36320b205d9447d9.tar.gz linux-1cfef80d4c2b2c599189f36f36320b205d9447d9.tar.bz2 linux-1cfef80d4c2b2c599189f36f36320b205d9447d9.zip |
s390/qeth: Don't call dev_close/dev_open (DOWN/UP)
dev_close() and dev_open() are issued to change the interface state to DOWN
or UP (dev->flags IFF_UP). When the netdev is set DOWN it loses e.g its
Ipv6 addresses and routes. We don't want this in cases of device recovery
(triggered by hardware or software) or when the qeth device is set
offline.
Setting a qeth device offline or online and device recovery actions call
netif_device_detach() and/or netif_device_attach(). That will reset or
set the LOWER_UP indication i.e. change the dev->state Bit
__LINK_STATE_PRESENT. That is enough to e.g. cause bond failovers, and
still preserves the interface settings that are handled by the network
stack.
Don't call dev_open() nor dev_close() from the qeth device driver. Let the
network stack handle this.
Fixes: d4560150cb47 ("s390/qeth: call dev_close() during recovery")
Signed-off-by: Alexandra Winter <wintera@linux.ibm.com>
Reviewed-by: Wenjia Zhang <wenjia@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.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c index af4e60d2917e..b92a32b4b114 100644 --- a/drivers/s390/net/qeth_l3_main.c +++ b/drivers/s390/net/qeth_l3_main.c @@ -2018,9 +2018,11 @@ static int qeth_l3_set_online(struct qeth_card *card, bool carrier_ok) netif_device_attach(dev); qeth_enable_hw_features(dev); - if (card->info.open_when_online) { - card->info.open_when_online = 0; - dev_open(dev, NULL); + if (netif_running(dev)) { + local_bh_disable(); + napi_schedule(&card->napi); + /* kick-start the NAPI softirq: */ + local_bh_enable(); } rtnl_unlock(); } |