1. 03 3月, 2022 1 次提交
  2. 10 2月, 2022 2 次提交
    • B
      ice: Support configuring the device to Double VLAN Mode · a1ffafb0
      Brett Creeley 提交于
      In order to support configuring the device in Double VLAN Mode (DVM),
      the DDP and FW have to support DVM. If both support DVM, the PF that
      downloads the package needs to update the default recipes, set the
      VLAN mode, and update boost TCAM entries.
      
      To support updating the default recipes in DVM, add support for
      updating an existing switch recipe's lkup_idx and mask. This is done
      by first calling the get recipe AQ (0x0292) with the desired recipe
      ID. Then, if that is successful update one of the lookup indices
      (lkup_idx) and its associated mask if the mask is valid otherwise
      the already existing mask will be used.
      
      The VLAN mode of the device has to be configured while the global
      configuration lock is held while downloading the DDP, specifically after
      the DDP has been downloaded. If supported, the device will default to
      DVM.
      Co-developed-by: NDan Nowlin <dan.nowlin@intel.com>
      Signed-off-by: NDan Nowlin <dan.nowlin@intel.com>
      Signed-off-by: NBrett Creeley <brett.creeley@intel.com>
      Tested-by: NGurucharan G <gurucharanx.g@intel.com>
      Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
      a1ffafb0
    • B
      ice: Adjust naming for inner VLAN operations · 7bd527aa
      Brett Creeley 提交于
      Current operations act on inner VLAN fields. To support double VLAN, outer
      VLAN operations and functions will be implemented. Add the "inner" naming
      to existing VLAN operations to distinguish them from the upcoming outer
      values and functions. Some spacing adjustments are made to align
      values.
      
      Note that the inner is not talking about a tunneled VLAN, but the second
      VLAN in the packet. For SVM the driver uses inner or single VLAN
      filtering and offloads and in Double VLAN Mode the driver uses the
      inner filtering and offloads for SR-IOV VFs in port VLANs in order to
      support offloading the guest VLAN while a port VLAN is configured.
      Signed-off-by: NBrett Creeley <brett.creeley@intel.com>
      Tested-by: NGurucharan G <gurucharanx.g@intel.com>
      Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
      7bd527aa
  3. 16 12月, 2021 1 次提交
    • J
      ice: support immediate firmware activation via devlink reload · 399e27db
      Jacob Keller 提交于
      The ice hardware contains an embedded chip with firmware which can be
      updated using devlink flash. The firmware which runs on this chip is
      referred to as the Embedded Management Processor firmware (EMP
      firmware).
      
      Activating the new firmware image currently requires that the system be
      rebooted. This is not ideal as rebooting the system can cause unwanted
      downtime.
      
      In practical terms, activating the firmware does not always require a
      full system reboot. In many cases it is possible to activate the EMP
      firmware immediately. There are a couple of different scenarios to
      cover.
      
       * The EMP firmware itself can be reloaded by issuing a special update
         to the device called an Embedded Management Processor reset (EMP
         reset). This reset causes the device to reset and reload the EMP
         firmware.
      
       * PCI configuration changes are only reloaded after a cold PCIe reset.
         Unfortunately there is no generic way to trigger this for a PCIe
         device without a system reboot.
      
      When performing a flash update, firmware is capable of responding with
      some information about the specific update requirements.
      
      The driver updates the flash by programming a secondary inactive bank
      with the contents of the new image, and then issuing a command to
      request to switch the active bank starting from the next load.
      
      The response to the final command for updating the inactive NVM flash
      bank includes an indication of the minimum reset required to fully
      update the device. This can be one of the following:
      
       * A full power on is required
       * A cold PCIe reset is required
       * An EMP reset is required
      
      The response to the command to switch flash banks includes an indication
      of whether or not the firmware will allow an EMP reset request.
      
      For most updates, an EMP reset is sufficient to load the new EMP
      firmware without issues. In some cases, this reset is not sufficient
      because the PCI configuration space has changed. When this could cause
      incompatibility with the new EMP image, the firmware is capable of
      rejecting the EMP reset request.
      
      Add logic to ice_fw_update.c to handle the response data flash update
      AdminQ commands.
      
      For the reset level, issue a devlink status notification informing the
      user of how to complete the update with a simple suggestion like
      "Activate new firmware by rebooting the system".
      
      Cache the status of whether or not firmware will restrict the EMP reset
      for use in implementing devlink reload.
      
      Implement support for devlink reload with the "fw_activate" flag. This
      allows user space to request the firmware be activated immediately.
      
      For the .reload_down handler, we will issue a request for the EMP reset
      using the appropriate firmware AdminQ command. If we know that the
      firmware will not allow an EMP reset, simply exit with a suitable
      netlink extended ACK message indicating that the EMP reset is not
      available.
      
      For the .reload_up handler, simply wait until the driver has finished
      resetting. Logic to handle processing of an EMP reset already exists in
      the driver as part of its reset and rebuild flows.
      
      Implement support for the devlink reload interface with the
      "fw_activate" action. This allows userspace to request activation of
      firmware without a reboot.
      
      Note that support for indicating the required reset and EMP reset
      restriction is not supported on old versions of firmware. The driver can
      determine if the two features are supported by checking the device
      capabilities report. I confirmed support has existed since at least
      version 5.5.2 as reported by the 'fw.mgmt' version. Support to issue the
      EMP reset request has existed in all version of the EMP firmware for the
      ice hardware.
      
      Check the device capabilities report to determine whether or not the
      indications are reported by the running firmware. If the reset
      requirement indication is not supported, always assume a full power on
      is necessary. If the reset restriction capability is not supported,
      always assume the EMP reset is available.
      
      Users can verify if the EMP reset has activated the firmware by using
      the devlink info report to check that the 'running' firmware version has
      updated. For example a user might do the following:
      
       # Check current version
       $ devlink dev info
      
       # Update the device
       $ devlink dev flash pci/0000:af:00.0 file firmware.bin
      
       # Confirm stored version updated
       $ devlink dev info
      
       # Reload to activate new firmware
       $ devlink dev reload pci/0000:af:00.0 action fw_activate
      
       # Confirm running version updated
       $ devlink dev info
      
      Finally, this change does *not* implement basic driver-only reload
      support. I did look into trying to do this. However, it requires
      significant refactor of how the ice driver probes and loads everything.
      The ice driver probe and allocation flows were not designed with such
      a reload in mind. Refactoring the flow to support this is beyond the
      scope of this change.
      Signed-off-by: NJacob Keller <jacob.e.keller@intel.com>
      Tested-by: NGurucharan G <gurucharanx.g@intel.com>
      Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
      399e27db
  4. 29 10月, 2021 1 次提交
    • B
      ice: Add support to print error on PHY FW load failure · 99d40752
      Brett Creeley 提交于
      Some devices have support for loading the PHY FW and in some cases this
      can fail. When this fails, the FW will set the corresponding bit in the
      link info structure. Also, the FW will send a link event if the correct
      link event mask bit is set. Add support for printing an error message
      when the PHY FW load fails during any link configuration flow and the
      link event flow.
      
      Since ice_check_module_power() is already doing something very similar
      add a new function ice_check_link_cfg_err() so any failures reported in
      the link info's link_cfg_err member can be printed in this one function.
      
      Also, add the new ICE_FLAG_PHY_FW_LOAD_FAILED bit to the PF's flags so
      we don't constantly print this error message during link polling if the
      value never changed.
      Signed-off-by: NBrett Creeley <brett.creeley@intel.com>
      Tested-by: NSunitha Mekala <sunithax.d.mekala@intel.com>
      Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
      99d40752
  5. 14 10月, 2021 3 次提交
  6. 11 10月, 2021 1 次提交
  7. 29 9月, 2021 1 次提交
  8. 11 6月, 2021 3 次提交
    • J
      ice: add support for set/get of driver-stored firmware parameters · 7f9ab54d
      Jacob Keller 提交于
      Depending on the device configuration, the ice hardware may share the
      PTP hardware clock timer between multiple PFs. Each PF is informed by
      firmware during initialization of the PTP timer association.
      
      When bringing up PTP, only the PFs which own the timer shall allocate
      a PTP hardware clock. Other PFs associated with that timer must report
      the correct PTP clock index in order to allow userspace software the
      ability to know which ports are connected to the same clock.
      
      To support this, the firmware has driver shared parameters. These
      parameters enable one PF to write the clock index into firmware, and
      have other PFs read the associated value out. This enables the driver to
      have only a single PF allocate and control the device timer registers,
      while other PFs associated with that timer can report the correct clock
      in the ETHTOOL_GET_TS_INFO report.
      
      Add support for the necessary admin queue commands to enable reading and
      writing of the driver shared parameters. This will be used in a future
      change to enable sharing the PTP clock index between PF drivers.
      Signed-off-by: NJacob Keller <jacob.e.keller@intel.com>
      Tested-by: NTony Brelinski <tonyx.brelinski@intel.com>
      Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
      7f9ab54d
    • J
      ice: process 1588 PTP capabilities during initialization · 9733cc94
      Jacob Keller 提交于
      The device firmware reports PTP clock capabilities to each PF during
      initialization. This includes various information for both the overall
      device and the individual function, including
      
      For functions:
      * whether this function has timesync enabled
      * whether this function owns one of the 2 possible clock timers, and
        which one
      * which timer the function is associated with
      * the clock frequency, if the device supports multiple clock frequencies
      * The GPIO pin association for the timer owned by this PF, if any
      
      For the device:
      * Which PF owns timer 0, if any
      * Which PF owns timer 1, if any
      * whether timer 0 is enabled
      * whether timer 1 is enabled
      
      Extract the bits from the capabilities information reported by firmware
      and store them in the device and function capability structures.o
      
      This information will be used in a future change to have the function
      driver enable PTP hardware clock support.
      Signed-off-by: NJacob Keller <jacob.e.keller@intel.com>
      Tested-by: NTony Brelinski <tonyx.brelinski@intel.com>
      Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
      9733cc94
    • J
      ice: add support for sideband messages · 8f5ee3c4
      Jacob Keller 提交于
      In order to support certain device features, including enabling the PTP
      hardware clock, the ice driver needs to control some registers on the
      device PHY.
      
      These registers are accessed by sending sideband messages. For some
      hardware, these messages must be sent over the device admin queue, while
      other hardware has a dedicated control queue for the sideband messages.
      
      Add the neighbor device message structure for sending a message to the
      neighboring device. Where supported, initialize the sideband control
      queue and handle cleanup.
      
      Add a wrapper function for sending sideband control queue messages that
      read or write a neighboring device register.
      
      Because some devices send sideband messages over the AdminQ, also
      increase the length of the admin queue to allow more messages to be
      queued up. This is important because the sideband messages add
      additional pressure on the AQ usage.
      
      This support will be used in following patches to enable support for
      CONFIG_1588_PTP_CLOCK.
      Signed-off-by: NJacob Keller <jacob.e.keller@intel.com>
      Tested-by: NTony Brelinski <tonyx.brelinski@intel.com>
      Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
      8f5ee3c4
  9. 07 6月, 2021 1 次提交
  10. 29 5月, 2021 2 次提交
  11. 08 4月, 2021 2 次提交
  12. 01 4月, 2021 2 次提交
  13. 09 2月, 2021 2 次提交
  14. 06 2月, 2021 1 次提交
    • J
      ice: display stored netlist versions via devlink info · e120a9ab
      Jacob Keller 提交于
      Add a function to read the inactive netlist bank for version
      information. To support this, refactor how we read the netlist version
      data. Instead of using the firmware AQ interface with a module ID, read
      from the flash as a flat NVM, using ice_read_flash_module.
      
      This change requires a slight adjustment to the offset values used, as
      reading from the flat NVM includes the type field (which was stripped by
      firmware previously). Cleanup the macro names and move them to
      ice_type.h. For clarity in how we calculate the offsets and so that
      programmers can easily map the offset value to the data sheet, use
      a wrapper macro to account for the offset adjustments.
      
      Use the newly added ice_get_inactive_netlist_ver function to extract the
      version data from the pending netlist module update. Add the stored
      variants of "fw.netlist", and "fw.netlist.build" to the info version map
      array.
      
      With this change, we now report the "fw.netlist" and "fw.netlist.build"
      versions into the stored section of the devlink info report. As with the
      main NVM module versions, if there is no pending update, we report the
      currently active values as stored.
      Signed-off-by: NJacob Keller <jacob.e.keller@intel.com>
      Tested-by: NTony Brelinski <tonyx.brelinski@intel.com>
      Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
      e120a9ab
  15. 26 9月, 2020 1 次提交
    • J
      intel-ethernet: clean up W=1 warnings in kdoc · b50f7bca
      Jesse Brandeburg 提交于
      This takes care of all of the trivial W=1 fixes in the Intel
      Ethernet drivers, which allows developers and maintainers to
      build more of the networking tree with more complete warning
      checks.
      
      There are three classes of kdoc warnings fixed:
       - cannot understand function prototype: 'x'
       - Excess function parameter 'x' description in 'y'
       - Function parameter or member 'x' not described in 'y'
      
      All of the changes were trivial comment updates on
      function headers.
      
      Inspired by Lee Jones' series of wireless work to do the same.
      Compile tested only, and passes simple test of
      $ git ls-files *.[ch] | egrep drivers/net/ethernet/intel | \
        xargs scripts/kernel-doc -none
      Signed-off-by: NJesse Brandeburg <jesse.brandeburg@intel.com>
      Tested-by: NAaron Brown <aaron.f.brown@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b50f7bca
  16. 01 8月, 2020 1 次提交
  17. 29 7月, 2020 3 次提交
  18. 24 7月, 2020 6 次提交
  19. 02 7月, 2020 2 次提交
  20. 31 5月, 2020 2 次提交
  21. 28 5月, 2020 1 次提交
  22. 23 5月, 2020 1 次提交