]> git.baikalelectronics.ru Git - kernel.git/commit
s390/qeth: use Read device to query hypervisor for MAC
authorJulian Wiedmann <jwi@linux.vnet.ibm.com>
Thu, 19 Apr 2018 10:52:11 +0000 (12:52 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sun, 22 Apr 2018 18:42:32 +0000 (14:42 -0400)
commit7e38bdf96f8c2f2a9fd06a55fe1bbb57f7f6671a
tree7ffcbc9c1185492f7896f2d91e16dc9d2bc382fc
parentaecce6eedea475f120e9620727bbe05bca061b5d
s390/qeth: use Read device to query hypervisor for MAC

For z/VM NICs, qeth needs to consider which of the three CCW devices in
an MPC group it uses for requesting a managed MAC address.

On the Base device, the hypervisor returns a default MAC which is
pre-assigned when creating the NIC (this MAC is also returned by the
READ MAC primitive). Querying any other device results in the allocation
of an additional MAC address.

For consistency with READ MAC and to avoid using up more addresses than
necessary, it is preferable to use the NIC's default MAC. So switch the
the diag26c over to using a NIC's Read device, which should always be
identical to the Base device.

Fixes: 1a5a35948e9d ("s390/qeth: use diag26c to get MAC address on L2")
Signed-off-by: Julian Wiedmann <jwi@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/s390/net/qeth_core_main.c