]> 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)
commitb733412b575d2eed3ebff22bae968e8c79cd2f66
tree414382ce5489f6f44e0352ddd86a5a557084b86b
parentb26d90f6322822e53051479e1adcf4b707e2f70b
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: 5129ae75f204 ("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