Skip to content
Snippets Groups Projects
  1. Aug 19, 2022
  2. Aug 17, 2022
  3. Jun 07, 2022
    • Ioana Ciornei's avatar
      dpaa2-eth: increase busy retries when interracting with QBMAN · fa6c3168
      Ioana Ciornei authored
      
      It seems that there are circumstances when access to QBMAN through the
      software portals will be delayed. Accessing some lower speeds interfaces
      while also QBMAN commands are issued from the kernel will lead to
      software timeouts happening in the dpaa2-eth driver.
      
      What we have observed is that management commands like re-arming the
      interrupts on a specific channel, waiting for a dequeue response to be
      available etc, will take a longer time to complete.
      All these commands have to wait for a valid bit to be set for the
      command to be interpreted as successfully completed.
      
      Increase the maximum number of times the Linux kernel drivers will busy
      poll for a successful result of one of these commands.
      
      Signed-off-by: default avatarIoana Ciornei <ioana.ciornei@nxp.com>
      fa6c3168
  4. Jun 06, 2022
    • Ioana Ciornei's avatar
      arm64: lsdk.config: enable CONFIG_SFP and LYNX 28G SerDes PHY · ccd72abc
      Ioana Ciornei authored
      
      Enable CONFIG_SFP for the Linux SFP infrastructure. Also, enable the
      Lynx 28G SerDes PHY driver which supports runtime reconfiguration of
      SerDes lanes.
      
      Signed-off-by: default avatarIoana Ciornei <ioana.ciornei@nxp.com>
      ccd72abc
    • Ioana Ciornei's avatar
      net: phylink: treat PHY_INTERFACE_MODE_2500SGMII in phylink_get_linkmodes · e4c8a0d1
      Ioana Ciornei authored
      
      There is a downstream patch which adds a new interface type -
      PHY_INTERFACE_MODE_2500SGMII (which is really the same one as
      PHY_INTERFACE_MODE_2500BASEX).
      
      We backported from upstream the following phylink patch which, of
      course, does not treat the PHY_INTERFACE_MODE_2500SGMII interface mode
      in a switch case statement.
      	34ae2c09 ("net: phylink: add generic validate implementation")
      
      Because of this, we get the following build warning.
      
      drivers/net/phy/phylink.c: In function ‘phylink_get_linkmodes’:
      drivers/net/phy/phylink.c:322:2: warning: enumeration value ‘PHY_INTERFACE_MODE_2500SGMII’ not handled in switch [-Wswitch]
        322 |  switch (interface) {
            |  ^~~~~~
      
      Fix it by treating the new interface mode in the switch-case statement.
      
      Signed-off-by: default avatarIoana Ciornei <ioana.ciornei@nxp.com>
      e4c8a0d1
  5. Jun 02, 2022
    • Camelia Groza's avatar
      Revert "ptp: ptp_qoriq: add ACPI probe support" · 6951b6e6
      Camelia Groza authored
      
      This reverts commit 6809b4d8.
      
      The patch causes kernel crashes on DPAA2. Revert the changes and
      reimplement at a later time.
      
      Signed-off-by: default avatarCamelia Groza <camelia.groza@nxp.com>
      6951b6e6
    • Vladimir Oltean's avatar
      net: mscc: ocelot: mark traps with a bool instead of keeping them in a list · 041a4f44
      Vladimir Oltean authored
      Since the blamed commit, VCAP filters can appear on more than one list.
      If their action is "trap", they are chained on ocelot->traps via
      filter->trap_list. This is in addition to their normal placement on the
      VCAP block->rules list head.
      
      Therefore, when we free a VCAP filter, we must remove it from all lists
      it is a member of, including ocelot->traps.
      
      There are at least 2 bugs which are direct consequences of this design
      decision.
      
      First is the incorrect usage of list_empty(), meant to denote whether
      "filter" is chained into ocelot->traps via filter->trap_list.
      This does not do the correct thing, because list_empty() checks whether
      "head->next == head", but in our case, head->next == head->prev == NULL.
      So we dereference NULL pointers and die when we call list_del().
      
      Second is the fact that not all places that should remove the filter
      from ocelot->traps do so. One example is ocelot_vcap_block_remove_filter(),
      which is where we have the main kfree(filter). By keeping freed filters
      in ocelot->traps we end up in a use-after-free in
      felix_update_trapping_destinations().
      
      Attempting to fix all the buggy patterns is a whack-a-mole game which
      makes the driver unmaintainable. Actually this is what the previous
      patch version attempted to do:
      https://patchwork.kernel.org/project/netdevbpf/patch/20220503115728.834457-3-vladimir.oltean@nxp.com/
      
      
      
      but it introduced another set of bugs, because there are other places in
      which create VCAP filters, not just ocelot_vcap_filter_create():
      
      - ocelot_trap_add()
      - felix_tag_8021q_vlan_add_rx()
      - felix_tag_8021q_vlan_add_tx()
      
      Relying on the convention that all those code paths must call
      INIT_LIST_HEAD(&filter->trap_list) is not going to scale.
      
      So let's do what should have been done in the first place and keep a
      bool in struct ocelot_vcap_filter which denotes whether we are looking
      at a trapping rule or not. Iterating now happens over the main VCAP IS2
      block->rules. The advantage is that we no longer risk having stale
      references to a freed filter, since it is only present in that list.
      
      Fixes: e42bd4ed ("net: mscc: ocelot: keep traps in a list")
      Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      (cherry picked from commit e1846cff)
      Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      041a4f44
Loading