linux_dsm_epyc7002/drivers/net/ethernet/qlogic/qlcnic
Jarod Wilson e824de8ae2 net/qlcnic: fix mac address restore in bond mode 5/6
The bonding driver saves a copy of slaves' original mac address and then
assigns whatever mac as needed to the slave, depending on mode. In at
least modes 5 and 6 (balance-tlb, balance-alb), it often ends up being the
mac address of another slave. On release from the bond, the original mac
address is supposed to get restored via a dev_set_mac_address() call in
the bonding driver's __bond_release_one() function, which calls the
slave's ndo_set_mac_address function, which for qlcnic, is
qlcnic_set_mac().

Now, this function tries to be somewhat intelligent and exit early if
you're trying to set the mac address to the same thing that is already
set. The problem here is that adapter->mac_addr isn't in sync with
netdev->dev_addr. The qlcnic driver still has the original mac stored in
adapter->mac_addr, while the bonding driver has updated netdev->dev_addr,
so qlcnic thinks we're trying to set the same address it already has.

I think the way to go here, since the function updates both netdev and
adapter's stored mac addresses, is to check if either of them doesn't
match the newly requested mac. Simply checking netdev's value only could
result in a similar mismatch and non-update, so look at both.

CC: Dept-GELinuxNICDev@qlogic.com
CC: netdev@vger.kernel.org
CC: Manish Chopra <manish.chopra@qlogic.com>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-11-07 13:17:31 -05:00
..
Makefile
qlcnic_83xx_hw.c qlcnic: constify qlcnic_mbx_ops structure 2015-10-13 04:18:44 -07:00
qlcnic_83xx_hw.h qlcnic: Add support to enable capability to extend minidump for iSCSI 2015-08-10 13:34:28 -07:00
qlcnic_83xx_init.c qlcnic: Don't use kzalloc unncecessarily for allocating large chunk of memory 2015-08-10 13:34:28 -07:00
qlcnic_83xx_vnic.c
qlcnic_ctx.c net: qlcnic: delete redundant memsets 2015-09-09 17:06:01 -07:00
qlcnic_dcb.c
qlcnic_dcb.h
qlcnic_ethtool.c
qlcnic_hdr.h
qlcnic_hw.c qlcnic: Rearrange ordering of header files inclusion 2015-08-10 13:34:28 -07:00
qlcnic_hw.h qlcnic: Add support to enable capability to extend minidump for iSCSI 2015-08-10 13:34:28 -07:00
qlcnic_init.c
qlcnic_io.c
qlcnic_main.c net/qlcnic: fix mac address restore in bond mode 5/6 2015-11-07 13:17:31 -05:00
qlcnic_minidump.c qlcnic: Print firmware minidump buffer and template header addresses 2015-08-10 13:34:28 -07:00
qlcnic_sriov_common.c net: qlcnic: delete redundant memsets 2015-09-09 17:06:01 -07:00
qlcnic_sriov_pf.c qlcnic: Rearrange ordering of header files inclusion 2015-08-10 13:34:28 -07:00
qlcnic_sriov.h qlcnic: Rearrange ordering of header files inclusion 2015-08-10 13:34:28 -07:00
qlcnic_sysfs.c qlcnic: Rearrange ordering of header files inclusion 2015-08-10 13:34:28 -07:00
qlcnic.h qlcnic: constify qlcnic_mbx_ops structure 2015-10-13 04:18:44 -07:00