1. 28 Feb, 2024 7 commits
  2. 27 Feb, 2024 26 commits
  3. 26 Feb, 2024 7 commits
    • David S. Miller's avatar
      Merge branch 'pcs-xpcs-cleanups' · 25d43425
      David S. Miller authored
      Serge Semin says:
      
      ====================
      net: pcs: xpcs: Cleanups before adding MMIO dev support
      
      As stated in the subject this series is a short prequel before submitting
      the main patches adding the memory-mapped DW XPCS support to the DW XPCS
      and DW *MAC (STMMAC) drivers. Originally it was a part of the bigger
      patchset (see the changelog v2 link below) but was detached to a
      preparation set to shrink down the main series thus simplifying it'
      review.
      
      The patchset' content is straightforward: drop the redundant sentinel
      entry and the header files; return EINVAL errno from the soft-reset method
      and make sure that the interface validation method return EINVAL straight
      away if the requested interface isn't supported by the XPCS device
      instance. All of these changes are required to simplify the changes being
      introduced a bit later in the framework of the memory-mapped DW XPCS
      support patches.
      
      Link: https://lore.kernel.org/netdev/20231205103559.9605-1-fancer.lancer@gmail.com
      Changelog v2:
      - Move the preparation patches to a separate series.
      - Simplify the commit messages (@Russell, @Vladimir).
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      25d43425
    • Serge Semin's avatar
      net: pcs: xpcs: Explicitly return error on caps validation · 361dd531
      Serge Semin authored
      If an unsupported interface is passed to the PCS validation callback there
      is no need in further link-modes calculations since the resultant array
      will be initialized with zeros which will be perceived by the phylink
      subsystem as error anyway (see phylink_validate_mac_and_pcs()). Instead
      let's explicitly return the -EINVAL error to inform the caller about the
      unsupported interface as it's done in the rest of the pcs_validate
      callbacks.
      Signed-off-by: default avatarSerge Semin <fancer.lancer@gmail.com>
      Reviewed-by: default avatarMaxime Chevallier <maxime.chevallier@bootlin.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      361dd531
    • Serge Semin's avatar
      net: pcs: xpcs: Return EINVAL in the internal methods · f5151005
      Serge Semin authored
      In particular the xpcs_soft_reset() and xpcs_do_config() functions
      currently return -1 if invalid auto-negotiation mode is specified. That
      value might be then passed to the generic kernel subsystems which require
      a standard kernel errno value. Even though the erroneous conditions are
      very specific (memory corruption or buggy driver implementation) using a
      hard-coded -1 literal doesn't seem correct anyway especially when it comes
      to passing it higher to the network subsystem or printing to the system
      log.  Convert the hard-coded error values to -EINVAL then.
      Signed-off-by: default avatarSerge Semin <fancer.lancer@gmail.com>
      Tested-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f5151005
    • Serge Semin's avatar
      net: pcs: xpcs: Drop redundant workqueue.h include directive · e26802eb
      Serge Semin authored
      There is nothing CM workqueue-related in the driver. So the respective
      include directive can be dropped.
      
      While at it add an empty line delimiter between the generic and local path
      include directives to visually separate them.
      Signed-off-by: default avatarSerge Semin <fancer.lancer@gmail.com>
      Tested-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e26802eb
    • Serge Semin's avatar
      net: pcs: xpcs: Drop sentinel entry from 2500basex ifaces list · 0ffc3292
      Serge Semin authored
      There are currently only two methods (xpcs_find_compat() and
      xpcs_get_interfaces()) defined in the driver which loop over the available
      interfaces. All of them rely on the xpcs_compat::num_interfaces field
      value to get the total number of supported interfaces. Thus the interface
      arrays are supposed to be filled with actual interface IDs and there is no
      need in the dummy terminating ID placed at the end of the arrays.
      
      Based on the above drop the PHY_INTERFACE_MODE_MAX entry from the
      xpcs_2500basex_interfaces array and the PHY_INTERFACE_MODE_MAX-based
      conditional statement from the xpcs_get_interfaces() method as redundant.
      Signed-off-by: default avatarSerge Semin <fancer.lancer@gmail.com>
      Reviewed-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0ffc3292
    • David S. Miller's avatar
      Merge branch 'rtnetlink-reduce-rtnl-pressure' · 5fc3903c
      David S. Miller authored
      Eric Dumazet says:
      
      ====================
      rtnetlink: reduce RTNL pressure for dumps
      
      This series restarts the conversion of rtnl dump operations
      to RCU protection, instead of requiring RTNL.
      
      In this new attempt (prior one failed in 2011), I chose to
      allow a gradual conversion of selected operations.
      
      After this series, "ip -6 addr" and "ip -4 ro" no longer
      need to acquire RTNL.
      
      I refrained from changing inet_dump_ifaddr() and inet6_dump_addr()
      to avoid merge conflicts because of two fixes in net tree.
      
      I also started the work for "ip link" future conversion.
      
      v2: rtnl_fill_link_ifmap() always emit IFLA_MAP (Jiri Pirko)
          Added "nexthop: allow nexthop_mpath_fill_node()
                 to be called without RTNL" to avoid a lockdep splat (Ido Schimmel)
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5fc3903c
    • Eric Dumazet's avatar
      rtnetlink: provide RCU protection to rtnl_fill_prop_list() · 0ec4e48c
      Eric Dumazet authored
      We want to be able to run rtnl_fill_ifinfo() under RCU protection
      instead of RTNL in the future.
      
      dev->name_node items are already rcu protected.
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Reviewed-by: default avatarDonald Hunter <donald.hunter@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0ec4e48c