1. 24 9月, 2021 9 次提交
  2. 23 9月, 2021 1 次提交
  3. 22 9月, 2021 3 次提交
  4. 19 9月, 2021 1 次提交
  5. 16 9月, 2021 2 次提交
    • D
      mlxbf_gige: clear valid_polarity upon open · ee8a9600
      David Thompson 提交于
      The network interface managed by the mlxbf_gige driver can
      get into a problem state where traffic does not flow.
      In this state, the interface will be up and enabled, but
      will stop processing received packets.  This problem state
      will happen if three specific conditions occur:
          1) driver has received more than (N * RxRingSize) packets but
             less than (N+1 * RxRingSize) packets, where N is an odd number
             Note: the command "ethtool -g <interface>" will display the
             current receive ring size, which currently defaults to 128
          2) the driver's interface was disabled via "ifconfig oob_net0 down"
             during the window described in #1.
          3) the driver's interface is re-enabled via "ifconfig oob_net0 up"
      
      This patch ensures that the driver's "valid_polarity" field is
      cleared during the open() method so that it always matches the
      receive polarity used by hardware.  Without this fix, the driver
      needs to be unloaded and reloaded to correct this problem state.
      
      Fixes: f92e1869 ("Add Mellanox BlueField Gigabit Ethernet driver")
      Reviewed-by: NAsmaa Mnebhi <asmaa@nvidia.com>
      Signed-off-by: NDavid Thompson <davthompson@nvidia.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ee8a9600
    • E
      net/{mlx5|nfp|bnxt}: Remove unnecessary RTNL lock assert · 7c3a0a01
      Eli Cohen 提交于
      Remove the assert from the callback priv lookup function since it does
      not require RTNL lock and is already protected by flow_indr_block_lock.
      
      This will avoid warnings from being emitted to dmesg if the driver
      registers its callback after an ingress qdisc was created for a
      netdevice.
      
      The warnings started after the following patch was merged:
      commit 74fc4f82 ("net: Fix offloading indirect devices dependency on qdisc order creation")
      Signed-off-by: NEli Cohen <elic@nvidia.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7c3a0a01
  6. 15 9月, 2021 11 次提交
    • I
      mlxsw: Add support for transceiver modules reset · 49fd3b64
      Ido Schimmel 提交于
      Implement support for ethtool_ops::reset in order to reset transceiver
      modules. The module backing the netdev is reset when the 'ETH_RESET_PHY'
      flag is set. After a successful reset, the flag is cleared by the driver
      and other flags are ignored. This is in accordance with the interface
      documentation:
      
      "The reset() operation must clear the flags for the components which
      were actually reset. On successful return, the flags indicate the
      components which were not reset, either because they do not exist in the
      hardware or because they cannot be reset independently. The driver must
      never reset any components that were not requested."
      
      Reset is useful in order to allow a module to transition out of a fault
      state. From section 6.3.2.12 in CMIS 5.0: "Except for a power cycle, the
      only exit path from the ModuleFault state is to perform a module reset
      by taking an action that causes the ResetS transition signal to become
      TRUE (see Table 6-11)".
      
      An error is returned when the netdev is administratively up:
      
       # ip link set dev swp11 up
      
       # ethtool --reset swp11 phy
       ETHTOOL_RESET 0x40
       Cannot issue ETHTOOL_RESET: Invalid argument
      
       # ip link set dev swp11 down
      
       # ethtool --reset swp11 phy
       ETHTOOL_RESET 0x40
       Components reset:     0x40
      
      An error is returned when the module is shared by multiple ports (split
      ports) and the "phy-shared" flag is not set:
      
       # devlink port split swp11 count 4
      
       # ethtool --reset swp11s0 phy
       ETHTOOL_RESET 0x40
       Cannot issue ETHTOOL_RESET: Invalid argument
      
       # ethtool --reset swp11s0 phy-shared
       ETHTOOL_RESET 0x400000
       Components reset:     0x400000
      
       # devlink port unsplit swp11s0
      
       # ethtool --reset swp11 phy
       ETHTOOL_RESET 0x40
       Components reset:     0x40
      
      An error is also returned when one of the ports using the module is
      administratively up:
      
       # devlink port split swp11 count 4
      
       # ip link set dev swp11s1 up
      
       # ethtool --reset swp11s0 phy-shared
       ETHTOOL_RESET 0x400000
       Cannot issue ETHTOOL_RESET: Invalid argument
      
       # ip link set dev swp11s1 down
      
       # ethtool --reset swp11s0 phy-shared
       ETHTOOL_RESET 0x400000
       Components reset:     0x400000
      
      Reset is performed by writing to the "rst" bit of the PMAOS register,
      which instructs the firmware to assert the reset signal connected to the
      module for a fixed amount of time.
      Signed-off-by: NIdo Schimmel <idosch@nvidia.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      49fd3b64
    • I
      mlxsw: Make PMAOS pack function more generic · 8f4ebdb0
      Ido Schimmel 提交于
      The PMAOS register has enable bits (e.g., PMAOS.ee) that allow changing
      only a subset of the fields, which is exactly what subsequent patches
      will need to do. Instead of passing multiple arguments to its pack
      function, only pass the module index and let the rest be set by the
      different callers.
      
      No functional changes intended.
      Signed-off-by: NIdo Schimmel <idosch@nvidia.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8f4ebdb0
    • I
      mlxsw: reg: Add fields to PMAOS register · ef23841b
      Ido Schimmel 提交于
      The Ports Module Administrative and Operational Status (PMAOS) register
      configures and retrieves the per-module status. Extend it with fields
      required to support various module settings such as reset and power
      mode.
      Signed-off-by: NIdo Schimmel <idosch@nvidia.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ef23841b
    • I
      mlxsw: Track per-module port status · 896f399b
      Ido Schimmel 提交于
      In the common port module core, track the number of logical ports that
      are mapped to the port module and the number of logical ports using it
      that are administratively up.
      
      This will be used by later patches to potentially veto and control
      certain operations on the module, such as reset and setting its power
      mode.
      Signed-off-by: NIdo Schimmel <idosch@nvidia.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      896f399b
    • I
      mlxsw: spectrum: Do not return an error in mlxsw_sp_port_module_unmap() · 196bff29
      Ido Schimmel 提交于
      The return value is never checked. Allows us to simplify a later patch.
      Signed-off-by: NIdo Schimmel <idosch@nvidia.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      196bff29
    • I
      mlxsw: spectrum: Do not return an error in ndo_stop() · 06277ca2
      Ido Schimmel 提交于
      The return value is not checked by the networking stack. Allows us to
      simplify a later patch.
      Signed-off-by: NIdo Schimmel <idosch@nvidia.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      06277ca2
    • I
      mlxsw: core_env: Convert 'module_info_lock' to a mutex · bd6e43f5
      Ido Schimmel 提交于
      After the previous patch, the lock is always taken in process context so
      it can be converted to a mutex. It is needed for future changes where we
      will need to be able to sleep when holding the lock.
      
      Convert the lock to a mutex.
      Signed-off-by: NIdo Schimmel <idosch@nvidia.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bd6e43f5
    • I
      mlxsw: core_env: Defer handling of module temperature warning events · 163f3d2d
      Ido Schimmel 提交于
      Module temperature events are currently handled in softIRQ context,
      requiring the 'module_info_lock' to be a spin lock. In future patchsets
      we will need to be able to hold the lock while sleeping.
      
      Therefore, defer handling of these events using a work queue so that the
      next patch will be able to convert the lock to a mutex.
      Signed-off-by: NIdo Schimmel <idosch@nvidia.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      163f3d2d
    • I
      mlxsw: core: Remove mlxsw_core_is_initialized() · 25a91f83
      Ido Schimmel 提交于
      After the previous patch, the switch driver is always initialized last,
      making this function redundant.
      
      Remove it.
      Signed-off-by: NIdo Schimmel <idosch@nvidia.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      25a91f83
    • I
      mlxsw: core: Initialize switch driver last · 3d7a6f67
      Ido Schimmel 提交于
      Commit 961cf99a ("mlxsw: core: Re-order initialization sequence")
      changed the initialization sequence so that the switch driver (e.g.,
      mlxsw_spectrum) is initialized before registration with the hwmon and
      thermal subsystems.
      
      This was done in order to avoid situations where hwmon/thermal code uses
      features not supported by current firmware version, which is only
      validated as part of switch driver initialization.
      
      Later, commit b79cb787 ("mlxsw: Move fw flashing code into core.c")
      moved firmware validation and flashing code from the switch driver to
      mlxsw_core so that it is performed before driver initialization.
      
      Therefore, change the initialization sequence back to its original form.
      
      In addition to being more straightforward, it will allow us to simplify
      parts of the code in subsequent patches and future patchsets.
      Signed-off-by: NIdo Schimmel <idosch@nvidia.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3d7a6f67
    • L
      net/mlx5: Publish and unpublish all devlink parameters at once · e9310aed
      Leon Romanovsky 提交于
      The devlink parameters were published in two steps despite being static
      and known in advance.
      
      First step was to use devlink_params_publish() which iterated over all
      known up to that point parameters and sent notification messages.
      In second step, the call was devlink_param_publish() that looped over
      same parameters list and sent notification for new parameters.
      
      In order to simplify the API, move devlink_params_publish() to be called
      when all parameters were already added and save the need to iterate over
      parameters list again.
      
      As a side effect, this change fixes the error unwind flow in which
      parameters were not marked as unpublished.
      
      Fixes: 82e6c96f ("net/mlx5: Register to devlink ingress VLAN filter trap")
      Signed-off-by: NLeon Romanovsky <leonro@nvidia.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e9310aed
  7. 14 9月, 2021 8 次提交
  8. 08 9月, 2021 5 次提交