1. 10 11月, 2018 1 次提交
    • 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
  2. 08 11月, 2018 4 次提交
    • H
      net: hns3: add error handler for hclge_reset() · 65e41e7e
      Huazhong Tan 提交于
      When hclge_reset() is called, it may fail for several reasons.
      For example, an higher-level reset event occurs, memory allocation
      failure, hardware reset timeout, etc. Therefore, it is necessary
      to add corresponding error handling for these situations.
      1. A high-level reset is required due to a high-level reset failure.
      2. For memory allocation failure, a high-level reset is initiated by
      the timer to recover. The reason for using the timer is to prevent this
      new high-level reset to interrupt the reset process of other pf/vf;
      3. For the case of hardware reset timeout, reschedule the reset task
      to wait for the hardware to complete the reset.
      For memory allocation failure and reset timeouts, in order to prevent
      an infinite number of scheduled reset tasks, the number of error
      recovery needs to be limited.
      
      This patch also add some reset related debug log printing.
      Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      65e41e7e
    • H
      net: hns3: move some reset information from hnae3_handle into hclge_dev/hclgevf_dev · 0742ed7c
      Huazhong Tan 提交于
      Saving reset related information in the hclge_dev/hclgevf_dev
      structure is more suitable than the hnae3_handle, since hardware
      related information is kept in these two structure.
      Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0742ed7c
    • H
      net: hns3: provide some interface & information for the client · 4d60291b
      Huazhong Tan 提交于
      The client needs to know if the hardware is resetting when
      loading or unloading itself, because client may abort the loading
      process or wait for the reset process to finish when unloading
      if hardware is resetting.
      
      So this patch provides these interfaces to do it.
      1. get_hw_reset_stat, the reset status of hardware.
      2. ae_dev_resetting, whether reset task is scheduling.
      3. ae_dev_reset_cnt, how many reset has been done.
      
      Also, the RoCE client needs some field in the hnae3_roce_private_info
      to save its state, and process_hw_error interface in the
      hnae3_client_ops to process hardware errors.
      Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4d60291b
    • H
      net: hns3: add set_default_reset_request in the hnae3_ae_ops · 720bd583
      Huazhong Tan 提交于
      Currently, when reset_event is called because of tx timeout, it will
      upgrade the reset level (For PF, HNAE3_FUNC_RESET -> HNAE3_CORE_RESET
      -> HNAE3_GLOBAL_RESET) if the time between the new reset and last reset
      is within 20 secs, or restore the reset level to HNAE3_FUNC_RESET if
      the time between the new reset and last reset is over 20 secs.
      
      There is requirement that the caller needs to decide the reset level
      when triggering a reset, for example, RAS recovery. So this patch
      adds the set_default_reset_request to meet this requirement.
      Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      720bd583
  3. 01 11月, 2018 1 次提交
  4. 06 10月, 2018 2 次提交
  5. 02 10月, 2018 3 次提交
  6. 20 9月, 2018 1 次提交
  7. 04 8月, 2018 1 次提交
  8. 21 7月, 2018 6 次提交
  9. 17 7月, 2018 1 次提交
  10. 07 7月, 2018 1 次提交
  11. 29 6月, 2018 1 次提交
  12. 02 6月, 2018 1 次提交
  13. 29 5月, 2018 2 次提交
  14. 21 5月, 2018 1 次提交
    • X
      net: hns3: Fix for hns3 module is loaded multiple times problem · 3c7624d8
      Xi Wang 提交于
      If the hns3 driver has been built into kernel and then loaded with
      the same driver which built as KLM, it may trigger an error like
      below:
      
      [   20.009555] hns3: Hisilicon Ethernet Network Driver for Hip08 Family - version
      [   20.016789] hns3: Copyright (c) 2017 Huawei Corporation.
      [   20.022100] Error: Driver 'hns3' is already registered, aborting...
      [   23.517397] Unable to handle kernel NULL pointer dereference at virtual address 00000000
      ...
      [   23.691583] Process insmod (pid: 1982, stack limit = 0x00000000cd5f21cb)
      [   23.698270] Call trace:
      [   23.700705]  __list_del_entry_valid+0x2c/0xd8
      [   23.705049]  hnae3_unregister_client+0x68/0xa8
      [   23.709487]  hns3_init_module+0x98/0x1000 [hns3]
      [   23.714093]  do_one_initcall+0x5c/0x170
      [   23.717918]  do_init_module+0x64/0x1f4
      [   23.721654]  load_module+0x1d14/0x24b0
      [   23.725390]  SyS_init_module+0x158/0x208
      [   23.729300]  el0_svc_naked+0x30/0x34
      
      This patch fixes it by adding module version info.
      
      Fixes: 38caee9d ("net: hns3: Add support of the HNAE3 framework")
      Signed-off-by: NXi Wang <wangxi11@huawei.com>
      Signed-off-by: NSalil Mehta <salil.mehta@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3c7624d8
  15. 11 5月, 2018 1 次提交
  16. 02 5月, 2018 2 次提交
  17. 23 3月, 2018 3 次提交
  18. 10 3月, 2018 3 次提交
  19. 23 1月, 2018 1 次提交
  20. 09 1月, 2018 4 次提交