]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: add handshake with VF for PF reset
authorHuazhong Tan <tanhuazhong@huawei.com>
Fri, 9 Aug 2019 02:31:17 +0000 (10:31 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 9 Aug 2019 20:44:33 +0000 (13:44 -0700)
commit42db37ecd136669f93c758ee679269e493e47f19
tree364aa6bb40ac4f1f5414ba1e6049e9c572fdaed2
parent085de87ec14dde4e0371671dc3e719be1a088a18
net: hns3: add handshake with VF for PF reset

Before PF asserting function reset, it should make sure
that all its VFs have been ready, otherwise, it will cause
some hardware errors.

So this patch adds function hclge_func_reset_sync_vf() to
synchronize VF before asserting PF function reset. For new
firmware which supports command HCLGE_OPC_QUERY_VF_RST_RDY,
we will try to query VFs' ready status within 30 seconds.
And keep the old implementation for compatible with firmware
which does not support this command.

Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Reviewed-by: Yunsheng Lin <linyunsheng@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c