1. 29 7月, 2020 9 次提交
    • J
      net: stmmac: Remove WAKE_MAGIC if HW shows no pmt_magic_frame · 1057d685
      Jisheng Zhang 提交于
      Remove WAKE_MAGIC from supported modes if the HW capability register
      shows no support for pmt_magic_frame.
      Signed-off-by: NJisheng Zhang <Jisheng.Zhang@synaptics.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1057d685
    • L
      hinic: add log in exception handling processes · 90f86b8a
      Luo bin 提交于
      improve the error message when functions return failure and dump
      relevant registers in some exception handling processes
      Signed-off-by: NLuo bin <luobin9@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      90f86b8a
    • L
      hinic: add support to handle hw abnormal event · c15850c7
      Luo bin 提交于
      add support to handle hw abnormal event such as hardware failure,
      cable unplugged,link error
      Signed-off-by: NLuo bin <luobin9@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c15850c7
    • 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
    • C
      ice: Add AdminQ commands for FW update · 544cd2ac
      Cudzilo, Szymon T 提交于
      Add structures, identifiers, and helper functions for several AdminQ
      commands related to performing a firmware update for the ice hardware.
      These will be used in future code for implementing the devlink
      .flash_update handler.
      Signed-off-by: NCudzilo, Szymon T <szymon.t.cudzilo@intel.com>
      Signed-off-by: NJacob Keller <jacob.e.keller@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      544cd2ac
    • 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
    • V
      mlxsw: core: Add support for temperature thresholds reading for QSFP-DD transceivers · f152b41b
      Vadim Pasternak 提交于
      Allow QSFP-DD transceivers temperature thresholds reading for hardware
      monitoring and thermal control.
      
      For this type, the thresholds are located in page 02h according to the
      "Module and Lane Thresholds" description from Common Management
      Interface Specification.
      Signed-off-by: NVadim Pasternak <vadimp@mellanox.com>
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f152b41b
    • V
      mlxsw: core: Add ethtool support for QSFP-DD transceivers · 6af496ad
      Vadim Pasternak 提交于
      The Quad Small Form Factor Pluggable Double Density (QSFP-DD) hardware
      specification defines a form factor that supports up to 400 Gbps in
      aggregate over an 8x50-Gbps electrical interface. The QSFP-DD supports
      both optical and copper interfaces.
      
      Implementation is based on Common Management Interface Specification;
      Rev 4.0 May 8, 2019. Table 8-2 "Identifier and Status Summary (Lower
      Page)" from this spec defines "Id and Status" fields located at offsets
      00h - 02h. Bit 2 at offset 02h ("Flat_mem") specifies QSFP EEPROM memory
      mode, which could be "upper memory flat" or "paged". Flat memory mode is
      coded "1", and indicates that only page 00h is implemented in EEPROM.
      Paged memory is coded "0" and indicates that pages 00h, 01h, 02h, 10h
      and 11h are implemented. Pages 10h and 11h are currently not supported
      by the driver.
      
      "Flat" memory mode is used for the passive copper transceivers. For this
      type only page 00h (256 bytes) is available. "Paged" memory is used for
      the optical transceivers. For this type pages 00h (256 bytes), 01h (128
      bytes) and 02h (128 bytes) are available. Upper page 01h contains static
      advertising field, while upper page 02h contains the module-defined
      thresholds and lane-specific monitors.
      
      Extend enumerator 'mlxsw_reg_mcia_eeprom_module_info_id' with additional
      field 'MLXSW_REG_MCIA_EEPROM_MODULE_INFO_TYPE_ID'. This field is used to
      indicate for QSFP-DD transceiver type which memory mode is to be used.
      
      Expose 256 bytes buffer for QSFP-DD passive copper transceiver and
      512 bytes buffer for optical.
      Signed-off-by: NVadim Pasternak <vadimp@mellanox.com>
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6af496ad
  2. 28 7月, 2020 31 次提交