Skip to content
  1. Nov 21, 2019
  2. Nov 20, 2019
    • Rahul Lakkireddy's avatar
      cxgb4: remove unneeded semicolon for switch block · 272630fe
      Rahul Lakkireddy authored
      Semicolon is not required at the end of switch block. So, remove it.
      
      Addresses coccinelle warning:
      drivers/net/ethernet/chelsio/cxgb4/sge.c:2260:2-3: Unneeded semicolon
      
      Fixes: 4846d533
      
       ("cxgb4: add Tx and Rx path for ETHOFLD traffic")
      Reported-by: default avatarkbuild test robot <lkp@intel.com>
      Signed-off-by: default avatarRahul Lakkireddy <rahul.lakkireddy@chelsio.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      272630fe
    • Vladimir Oltean's avatar
      net: dsa: felix: Fix CPU port assignment when not last port · b8fc7177
      Vladimir Oltean authored
      On the NXP LS1028A, there are 2 Ethernet links between the Felix switch
      and the ENETC:
      - eno2 <-> swp4, at 2.5G
      - eno3 <-> swp5, at 1G
      
      Only one of the above Ethernet port pairs can act as a DSA link for
      tagging.
      
      When adding initial support for the driver, it was tested only on the 1G
      eno3 <-> swp5 interface, due to the necessity of using PHYLIB initially
      (which treats fixed-link interfaces as emulated C22 PHYs, so it doesn't
      support fixed-link speeds higher than 1G).
      
      After making PHYLINK work, it appears that swp4 still can't act as CPU
      port. So it looks like ocelot_set_cpu_port was being called for swp4,
      but then it was called again for swp5, overwriting the CPU port assigned
      in the DT.
      
      It appears that when you call dsa_upstream_port for a port that is not
      defined in the device tree (such as swp5 when using swp4 as CPU port),
      its dp->cpu_dp pointer is not initialized by dsa_tree_setup_default_cpu,
      and this trips up the following condition in dsa_upstream_port:
      
      	if (!cpu_dp)
      		return port;
      
      So the moral of the story is: don't call dsa_upstream_port for a port
      that is not defined in the device tree, and therefore its dsa_port
      structure is not completely initialized (ds->num_ports is still 6).
      
      Fixes: 56051948
      
       ("net: dsa: ocelot: add driver for Felix switch family")
      Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b8fc7177
  3. Nov 19, 2019