1. 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
  2. 07 6月, 2021 1 次提交
  3. 29 5月, 2021 2 次提交
  4. 08 4月, 2021 2 次提交
  5. 01 4月, 2021 2 次提交
  6. 09 2月, 2021 2 次提交
  7. 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
  8. 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
  9. 01 8月, 2020 1 次提交
  10. 29 7月, 2020 3 次提交
  11. 24 7月, 2020 6 次提交
  12. 02 7月, 2020 2 次提交
  13. 31 5月, 2020 2 次提交
  14. 28 5月, 2020 1 次提交
  15. 23 5月, 2020 3 次提交
  16. 22 5月, 2020 2 次提交
  17. 21 3月, 2020 2 次提交
    • J
      ice: discover and store size of available flash · 81f07491
      Jacob Keller 提交于
      When reading from the NVM using a flat address, it is useful to know the
      upper bound on the size of the flash contents. This value is not stored
      within the NVM.
      
      We can determine the size by performing a bisection between upper and
      lower bounds. It is known that the size cannot exceed 16 MB (offset of
      0xFFFFFF).
      
      Use a while loop to bisect the upper and lower bounds by reading one
      byte at a time. On a failed read, lower the maximum bound. On
      a successful read, increase the lower bound.
      
      Save this as the flash_size in the ice_nvm_info structure that contains
      data related to the NVM.
      
      The size will be used in a future patch for implementing full NVM read
      via ethtool's GEEPROM command.
      
      The maximum possible size for the flash is bounded by the size limit for
      the NVM AdminQ commands. Add a new macro, ICE_AQC_NVM_MAX_OFFSET, which
      can be used to represent this upper bound.
      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>
      81f07491
    • J
      ice: create function to read a section of the NVM and Shadow RAM · e9450990
      Jacob Keller 提交于
      The NVM contents are read via firmware by using the ice_aq_read_nvm
      function. This function has a couple of limits:
      
      1) The AdminQ commands can only take buffers sized up to 4Kb. Thus, any
         larger read must be split into multiple reads.
      2) when reading from the Shadow RAM, reads must not cross sector
         boundaries. The sectors are also 4Kb in size.
      
      Implement the ice_read_flat_nvm function to read portions of the NVM by
      flat offset. That is, to read using offsets from the start of the NVM
      rather than from a specific module.
      
      This function will be able to read both from the NVM and from the Shadow
      RAM. For simplicity NVM reads will always be broken up to not cross 4Kb
      page boundaries, even though this is not required unless reading from
      the Shadow RAM.
      
      Use this new function as the implementation of ice_read_sr_word_aq.
      
      The ice_read_sr_buf_aq function is not modified here. This is because
      a following change will remove the only caller of that function in favor
      of directly using ice_read_flat_nvm. Thus, there is little benefit to
      changing it now only to remove it momentarily. At the same time, the
      ice_read_sr_aq function will also be removed.
      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>
      e9450990
  18. 16 2月, 2020 1 次提交
  19. 13 2月, 2020 1 次提交
  20. 26 1月, 2020 2 次提交