s390/qeth: fix IP removal on offline cards
authorJulian Wiedmann <jwi@linux.vnet.ibm.com>
Tue, 27 Feb 2018 17:58:13 +0000 (18:58 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 28 Feb 2018 16:13:12 +0000 (11:13 -0500)
commit98d823ab1fbdcb13abc25b420f9bb71bade42056
tree45f70d9a88e1181206722bb7d244026b8d5a71d0
parent12472af89632beb1ed8dea29d4efe208ca05b06a
s390/qeth: fix IP removal on offline cards

If the HW is not reachable, then none of the IPs in qeth's internal
table has been registered with the HW yet. So when deleting such an IP,
there's no need to stage it for deregistration - just drop it from
the table.

This fixes the "add-delete-add" scenario on an offline card, where the
the second "add" merely increments the IP's use count. But as the IP is
still set to DISP_ADDR_DELETE from the previous "delete" step,
l3_recover_ip() won't register it with the HW when the card goes online.

Fixes: 5f78e29ceebf ("qeth: optimize IP handling in rx_mode callback")
Signed-off-by: Julian Wiedmann <jwi@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/s390/net/qeth_l3_main.c