1. 14 Jan, 2020 14 commits
  2. 13 Jan, 2020 3 commits
  3. 12 Jan, 2020 11 commits
  4. 11 Jan, 2020 12 commits
    • David S. Miller's avatar
      Merge branch 'hns3-next' · 5c9166f0
      David S. Miller authored
      Huazhong Tan says:
      
      ====================
      net: hns3: add some misc update about reset issue
      
      This series includes some misc update relating to reset issue.
      [patch 1/7] & [patch 2/7] splits hclge_reset()/hclgevf_reset()
      into two parts: preparing and rebuilding. Since the procedure
      of FLR should be separated out from the reset task([patch 3/7 &
      patch 3/7]), then the FLR's processing can reuse these codes.
      
      pci_error_handlers.reset_prepare() is void type function, so
      [patch 6/7] & [patch 7/7] factor some codes related to PF
      function reset to make the preparing done before .reset_prepare()
      return.
      
      BTW, [patch 5/7] enlarges the waiting time of reset for matching
      the hardware's.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5c9166f0
    • Huazhong Tan's avatar
      net: hns3: refactor the notification scheme of PF reset · c7554dcd
      Huazhong Tan authored
      hclge_reset_prepare_down() is only used to inform VF that PF is
      going to do function reset, then using hclge_func_reset_sync_vf()
      in hclge_reset_prepare_wait() to query whether VF is ready before
      asserting PF function reset. To make the code more readable,
      this patch uses a new function hclge_function_reset_notify_vf()
      to do this job.
      Signed-off-by: default avatarHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c7554dcd
    • Huazhong Tan's avatar
      net: hns3: modify hclge_func_reset_sync_vf()'s return type to void · c3106cac
      Huazhong Tan authored
      When synchronizes with VFs fail before PF function reset,
      PF driver should go on its function reset, otherwise it
      can not run normally anymore. So, hclge_func_reset_sync_vf()
      should not affect the processing of PF reset, this patch
      modifies its return type to void.
      Signed-off-by: default avatarHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c3106cac
    • Huazhong Tan's avatar
      net: hns3: enlarge HCLGE_RESET_WAIT_CNT · 5bb784e9
      Huazhong Tan authored
      When the load of firmware is high, its reset task may takes
      more time(which will be as long as 35 seconds). So this
      patch modifies HCLGE_RESET_WAIT_CNT to match the firmware's.
      Signed-off-by: default avatarHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5bb784e9
    • Huazhong Tan's avatar
      net: hns3: refactor the procedure of VF FLR · f28368bb
      Huazhong Tan authored
      Currently, the actual work of VF FLR is handled in the reset task,
      which is asynchronous. So in some case, if the preparing and
      rebuilding are not done, then the VF FLR will trigger some problems,
      for example, makes hardware go into chaos.
      
      So this patch separates the process of VF FLR from reset task, and
      adds a semaphore to serialize this reset and others.
      
      When FLR's preparing fails, if there has other higher level reset
      pending or failing times less than the HCLGE_FLR_RETRY_CNT, this
      preparing should be retried, otherwise it will get into a wrong state.
      
      BTW, while the hardware reports misc interrupt during pcie_flr(),
      the driver can not receive this interrupt anymore, so disable it
      when hclgevf_flr_prepare() return, and re-enable it when enter
      hclgevf_flr_done().
      
      Avoid declaring internal function hclgevf_enable_vector(), this patch
      also moves its definition forward, and removes unused enum
      hnae3_flr_state.
      Signed-off-by: default avatarHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f28368bb
    • Huazhong Tan's avatar
      net: hns3: refactor the precedure of PF FLR · 8627bded
      Huazhong Tan authored
      Currently, the actual work of PF FLR is handled in the reset task,
      which is asynchronous. So in some case, if the preparing and
      rebuilding are not done, then the PF FLR will trigger some problems,
      for example, makes hardware go into chaos.
      
      So this patch separates the process of PF FLR from reset task, and
      adds a semaphore to serialize this reset and others.
      
      When FLR's preparing fails, if there has other higher level reset
      pending or failing times less than the HCLGE_FLR_RETRY_CNT, this
      preparing should be retried, otherwise PF and its VF may get into
      wrong state.
      
      BTW, while the hardware reports misc interrupt during pcie_flr(),
      the driver can not receive this interrupt anymore, so disable it
      when hclge_flr_prepare() return, and re-enable it when enter
      hclge_flr_done().
      Signed-off-by: default avatarHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8627bded
    • Huazhong Tan's avatar
      net: hns3: split hclgevf_reset() into preparing and rebuilding part · 1cc9bc6e
      Huazhong Tan authored
      hclgevf_reset() is a little bloated, and the process of VF FLR will
      be separated from the reset task later. So this patch splits
      hclgevf_reset() into hclgevf_reset_prepare() and hclge_reset_rebuild(),
      then FLR can also reuse these two functions. Also moves HNAE3_UP_CLIENT
      into hclgevf_reset_stack().
      Signed-off-by: default avatarHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1cc9bc6e
    • Huazhong Tan's avatar
      net: hns3: split hclge_reset() into preparing and rebuilding part · d4fa0656
      Huazhong Tan authored
      hclge_reset() is a little bloated, and the process of PF FLR will
      be separated from the reset task later. So this patch splits
      hclge_reset() into hclge_reset_prepare() and hclge_reset_rebuild(),
      then FLR can also reuse these two functions.
      
      BTW, since hclge_clear_reset_cause() and hclge_reset_prepare_up()
      will not affect the device, so in hclge_reset_rebuild(), these
      functions are called without rtnl_lock.
      Signed-off-by: default avatarHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d4fa0656
    • YueHaibing's avatar
      sfc: remove set but not used variable 'nic_data' · 6821af8b
      YueHaibing authored
      Fixes gcc '-Wunused-but-set-variable' warning:
      
      drivers/net/ethernet/sfc/mcdi_functions.c: In function 'efx_mcdi_ev_init':
      drivers/net/ethernet/sfc/mcdi_functions.c:79:28: warning:
       variable 'nic_data' set but not used [-Wunused-but-set-variable]
      
      commit 4438b587 ("sfc: move MCDI event queue management code")
      introduces this unused variable.
      Reported-by: default avatarHulk Robot <hulkci@huawei.com>
      Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6821af8b
    • YueHaibing's avatar
      sfc: remove duplicated include from ef10.c · de4ff834
      YueHaibing authored
      Remove duplicated include.
      Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
      Acked-by: default avatarEdward Cree <ecree@solarflare.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      de4ff834
    • Jonathan Lemon's avatar
      bnxt: Detach page from page pool before sending up the stack · 3071c517
      Jonathan Lemon authored
      When running in XDP mode, pages come from the page pool, and should
      be freed back to the same pool or specifically detached.  Currently,
      when the driver re-initializes, the page pool destruction is delayed
      forever since it thinks there are oustanding pages.
      
      Fixes: 322b87ca ("bnxt_en: add page_pool support")
      Signed-off-by: default avatarJonathan Lemon <jonathan.lemon@gmail.com>
      Reviewed-by: default avatarAndy Gospodarek <gospo@broadcom.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3071c517
    • David S. Miller's avatar
      Merge branch 'devlink-documentation-refactor' · 451c7900
      David S. Miller authored
      Jacob Keller says:
      
      ====================
      devlink documentation refactor
      
      This series updates the devlink documentation, with a few primary goals
      
       * move all of the devlink documentation into a dedicated subfolder
       * convert that documentation to the reStructuredText format
       * merge driver-specific documentations into a single file per driver
       * add missing documentation, including per-driver and devlink generally
      
      For each driver, I took the time to review the code and add further
      documentation on the various features it currently supports. Additionally, I
      added new documentation files for some of the features such as
      devlink-dpipe, devlink-resource, and devlink-regions.
      
      Note for the region snapshot triggering, I kept that as a separate patch as
      that is based on work that has not yet been merged to net-next, and may
      change.
      
      I also improved the existing documentation for devlink-info and
      devlink-param by adding a bit more of an introduction when converting it to
      the rst format.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      451c7900