1. 24 8月, 2020 1 次提交
  2. 17 5月, 2020 1 次提交
    • D
      net: dsa: mt7530: fix roaming from DSA user ports · 5e5502e0
      DENG Qingfang 提交于
      When a client moves from a DSA user port to a software port in a bridge,
      it cannot reach any other clients that connected to the DSA user ports.
      That is because SA learning on the CPU port is disabled, so the switch
      ignores the client's frames from the CPU port and still thinks it is at
      the user port.
      
      Fix it by enabling SA learning on the CPU port.
      
      To prevent the switch from learning from flooding frames from the CPU
      port, set skb->offload_fwd_mark to 1 for unicast and broadcast frames,
      and let the switch flood them instead of trapping to the CPU port.
      Multicast frames still need to be trapped to the CPU port for snooping,
      so set the SA_DIS bit of the MTK tag to 1 when transmitting those frames
      to disable SA learning.
      
      Fixes: b8f126a8 ("net-next: dsa: add dsa support for Mediatek MT7530 switch")
      Signed-off-by: NDENG Qingfang <dqfext@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5e5502e0
  3. 16 5月, 2020 1 次提交
  4. 14 5月, 2020 1 次提交
    • D
      net: dsa: mt7530: set CPU port to fallback mode · 38152ea3
      DENG Qingfang 提交于
      Currently, setting a bridge's self PVID to other value and deleting
      the default VID 1 renders untagged ports of that VLAN unable to talk to
      the CPU port:
      
      	bridge vlan add dev br0 vid 2 pvid untagged self
      	bridge vlan del dev br0 vid 1 self
      	bridge vlan add dev sw0p0 vid 2 pvid untagged
      	bridge vlan del dev sw0p0 vid 1
      	# br0 cannot send untagged frames out of sw0p0 anymore
      
      That is because the CPU port is set to security mode and its PVID is
      still 1, and untagged frames are dropped due to VLAN member violation.
      
      Set the CPU port to fallback mode so untagged frames can pass through.
      
      Fixes: 83163f7d ("net: dsa: mediatek: add VLAN support for MT7530")
      Signed-off-by: NDENG Qingfang <dqfext@gmail.com>
      Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      38152ea3
  5. 17 4月, 2020 1 次提交
  6. 08 4月, 2020 1 次提交
  7. 04 4月, 2020 1 次提交
  8. 30 3月, 2020 1 次提交
  9. 20 3月, 2020 1 次提交
  10. 10 3月, 2020 1 次提交
  11. 28 2月, 2020 1 次提交
  12. 09 1月, 2020 1 次提交
    • F
      net: dsa: Get information about stacked DSA protocol · 4d776482
      Florian Fainelli 提交于
      It is possible to stack multiple DSA switches in a way that they are not
      part of the tree (disjoint) but the DSA master of a switch is a DSA
      slave of another. When that happens switch drivers may have to know this
      is the case so as to determine whether their tagging protocol has a
      remove chance of working.
      
      This is useful for specific switch drivers such as b53 where devices
      have been known to be stacked in the wild without the Broadcom tag
      protocol supporting that feature. This allows b53 to continue supporting
      those devices by forcing the disabling of Broadcom tags on the outermost
      switches if necessary.
      
      The get_tag_protocol() function is therefore updated to gain an
      additional enum dsa_tag_protocol argument which denotes the current
      tagging protocol used by the DSA master we are attached to, else
      DSA_TAG_PROTO_NONE for the top of the dsa_switch_tree.
      Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4d776482
  13. 05 11月, 2019 1 次提交
    • A
      net: of_get_phy_mode: Change API to solve int/unit warnings · 0c65b2b9
      Andrew Lunn 提交于
      Before this change of_get_phy_mode() returned an enum,
      phy_interface_t. On error, -ENODEV etc, is returned. If the result of
      the function is stored in a variable of type phy_interface_t, and the
      compiler has decided to represent this as an unsigned int, comparision
      with -ENODEV etc, is a signed vs unsigned comparision.
      
      Fix this problem by changing the API. Make the function return an
      error, or 0 on success, and pass a pointer, of type phy_interface_t,
      where the phy mode should be stored.
      
      v2:
      Return with *interface set to PHY_INTERFACE_MODE_NA on error.
      Add error checks to all users of of_get_phy_mode()
      Fixup a few reverse christmas tree errors
      Fixup a few slightly malformed reverse christmas trees
      
      v3:
      Fix 0-day reported errors.
      Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0c65b2b9
  14. 23 10月, 2019 2 次提交
  15. 05 9月, 2019 2 次提交
  16. 21 8月, 2019 1 次提交
    • V
      net: dsa: do not enable or disable non user ports · 74be4bab
      Vivien Didelot 提交于
      The .port_enable and .port_disable operations are currently only
      called for user ports, hence assuming they have a slave device. In
      preparation for using these operations for other port types as well,
      simply guard all implementations against non user ports and return
      directly in such case.
      
      Note that bcm_sf2_sw_suspend() currently calls bcm_sf2_port_disable()
      (and thus b53_disable_port()) against the user and CPU ports, so do
      not guards those functions. They will be called for unused ports in
      the future, but that was expected by those drivers anyway.
      Signed-off-by: NVivien Didelot <vivien.didelot@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      74be4bab
  17. 23 6月, 2019 1 次提交
  18. 31 5月, 2019 1 次提交
  19. 01 5月, 2019 2 次提交
  20. 02 3月, 2019 1 次提交
    • Y
      drivers: net: Remove unnecessary semicolon · f819cd92
      YueHaibing 提交于
      drivers/net/dsa/mt7530.c:649:3-4: Unneeded semicolon
      drivers/net/ethernet/cisco/enic/enic_clsf.c:35:2-3: Unneeded semicolon
      drivers/net/ethernet/faraday/ftgmac100.c:1640:2-3: Unneeded semicolon
      drivers/net/ethernet/mediatek/mtk_eth_soc.c:229:2-3: Unneeded semicolon
      drivers/net/usb/sr9700.c:437:2-3: Unneeded semicolon
      
      Remove unneeded semicolon.
      
      Generated by: scripts/coccinelle/misc/semicolon.cocci
      Signed-off-by: NYueHaibing <yuehaibing@huawei.com>
      Acked-by: Sean Wang <sean.wang@mediatek.com> for mt7530 and mtk_eth_soc
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f819cd92
  21. 25 2月, 2019 1 次提交
  22. 31 1月, 2019 1 次提交
  23. 05 1月, 2019 1 次提交
  24. 12 11月, 2018 1 次提交
  25. 02 10月, 2018 1 次提交
  26. 27 4月, 2018 1 次提交
  27. 04 4月, 2018 1 次提交
  28. 27 3月, 2018 2 次提交
  29. 05 3月, 2018 1 次提交
  30. 15 12月, 2017 1 次提交
    • S
      net: dsa: mediatek: add VLAN support for MT7530 · 83163f7d
      Sean Wang 提交于
      MT7530 can treat each port as either VLAN-unaware port or VLAN-aware port
      through the implementation of port matrix mode or port security mode on
      the ingress port, respectively. On one hand, Each port has been acting as
      the VLAN-unaware one whenever the device is created in the initial or
      certain port joins or leaves into/from the bridge at the runtime. On the
      other hand, the patch just filling the required callbacks for VLAN
      operations is achieved via extending the port to be into port security
      mode when the port is configured as VLAN-aware port. Which mode can make
      the port be able to recognize VID from incoming packets and look up VLAN
      table to validate and judge which port it should be going to. And the
      range for VID from 1 to 4094 is valid for the hardware.
      Signed-off-by: NSean Wang <sean.wang@mediatek.com>
      Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      83163f7d
  31. 13 11月, 2017 1 次提交
  32. 27 10月, 2017 2 次提交
  33. 18 10月, 2017 2 次提交
  34. 04 10月, 2017 1 次提交