]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: Fix client initialize state issue when roce client initialize failed
authorJian Shen <shenjian15@huawei.com>
Wed, 19 Sep 2018 17:29:57 +0000 (18:29 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 20 Sep 2018 04:20:22 +0000 (21:20 -0700)
commitb959215232a7154823023eda0341812e552cf0a5
treed570014730c8a3776f938b5106fec22f0f218573
parentd0a7c981c32dc06541213f89529c1e834cdfe9ef
net: hns3: Fix client initialize state issue when roce client initialize failed

When roce is loaded before nic, the roce client will not be initialized
until nic client is initialized, but roce init flag is set before it.
Furthermore, in this case of nic initialized success and roce failed,
the nic init flag is not set, and roce init flag is not cleared.

This patch fixes it by set init flag only after the client is initialized
successfully.

Fixes: efa29b6d502b ("net: hns3: Add HNS3 VF HCL(Hardware Compatibility Layer) Support")
Fixes: 22c0e2ce21dd ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support")
Signed-off-by: Jian Shen <shenjian15@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hnae3.c
drivers/net/ethernet/hisilicon/hns3/hnae3.h
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c