]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: add protection when get SFP speed as 0
authorGuojia Liao <liaoguojia@huawei.com>
Sat, 4 Jan 2020 02:49:29 +0000 (10:49 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 6 Jan 2020 21:26:25 +0000 (13:26 -0800)
commit3f55c571babc3d6542a7dafdf7a9ac76eabb96fe
tree2798cf814c1919bc9444c234dc0fb8fc4a2275c0
parentd6bb94764d0e02acd0ca8df269fa934ea310e18a
net: hns3: add protection when get SFP speed as 0

In some case, the MAC speed get from hardware maybe 0, it should
not be set to mac->speed.

Signed-off-by: Guojia Liao <liaoguojia@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