1. 10 11月, 2018 7 次提交
    • H
      net: hns3: do VF's pci re-initialization while PF doing FLR · 862d969a
      Huazhong Tan 提交于
      While doing PF FLR, VF's PCIe configuration space will be cleared, so
      the pci and vector of VF should be re-initialized in the VF's reset
      process while PF doing FLR.
      
      Also, this patch fixes some memory not freed problem when pci
      re-initialization is done during reset process.
      Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      862d969a
    • H
      net: hns3: add error handler for hclgevf_reset() · 6a5f6fa3
      Huazhong Tan 提交于
      Since hclgevf_reset() may fail for some reasons, so it needs an error
      handler to deal with it. When VF reset failed, VF can only be restored
      by a higher level reset asserted by PF. So, it needs to reinitialize
      its command queue, then it can respond to higher level reset.
      
      Also, this patch adds error logging in the hclgevf_notify_client().
      Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6a5f6fa3
    • H
      net: hns3: stop handling command queue while resetting VF · ef5f8e50
      Huazhong Tan 提交于
      According to hardware's description, after the reset occurs, the driver
      needs to re-initialize the command queue before sending and receiving
      any commands. Therefore, the VF's driver needs to identify the command
      queue needs to re-initialize with HCLGEVF_STATE_CMD_DISABLE, and does
      not allow sending or receiving commands before the re-initialization.
      Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ef5f8e50
    • H
      net: hns3: add reset handling for VF when doing Core/Global/IMP reset · b90fcc5b
      Huazhong Tan 提交于
      When a Core/Global/IMP reset occurs, the hardware sets the reset status
      register of all PF/VF and reports a reset interrupt to all PF/VF and
      firmware.
      
      When receiving the reset interrupt:
      1. The firmware will wait for 100 ms before resetting the hardware and
         clear the reset status register of all PF when hardware reset is done.
      2. The PF/VF driver needs to down the netdev within 100 ms and then wait
         for hardware reset to finish.
      3. After firmware clearing the reset status register of all PF, the PF
         driver reinitializes the hardware and clear the reset status register
         of it's VF.
      4. After PF driver clearing the reset status register of VF, the VF driver
         reinitializes the hardware.
      
      This patch mainly add handling for the step 4.
      Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b90fcc5b
    • H
      net: hns3: add reset handling for VF when doing PF reset · aa5c4f17
      Huazhong Tan 提交于
      When PF performs a function reset, the hardware will reset both PF
      and all the VF belong to this PF. Hence, both PF's driver and VF's
      driver need to perform corresponding reset operations.
      
      Before PF driver asserting function reset to hardware, it firstly
      set up VF's hardware reset status, and inform the VF driver with
      HNAE3_VF_PF_FUNC_RESET, then VF driver sets this reset type to
      reset_pending and shechule reset task to stop IO and waits for the
      hardware reset status to clear. When PF driver has reinitialized the
      hardware and is ready to process mailbox from VF, PF driver clears
      VF's hardware reset status for VF to continue its reset process.
      
      Also, this patch uses readl_poll_timeout to simplify the hardware reset
      status waitting.
      Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: NYunsheng Lin <linyunsheng@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      aa5c4f17
    • H
      net: hns3: adjust VF's reset process · dea846e8
      Huazhong Tan 提交于
      Currently when VF need to reset itself, it will send a cmd to PF,
      after receiving the VF reset requset, PF sends a cmd to inform
      VF to enter the reset process and send a cmd to firmware to do the
      actual reset for the VF, it is possible that firmware has resetted
      the VF, but VF has not entered the reset process, which may cause
      IO not stopped problem when firmware is resetting VF.
      
      This patch fixes it by adjusting the VF reset process, when VF
      need to reset itself, it will enter the reset process first, and
      it will tell the PF to send cmd to firmware to reset itself.
      
      Add member reset_pending to struct hclgevf_dev, which indicates that
      there is reset event need to be processed by the VF's reset task, and
      the VF's reset task chooses the highest-level one and clears other
      low-level one when it processes reset_pending.
      
      hclge_inform_reset_assert_to_vf function is unused now, but it will
      be used to support the PF reset with VF working, so declare it in
      the header file.
      Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: NYunsheng Lin <linyunsheng@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      dea846e8
    • H
      net: hns3: add reset_hdev to reinit the hdev in VF's reset process · 9c6f7085
      Huazhong Tan 提交于
      When doing reset, the reset handling function only need to
      reinitialize hardware, it makes sense to add a function to
      do that job. Also the error handling of hclgevf_init_hdev is
      different when it is used in reset process.
      
      This patch adds reset_hdev to reinitialize hardware when resetting.
      Also, this patch removes the hclgevf_dev_ongoing_full_reset because
      it is unused now.
      Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: NYunsheng Lin <linyunsheng@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9c6f7085
  2. 08 11月, 2018 5 次提交
  3. 01 11月, 2018 2 次提交
  4. 23 10月, 2018 1 次提交
  5. 11 10月, 2018 2 次提交
  6. 06 10月, 2018 1 次提交
  7. 29 9月, 2018 1 次提交
  8. 22 9月, 2018 5 次提交
  9. 20 9月, 2018 4 次提交
  10. 04 8月, 2018 1 次提交
  11. 07 7月, 2018 1 次提交
  12. 02 7月, 2018 2 次提交
  13. 29 6月, 2018 3 次提交
  14. 07 6月, 2018 1 次提交
  15. 06 6月, 2018 1 次提交
  16. 02 6月, 2018 3 次提交