1. 06 Jul, 2022 20 commits
  2. 05 Jul, 2022 7 commits
  3. 04 Jul, 2022 13 commits
    • Zhang Jiaming's avatar
      net: hns: Fix spelling mistakes in comments. · 874bdbfe
      Zhang Jiaming authored
      Fix spelling of 'waitting' in comments.
      remove unnecessary space of 'MDIO_COMMAND_REG 's'.
      Signed-off-by: default avatarZhang Jiaming <jiaming@nfschina.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      874bdbfe
    • David S. Miller's avatar
      Merge branch 'nfp-vlan-strip-and-insert' · fd4b96c4
      David S. Miller authored
      Simon Horman says:
      
      ====================
      nfp: support VLAN strip and insert
      
      this series adds support to the NFP driver for HW offload of both:
      
      * RX VLAN ctag/stag strip
      * TX VLAN ctag insert
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fd4b96c4
    • Diana Wang's avatar
      nfp: support TX VLAN ctag insert · d80702ff
      Diana Wang authored
      Add support for TX VLAN ctag insert
      which may be configured via ethtool.
      
      e.g.
           # ethtool -K $DEV tx-vlan-offload on
      
      The NIC supplies VLAN insert information as packet metadata.
      The fields of this VLAN metadata are gotten from sk_buff, including
      vlan_proto and vlan tag.
      
      Configuration control bit NFP_NET_CFG_CTRL_TXVLAN_V2 is to
      signal availability of ctag-insert features of the firmware.
      
      NFDK is used to communicate via PCIE to NFP-3800 based NICs
      while NFD3 is used for other NICs supported by the NFP driver.
      The metadata format on tx side of NFD3 is different from NFDK.
      This feature is not currently implemented for NFDK.
      Signed-off-by: default avatarDiana Wang <na.wang@corigine.com>
      Reviewed-by: default avatarLouis Peens <louis.peens@corigine.com>
      Signed-off-by: default avatarSimon Horman <simon.horman@corigine.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d80702ff
    • Diana Wang's avatar
      nfp: support RX VLAN ctag/stag strip · 67d2656b
      Diana Wang authored
      Add support for RX VLAN ctag/stag strip
      which may be configured via ethtool.
      
      e.g.
           # ethtool -K $DEV rx-vlan-offload on
           # ethtool -K $DEV rx-vlan-stag-hw-parse on
      
      Ctag-stripped and stag-stripped cannot be enabled at the same time
      because currently the kernel supports only one layer of VLAN stripping.
      
      The NIC supplies VLAN strip information as packet metadata.
      The fields of this VLAN metadata are:
      
      * strip flag: 1 for stripped; 0 for unstripped
      * tci: VLAN TCI ID
      * tpid: 1 for ETH_P_8021AD; 0 for ETH_P_8021Q
      
      Configuration control bits NFP_NET_CFG_CTRL_RXVLAN_V2 and
      NFP_NET_CFG_CTRL_RXQINQ are to signal availability of
      ctag-strip and stag-strip features of the firmware.
      Signed-off-by: default avatarDiana Wang <na.wang@corigine.com>
      Reviewed-by: default avatarLouis Peens <louis.peens@corigine.com>
      Signed-off-by: default avatarSimon Horman <simon.horman@corigine.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      67d2656b
    • David S. Miller's avatar
      Merge branch 'smsc95xx-deadlock' · 5ee4bba2
      David S. Miller authored
      Lukas Wunner says:
      
      ====================
      Deadlock no more in LAN95xx
      
      Second attempt at fixing a runtime resume deadlock in the LAN95xx USB driver:
      
      In short, the driver isn't using the "nopm" register accessors in portions
      of its runtime resume path, causing a deadlock.  I'm fixing that by
      auto-detecting whether nopm accessors shall be used, instead of
      having to explicitly call them wherever it's necessary.
      As a byproduct, code size shrinks significantly (see diffstat below).
      
      Back in April I submitted a first attempt which was rejected by Alan Stern:
      https://lore.kernel.org/all/6710d8c18ff54139cdc538763ba544187c5a0cee.1651041411.git.lukas@wunner.de/
      
      That approach only detected whether a PM callback is running concurrently,
      not whether the access is performed by the PM callback.  I've come up with
      a different approach which should resolve the objection (see patch [1/3]).
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5ee4bba2
    • Lukas Wunner's avatar
      usbnet: smsc95xx: Clean up unnecessary BUG_ON() upon register access · 03b3df43
      Lukas Wunner authored
      smsc95xx_read_reg() and smsc95xx_write_reg() call BUG_ON() if the
      struct usbnet pointer passed in is NULL.
      
      The functions have just been amended to dereference the pointer on
      entry.  So the kernel now oopses if the pointer is NULL, eliminating
      the need for an explicit BUG_ON().
      Signed-off-by: default avatarLukas Wunner <lukas@wunner.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      03b3df43
    • Lukas Wunner's avatar
      usbnet: smsc95xx: Clean up nopm handling · 31472429
      Lukas Wunner authored
      The LAN95xx driver has just been amended to auto-detect whether the
      _nopm variant of usbnet_read_cmd() / usbnet_write_cmd() shall be used.
      
      Drop all the now unnecessary open coding of that distinction.
      Signed-off-by: default avatarLukas Wunner <lukas@wunner.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      31472429
    • Lukas Wunner's avatar
      usbnet: smsc95xx: Fix deadlock on runtime resume · 7b960c96
      Lukas Wunner authored
      Commit 05b35e7e ("smsc95xx: add phylib support") amended
      smsc95xx_resume() to call phy_init_hw().  That function waits for the
      device to runtime resume even though it is placed in the runtime resume
      path, causing a deadlock.
      
      The problem is that phy_init_hw() calls down to smsc95xx_mdiobus_read(),
      which never uses the _nopm variant of usbnet_read_cmd().
      
      Commit b4df480f ("usbnet: smsc95xx: add reset_resume function with
      reset operation") causes a similar deadlock on resume if the device was
      already runtime suspended when entering system sleep:
      
      That's because the commit introduced smsc95xx_reset_resume(), which
      calls down to smsc95xx_reset(), which neglects to use _nopm accessors.
      
      Fix by auto-detecting whether a device access is performed by the
      suspend/resume task_struct and use the _nopm variant if so.  This works
      because the PM core guarantees that suspend/resume callbacks are run in
      task context.
      
      Stacktrace for posterity:
      
        INFO: task kworker/2:1:49 blocked for more than 122 seconds.
        Workqueue: usb_hub_wq hub_event
        schedule
        rpm_resume
        __pm_runtime_resume
        usb_autopm_get_interface
        usbnet_read_cmd
        __smsc95xx_read_reg
        __smsc95xx_phy_wait_not_busy
        __smsc95xx_mdio_read
        smsc95xx_mdiobus_read
        __mdiobus_read
        mdiobus_read
        smsc_phy_reset
        phy_init_hw
        smsc95xx_resume
        usb_resume_interface
        usb_resume_both
        usb_runtime_resume
        __rpm_callback
        rpm_callback
        rpm_resume
        __pm_runtime_resume
        usb_autoresume_device
        hub_event
        process_one_work
      
      Fixes: b4df480f ("usbnet: smsc95xx: add reset_resume function with reset operation")
      Signed-off-by: default avatarLukas Wunner <lukas@wunner.de>
      Cc: stable@vger.kernel.org # v3.16+
      Cc: Andre Edich <andre.edich@microchip.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7b960c96
    • Kurt Kanzenbach's avatar
      net: phy: broadcom: Add support for BCM53128 internal PHYs · 39bfb3c1
      Kurt Kanzenbach authored
      Add support for BCM53128 internal PHYs. These support interrupts as well as
      statistics. Therefore, enable the Broadcom PHY driver for them.
      
      Tested on BCM53128 switch using the mainline b53 DSA driver.
      Signed-off-by: Kurt Kanzenbach's avatarKurt Kanzenbach <kurt@linutronix.de>
      Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      39bfb3c1
    • Clément Léger's avatar
      dt-bindings: net: dsa: renesas,rzn1-a5psw: add interrupts description · 326569cc
      Clément Léger authored
      Describe the switch interrupts (dlr, switch, prp, hub, pattern) which
      are connected to the GIC.
      Signed-off-by: default avatarClément Léger <clement.leger@bootlin.com>
      Reviewed-by: default avatarRob Herring <robh@kernel.org>
      Reviewed-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      326569cc
    • Casper Andersson's avatar
      selftest: net: bridge mdb add/del entry to port that is down · 0d153dd2
      Casper Andersson authored
      Tests that permanent mdb entries can be added/deleted on ports with state down.
      Signed-off-by: default avatarCasper Andersson <casper.casan@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0d153dd2
    • XueBing Chen's avatar
      net: ipconfig: use strscpy to replace strlcpy · 634b215b
      XueBing Chen authored
      The strlcpy should not be used because it doesn't limit the source
      length. Preferred is strscpy.
      Signed-off-by: default avatarXueBing Chen <chenxuebing@jari.cn>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      634b215b
    • David S. Miller's avatar
      Merge branch 'mlxsw-unified-bridge-conversion-part-6' · 798661c7
      David S. Miller authored
      Ido Schimmel says:
      
      ====================
      mlxsw: Unified bridge conversion - part 6/6
      
      This is the sixth and final part of the conversion of mlxsw to the
      unified bridge model. It transitions the last bits of functionality that
      were under firmware's responsibility in the legacy model to the driver.
      The last patches flip the driver to the unified bridge model and clean
      up code that was used to make the conversion easier to review.
      
      Patchset overview:
      
      Patch #1 sets the egress VID for known unicast packets. For multicast
      packets, the egress VID is configured using the MPE table. See commit
      8c2da081 ("mlxsw: spectrum_fid: Configure egress VID classification
      for multicast").
      
      Patch #2 configures the VNI to FID classification that is used during
      decapsulation.
      
      Patch #3 configures ingress router interface (RIF) in FID classification
      records, so that when a packet reaches the router block, its ingress RIF
      is known. Care is taken to configure this in all the different flows
      (e.g., RIF set on a FID, {Port, VID} joins a FID that already has a RIF
      etc.).
      
      Patch #4 configures the egress VID for routed packets. For such packets,
      the egress VID is not set by the MPE table or by an FDB record at the
      egress bridge, but instead by a dedicated table that maps {Egress RIF,
      Egress port} to a VID.
      
      Patch #5 removes VID configuration from RIF creation as in the unified
      bridge model firmware no longer needs it.
      
      Patch #6 sets the egress FID to use in RIF configuration so that the
      device knows using which FID to bridge the packet after routing.
      
      Patches #7-#9 add a new 802.1Q family and associated VLAN RIFs. In the
      unified bridge model, we no longer need to emulate 802.1Q FIDs using
      802.1D FIDs as VNI can be associated with both.
      
      Patches #10-#11 finally flip the driver to the unified bridge model.
      
      Patches #12-#13 clean up code that was used to make the conversion
      easier to review.
      
      v2:
      * Fix build failure [1] in patch #1.
      
      [1] https://lore.kernel.org/netdev/20220630201709.6e66a1bb@kernel.org/
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      798661c7