]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
net: hns3: add a check for device specifications queried from firmware
authorGuangbin Huang <huangguangbin2@huawei.com>
Sun, 27 Sep 2020 07:12:47 +0000 (15:12 +0800)
committerDavid S. Miller <davem@davemloft.net>
Sun, 27 Sep 2020 20:25:22 +0000 (13:25 -0700)
commit1329702899db22611c8cfdf63e6d38b71b803fa1
treef494b0f7de88edd6c838241ea97d1443b88e794d
parentd9c7d20dfb95b5a084e75186c5090eb09b082eac
net: hns3: add a check for device specifications queried from firmware

The device specifications querying is unsupported by the old
firmware, in this case, these specifications are 0. However,
some specifications should not be 0 or will cause problem.

So after querying from firmware, some device specifications
are needed to check their value and set to default value if
their values are 0.

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
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c