[Patch net-next 00/11] add code optimization for VF reset and some new reset feature

From: Huazhong Tan
Date: Fri Nov 09 2018 - 09:08:22 EST


Currently hardware supports below reset:
1. VF reset: triggered by sending cmd to IMP(Integrated Management
Processor). Only reset specific VF function and do not affect
other PF or VF.
2. PF reset: triggered by sending cmd to IMP. Only reset specific PF
and it's VF.
3. PF FLR: triggered by PCIe subsystem. Only reset specific PF and
it's VF.
4. VF FLR: triggered by PCIe subsystem. Only reset specific VF function
and do not affect other PF or VF.
5. Core reset: triggered by writing to register. Reset most hardware
unit, such as SSU, which affects all the PF and VF.
6. Global reset: triggered by writing to register. Reset all hardware
unit, which affects all the PF and VF.
7. IMP reset: triggered by IMU(Intelligent Management Unit) when
IMP is not longer feeding IMU's watchdog. IMU will reload the IMP
firmware and IMP will perform global reset after firmware reloading,
which affects all the PF and VF.

Current driver only support PF/VF reset, incomplete core and global
reset(lacking the vf reset handling). So this patchset adds complete
reset support in hns3 driver.

Also, this patchset contains some optimization related to reset.

Huazhong Tan (11):
net: hns3: add reset_hdev to reinit the hdev in VF's reset process
net: hns3: adjust VF's reset process
net: hns3: add reset handling for VF when doing PF reset
net: hns3: add reset handling for VF when doing Core/Global/IMP reset
net: hns3: stop handling command queue while resetting VF
net: hns3: add error handler for hclgevf_reset()
net: hns3: stop napi polling when HNS3_NIC_STATE_DOWN is set
net: hns3: implement the IMP reset processing for PF
net: hns3: add PCIe FLR support for PF
net: hns3: do VF's pci re-initialization while PF doing FLR
net: hns3: add PCIe FLR support for VF

drivers/net/ethernet/hisilicon/hns3/hclge_mbx.h | 6 +
drivers/net/ethernet/hisilicon/hns3/hnae3.h | 11 +-
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 66 +++-
drivers/net/ethernet/hisilicon/hns3/hns3_enet.h | 6 +-
.../net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.c | 11 +-
.../ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 185 +++++++++-
.../ethernet/hisilicon/hns3/hns3pf/hclge_main.h | 11 +
.../net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c | 35 +-
.../ethernet/hisilicon/hns3/hns3vf/hclgevf_cmd.c | 13 +-
.../ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 404 +++++++++++++++------
.../ethernet/hisilicon/hns3/hns3vf/hclgevf_main.h | 36 +-
.../ethernet/hisilicon/hns3/hns3vf/hclgevf_mbx.c | 18 +-
12 files changed, 638 insertions(+), 164 deletions(-)

--
2.7.4