net: hns3: fix incorrect capability bit display for copper port
authorJian Shen <shenjian15@huawei.com>
Fri, 10 Nov 2023 09:37:09 +0000 (17:37 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 28 Nov 2023 17:19:50 +0000 (17:19 +0000)
commitab31012867f28f9fb3fe6646b0943099b31163bd
tree6060bfc841aa9513ff7c897fd145a664f3604b47
parentfc6df8e99b38154ebb87a014286acd771ef6bcfe
net: hns3: fix incorrect capability bit display for copper port

[ Upstream commit 75b247b57d8b71bcb679e4cb37d0db104848806c ]

Currently, the FEC capability bit is default set for device version V2.
It's incorrect for the copper port. Eventhough it doesn't make the nic
work abnormal, but the capability information display in debugfs may
confuse user. So clear it when driver get the port type inforamtion.

Fixes: 433ccce83504 ("net: hns3: use FEC capability queried from firmware")
Signed-off-by: Jian Shen <shenjian15@huawei.com>
Signed-off-by: Jijie Shao <shaojijie@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c