1. 10 Nov, 2018 2 commits
    • Huazhong Tan's avatar
      net: hns3: adjust VF's reset process · dea846e8
      Huazhong Tan authored
      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: default avatarHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: default avatarYunsheng Lin <linyunsheng@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      dea846e8
    • Huazhong Tan's avatar
      net: hns3: add reset_hdev to reinit the hdev in VF's reset process · 9c6f7085
      Huazhong Tan authored
      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: default avatarHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: default avatarYunsheng Lin <linyunsheng@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9c6f7085
  2. 09 Nov, 2018 38 commits