OpenCloudOS-Kernel/drivers/net/ethernet/hisilicon/hns3
Huazhong Tan 6dd22bbc77 net: hns3: implement the IMP reset processing for PF
The current code only print the prompt message after receiving
the IMP reset interrupt and does not perform the corresponding driver
reset operation. This patch implements the missing IMP reset handling
in the driver.
1. The driver sets the HCLGE_STATE_CMD_DISABLE to stop sending command
   after receiving the IMP reset interrupt.
2. The driver needs to notify the hardware to reload the IMP firmware.
3. The IMP firmware reloading makes the reset time of hardware longer,
   so it is necessary to extend the driver's waiting time to wait for
   the hardware reset to complete.
4. In hclge_check_event_cause, IMP reset event should have higher
   priority than other events.

Also, after clearing HCLGE_STATE_CMD_DISABLE in the hclge_cmd_init(),
it needs to check whether there is a pending reset, if so, just set
the HCLGE_STATE_CMD_DISABLE back and return.

Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-09 16:47:35 -08:00
..
hns3pf net: hns3: implement the IMP reset processing for PF 2018-11-09 16:47:35 -08:00
hns3vf net: hns3: add error handler for hclgevf_reset() 2018-11-09 16:47:35 -08:00
Makefile net: hns3: Unified HNS3 {VF|PF} Ethernet Driver for hip08 SoC 2017-12-15 10:55:34 -05:00
hclge_mbx.h net: hns3: add reset handling for VF when doing PF reset 2018-11-09 16:47:34 -08:00
hnae3.c net: hns3: Fix client initialize state issue when roce client initialize failed 2018-09-19 21:20:22 -07:00
hnae3.h net: hns3: add reset handling for VF when doing PF reset 2018-11-09 16:47:34 -08:00
hns3_dcbnl.c net: hns3: use HNS3_NIC_STATE_RESETTING to indicate resetting 2018-11-07 11:42:17 -08:00
hns3_enet.c net: hns3: stop napi polling when HNS3_NIC_STATE_DOWN is set 2018-11-09 16:47:35 -08:00
hns3_enet.h net: hns3: add reset handling for VF when doing PF reset 2018-11-09 16:47:34 -08:00
hns3_ethtool.c net: hns3: use HNS3_NIC_STATE_RESETTING to indicate resetting 2018-11-07 11:42:17 -08:00