1. 31 5月, 2020 2 次提交
  2. 29 5月, 2020 4 次提交
    • B
      ice: Refactor VF reset · 12bb018c
      Brett Creeley 提交于
      Currently VF VSI are being reset twice during a PFR or greater. This is
      causing reset, specifically resetting all VFs, to take too long. This is
      causing various issues with VF drivers not being able to gracefully
      handle the VF reset timeout. Fix this by refactoring how VF reset is
      handled for the case mentioned previously and for the VFR/VFLR case.
      
      The refactor was done by doing the following:
      
      1. Removing the call to ice_vsi_rebuild_by_type for
         ICE_VSI_VF VSI, which was causing the initial VSI rebuild.
      
      2. Adding functions for pre/post VSI rebuild functions that can be called
         in both the reset all VFs case and reset individual VF case.
      
      3. Adding VSI rebuild functions that are specific for the reset all VFs
         case and adding functions that are specific for the reset individual
         VF case.
      
      4. Calling the pre-rebuild function, then the specific VSI rebuild
         function based on the reset type, and then calling the post-rebuild
         function to handle VF resets.
      
      This patch series makes some assumptions about how VSI are handling by
      FW during reset:
      
      1. During a PFR or greater all VSI in FW will be cleared.
      2. During a VFR/VFLR the VSI rebuild responsibility is in the hands of
         the PF software.
      3. There is code in the ice_reset_all_vfs() case to amortize operations
         if possible. This was left intact.
      4. PF software should not be replaying VSI based filters that were added
         other than host configured, PF software configured, or the VF's
         default/LAA MAC. This is the VF drivers job after it has been reset.
      Signed-off-by: NBrett Creeley <brett.creeley@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      12bb018c
    • J
      ice: fix kernel BUG if register_netdev fails · c2b313b7
      Jacob Keller 提交于
      If register_netdev() fails, the driver will attempt to cleanup the
      q_vectors and inadvertently trigger a kernel BUG due to a NULL pointer
      dereference.
      
      This occurs because cleaning up q_vectors attempts to call
      netif_napi_del on napi_structs which were never initialized.
      
      Resolve this by releasing the netdev in ice_cfg_netdev and setting
      vsi->netdev to NULL. This ensures that after ice_cfg_netdev fails the
      state is rewound to match as if ice_cfg_netdev was never called.
      Signed-off-by: NJacob Keller <jacob.e.keller@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      c2b313b7
    • J
      ice: fix potential double free in probe unrolling · bc3a0241
      Jacob Keller 提交于
      If ice_init_interrupt_scheme fails, ice_probe will jump to clearing up
      the interrupts. This can lead to some static analysis tools such as the
      compiler sanitizers complaining about double free problems.
      
      Since ice_init_interrupt_scheme already unrolls internally on failure,
      there is no need to call ice_clear_interrupt_scheme when it fails. Add
      a new unroll label and use that instead.
      Signed-off-by: NJacob Keller <jacob.e.keller@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      bc3a0241
    • A
      ice: Poll for reset completion when DDP load fails · 9918f2d2
      Anirudh Venkataramanan 提交于
      There are certain cases where the DDP load fails and the FW issues a
      core reset. For these cases, wait for reset to complete before
      proceeding with reset of the driver init.
      Signed-off-by: NAnirudh Venkataramanan <anirudh.venkataramanan@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      9918f2d2
  3. 28 5月, 2020 6 次提交
  4. 23 5月, 2020 9 次提交
  5. 22 5月, 2020 9 次提交
  6. 29 3月, 2020 1 次提交
  7. 27 3月, 2020 1 次提交
  8. 21 3月, 2020 1 次提交
    • J
      ice: enable initial devlink support · 1adf7ead
      Jacob Keller 提交于
      Begin implementing support for the devlink interface with the ice
      driver.
      
      The pf structure is currently memory managed through devres, via
      a devm_alloc. To mimic this behavior, after allocating the devlink
      pointer, use devm_add_action to add a teardown action for releasing the
      devlink memory on exit.
      
      The ice hardware is a multi-function PCIe device. Thus, each physical
      function will get its own devlink instance. This means that each
      function will be treated independently, with its own parameters and
      configuration. This is done because the ice driver loads a separate
      instance for each function.
      
      Due to this, the implementation does not enable devlink to manage
      device-wide resources or configuration, as each physical function will
      be treated independently. This is done for simplicity, as managing
      a devlink instance across multiple driver instances would significantly
      increase the complexity for minimal gain.
      Signed-off-by: NJacob Keller <jacob.e.keller@intel.com>
      Reviewed-by: NJesse Brandeburg <jesse.brandeburg@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      1adf7ead
  9. 11 3月, 2020 3 次提交
  10. 06 3月, 2020 1 次提交
    • J
      ice: Use pci_get_dsn() · ceb2f007
      Jacob Keller 提交于
      Replace the open-coded implementation for reading the PCIe DSN with
      pci_get_dsn().
      
      The pci_get_dsn() function will perform two pci_read_config_dword calls
      to read the lower and upper config dwords. It bitwise ORs them into
      a u64 value. Instead of using put_unaligned_le32 to convert the value to
      LE32 format, just use the %016llX printf specifier. This will print the
      u64 correct, putting the most significant byte of the value first. Since
      pci_get_dsn() correctly orders the two dwords into a u64, this should
      produce equivalent results in less code.
      Signed-off-by: NJacob Keller <jacob.e.keller@intel.com>
      Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ceb2f007
  11. 20 2月, 2020 3 次提交