1. 16 11月, 2018 2 次提交
  2. 10 11月, 2018 3 次提交
    • H
      net: hns3: add PCIe FLR support for PF · 6b9a97ee
      Huazhong Tan 提交于
      This patch implements the .reset_prepare and .reset_done
      ops from pci framework to support the PF FLR.
      Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6b9a97ee
    • 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
  3. 08 11月, 2018 3 次提交
  4. 01 11月, 2018 1 次提交
  5. 23 10月, 2018 2 次提交
  6. 13 10月, 2018 1 次提交
  7. 11 10月, 2018 1 次提交
  8. 06 10月, 2018 1 次提交
  9. 02 10月, 2018 5 次提交
  10. 29 9月, 2018 4 次提交
  11. 22 9月, 2018 2 次提交
  12. 20 9月, 2018 2 次提交
  13. 21 7月, 2018 1 次提交
  14. 02 7月, 2018 2 次提交
  15. 02 6月, 2018 2 次提交
  16. 29 5月, 2018 1 次提交
  17. 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
  18. 16 5月, 2018 3 次提交
  19. 11 5月, 2018 1 次提交
  20. 23 3月, 2018 2 次提交
    • S
      net: hns3: Add VF Reset device state and its handling · 436667d2
      Salil Mehta 提交于
      This introduces the hclge device reset states of "requested" and
      "pending" and also its handling in context to Reset Service Task.
      
      Device gets into requested state because of any VF reset request
      asserted from upper layers, for example due to watchdog timeout
      expiration. Requested state would result in eventually forwarding
      the VF reset request to PF which would actually reset the VF.
      
      Device will get into pending state if:
      1. VF receives the acknowledgement from PF for the VF reset
         request it originally sent to PF.
      2. Reset Service Task detects that after asserting VF reset for
         certain times the data-path is not working and device then
         decides to assert full VF reset(this means also resetting the
         PCIe interface).
      3. PF intimates the VF that it has undergone reset.
      Pending state would result in VF to poll for hardware reset
      completion status and then resetting the stack/enet layer, which
      in turn means reinitializing the ring management/enet layer.
      
      Note: we would be adding support of 3. later as a separate patch.
      This decision should not affect VF reset as its event handling
      is generic in nature.
      Signed-off-by: NSalil Mehta <salil.mehta@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      436667d2
    • S
      net: hns3: Changes to make enet watchdog timeout func common for PF/VF · 6d4c3981
      Salil Mehta 提交于
      HNS3 drivers enet layer, used for the ring management and stack
      interaction, is common to both VF and PF. PF already supports reset
      functionality to handle the network stack watchdog timeout trigger
      but the existing code is not generic enough to be used to support VF
      reset as well.
      This patch does following:
      1. Makes the existing watchdog timeout handler in enet layer generic
         i.e. suitable for both VF and PF and
      2. Introduces the new reset event handler for the VF code.
      3. Changes existing reset event handler of PF code to initialize the
         reset level
      Signed-off-by: NSalil Mehta <salil.mehta@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6d4c3981