net: hns3: split hclge_reset() into preparing and rebuilding part
authorHuazhong Tan <tanhuazhong@huawei.com>
Sat, 11 Jan 2020 08:33:47 +0000 (16:33 +0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 11 Jan 2020 22:52:22 +0000 (14:52 -0800)
commitd4fa06562ae2bb0379a4c6503aca6806a1aeb15e
treeaa923d896bc0154890d229b0ac64d7ab44a8405b
parent6821af8b7885870ed0dcb299e4b3cd38695538bc
net: hns3: split hclge_reset() into preparing and rebuilding part

hclge_reset() is a little bloated, and the process of PF FLR will
be separated from the reset task later. So this patch splits
hclge_reset() into hclge_reset_prepare() and hclge_reset_rebuild(),
then FLR can also reuse these two functions.

BTW, since hclge_clear_reset_cause() and hclge_reset_prepare_up()
will not affect the device, so in hclge_reset_rebuild(), these
functions are called without rtnl_lock.

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