]> git.baikalelectronics.ru Git - kernel.git/commit
s390/qeth: fix MAC address update sequence
authorJulian Wiedmann <jwi@linux.vnet.ibm.com>
Thu, 19 Apr 2018 10:52:09 +0000 (12:52 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sun, 22 Apr 2018 18:42:31 +0000 (14:42 -0400)
commit3252d17296119fb54e5da8f32dde3ce7c6fcd26f
treed32c15cc4bc8fea3659db08a9d735fb516037591
parent0da2d7f7c2b417b34726b99b7306c028752b7f3b
s390/qeth: fix MAC address update sequence

When changing the MAC address on a L2 qeth device, current code first
unregisters the old address, then registers the new one.
If HW rejects the new address (or the IO fails), the device ends up with
no operable address at all.

Re-order the code flow so that the old address only gets dropped if the
new address was registered successfully. While at it, add logic to catch
some corner-cases.

Signed-off-by: Julian Wiedmann <jwi@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/s390/net/qeth_l2_main.c