https://github.com/torvalds/linux
Revision 108b3c7810e14892c4a1819b1d268a2c785c087c authored by Jian Shen on 29 September 2021, 09:35:53 UTC, committed by David S. Miller on 29 September 2021, 10:03:54 UTC
Currently, if function adds an existing unicast mac address, eventhough
driver will not add this address into hardware, but it will return 0 in
function hclge_add_uc_addr_common(). It will cause the state of this
unicast mac address is ACTIVE in driver, but it should be in TO-ADD state.

To fix this problem, function hclge_add_uc_addr_common() returns -EEXIST
if mac address is existing, and delete two error log to avoid printing
them all the time after this modification.

Fixes: 72110b567479 ("net: hns3: return 0 and print warning when hit duplicate MAC")
Signed-off-by: Jian Shen <shenjian15@huawei.com>
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 0472e95
Raw File
Tip revision: 108b3c7810e14892c4a1819b1d268a2c785c087c authored by Jian Shen on 29 September 2021, 09:35:53 UTC
net: hns3: fix show wrong state when add existing uc mac address
Tip revision: 108b3c7
.cocciconfig
[spatch]
	options = --timeout 200
	options = --use-gitgrep
back to top