1. 11 6月, 2021 4 次提交
    • J
      ice: register 1588 PTP clock device object for E810 devices · 06c16d89
      Jacob Keller 提交于
      Add a new ice_ptp.c file for holding the basic PTP clock interface
      functions. If the device supports PTP, call the new ice_ptp_init and
      ice_ptp_release functions where appropriate.
      
      If the function owns the hardware resource associated with the PTP
      hardware clock, register with the PTP_1588_CLOCK infrastructure to
      allocate a new clock object that represents the device hardware clock.
      
      Implement basic functionality for reading and setting the clock time,
      performing clock adjustments, and adjusting the clock frequency.
      
      Future changes will introduce functionality for handling related
      features including Tx and Rx timestamps.
      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>
      06c16d89
    • 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 4 次提交
  5. 01 4月, 2021 2 次提交
  6. 30 3月, 2021 1 次提交
  7. 24 3月, 2021 1 次提交
  8. 09 2月, 2021 4 次提交
  9. 06 2月, 2021 1 次提交
  10. 10 12月, 2020 3 次提交
  11. 30 9月, 2020 1 次提交
    • J
      ice: preserve NVM capabilities in safe mode · be49b1ad
      Jacob Keller 提交于
      If the driver initializes in safe mode, it will call
      ice_set_safe_mode_caps. This results in clearing the capabilities
      structures, in order to set them up for operating in safe mode, ensuring
      many features are disabled.
      
      This has a side effect of also clearing the capability bits that relate
      to NVM update. The result is that the device driver will not indicate
      support for unified update, even if the firmware is capable.
      
      Fix this by adding the relevant capability fields to the list of values
      we preserve. To simplify the code, use a common_cap structure instead of
      a handful of local variables. To reduce some duplication of the
      capability name, introduce a couple of macros used to restore the
      capabilities values from the cached copy.
      
      Fixes: de9b277e ("ice: Add support for unified NVM update flow capability")
      Signed-off-by: NJacob Keller <jacob.e.keller@intel.com>
      Tested-by: NBrijesh Behera <brijeshx.behera@intel.com>
      Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
      be49b1ad
  12. 01 8月, 2020 2 次提交
  13. 29 7月, 2020 6 次提交
    • B
      ice: disable no longer needed workaround for FW logging · 7dfff9ff
      Ben Shelton 提交于
      For the FW logging info AQ command, we currently set the ICE_AQ_FLAG_RD
      in order to work around a FW issue. This issue has been fixed so remove the
      workaround.
      Signed-off-by: NBen Shelton <benjamin.h.shelton@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
      7dfff9ff
    • T
      ice: Adjust scheduler default BW weight · 984824a2
      Tarun Singh 提交于
      By default the queues are configured in legacy mode. The default
      BW settings for legacy/advanced modes are different. The existing
      code was using the advanced mode default value of 1 which was
      incorrect. This caused the unbalanced BW sharing among siblings.
      The recommended default value is applied.
      Signed-off-by: NTarun Singh <tarun.k.singh@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
      984824a2
    • D
      ice: Implement LFC workaround · 7d9c9b79
      Dave Ertman 提交于
      There is a bug where the LFC settings are not being preserved
      through a link event.  The registers in question are the ones
      that are touched (and restored) when a set_local_mib AQ command
      is performed.
      
      On a link-up event, make sure that a set_local_mib is being
      performed.
      
      Move the function ice_aq_set_lldp_mib() from the DCB specific
      ice_dcb.c to ice_common.c so that the driver always has access
      to this AQ command.
      Signed-off-by: NDave Ertman <david.m.ertman@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
      7d9c9b79
    • J
      ice: implement device flash update via devlink · d69ea414
      Jacob Keller 提交于
      Use the newly added pldmfw library to implement device flash update for
      the Intel ice networking device driver. This support uses the devlink
      flash update interface.
      
      The main parts of the flash include the Option ROM, the netlist module,
      and the main NVM data. The PLDM firmware file contains modules for each
      of these components.
      
      Using the pldmfw library, the provided firmware file will be scanned for
      the three major components, "fw.undi" for the Option ROM, "fw.mgmt" for
      the main NVM module containing the primary device firmware, and
      "fw.netlist" containing the netlist module.
      
      The flash is separated into two banks, the active bank containing the
      running firmware, and the inactive bank which we use for update. Each
      module is updated in a staged process. First, the inactive bank is
      erased, preparing the device for update. Second, the contents of the
      component are copied to the inactive portion of the flash. After all
      components are updated, the driver signals the device to switch the
      active bank during the next EMP reset (which would usually occur during
      the next reboot).
      
      Although the firmware AdminQ interface does report an immediate status
      for each command, the NVM erase and NVM write commands receive status
      asynchronously. The driver must not continue writing until previous
      erase and write commands have finished. The real status of the NVM
      commands is returned over the receive AdminQ. Implement a simple
      interface that uses a wait queue so that the main update thread can
      sleep until the completion status is reported by firmware. For erasing
      the inactive banks, this can take quite a while in practice.
      
      To help visualize the process to the devlink application and other
      applications based on the devlink netlink interface, status is reported
      via the devlink_flash_update_status_notify. While we do report status
      after each 4k block when writing, there is no real status we can report
      during erasing. We simply must wait for the complete module erasure to
      finish.
      
      With this implementation, basic flash update for the ice hardware is
      supported.
      Signed-off-by: NJacob Keller <jacob.e.keller@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d69ea414
    • J
      ice: add flags indicating pending update of firmware module · 2ab560a7
      Jacob Keller 提交于
      After a flash update, the pending status of the update can be determined
      from the device capabilities.
      
      Read the appropriate device capability and store whether there is
      a pending update awaiting a reboot.
      Signed-off-by: NJacob Keller <jacob.e.keller@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2ab560a7
    • J
      ice: Add support for unified NVM update flow capability · de9b277e
      Jacek Naczyk 提交于
      Extends function parsing response from Discover Device
      Capability AQC to check if the device supports unified NVM update flow.
      Signed-off-by: NJacek Naczyk <jacek.naczyk@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      de9b277e
  14. 24 7月, 2020 8 次提交