]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: add compatible handling for MAC VLAN switch parameter configuration
authorGuangbin Huang <huangguangbin2@huawei.com>
Thu, 14 Nov 2019 02:32:39 +0000 (10:32 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 15 Nov 2019 02:06:34 +0000 (18:06 -0800)
commit213d1c05a948107f82e0ef6e7d7750bfa583f8d6
tree414382ce5489f6f44e0352ddd86a5a557084b86b
parent7eedb5d51a9e350886d057cada4421e8f764147c
net: hns3: add compatible handling for MAC VLAN switch parameter configuration

Previously, hns3 driver just directly send specific setting bit
and mask bits of MAC VLAN switch parameter to the firmware, it
can not be compatible with the old firmware, because the old one
ignores mask bits and covers all bits with new setting bits.
So when running with old firmware, the communication between PF
and VF will fail after resetting or configuring spoof check, since
they will do the MAC VLAN switch parameter configuration.

This patch fixes this problem by reading switch parameter firstly,
then just modifies the corresponding bit and sends it to firmware.

Fixes: 7ffaab25af0f ("net: hns3: not allow SSU loopback while execute ethtool -t dev")
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c