1. 10 9月, 2020 1 次提交
  2. 24 8月, 2020 1 次提交
  3. 22 7月, 2020 1 次提交
    • H
      net: dsa: microchip: call phy_remove_link_mode during probe · 3506b2f4
      Helmut Grohne 提交于
      When doing "ip link set dev ... up" for a ksz9477 backed link,
      ksz9477_phy_setup is called and it calls phy_remove_link_mode to remove
      1000baseT HDX. During phy_remove_link_mode, phy_advertise_supported is
      called. Doing so reverts any previous change to advertised link modes
      e.g. using a udevd .link file.
      
      phy_remove_link_mode is not meant to be used while opening a link and
      should be called during phy probe when the link is not yet available to
      userspace.
      
      Therefore move the phy_remove_link_mode calls into
      ksz9477_switch_register. It indirectly calls dsa_register_switch, which
      creates the relevant struct phy_devices and we update the link modes
      right after that. At that time dev->features is already initialized by
      ksz9477_switch_detect.
      
      Remove phy_setup from ksz_dev_ops as no users remain.
      
      Link: https://lore.kernel.org/netdev/20200715192722.GD1256692@lunn.ch/
      Fixes: 42fc6a4c ("net: dsa: microchip: prepare PHY for proper advertisement")
      Signed-off-by: NHelmut Grohne <helmut.grohne@intenta.de>
      Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3506b2f4
  4. 05 7月, 2020 2 次提交
  5. 03 7月, 2020 1 次提交
  6. 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
  7. 12 9月, 2019 1 次提交
  8. 07 8月, 2019 1 次提交
  9. 28 6月, 2019 8 次提交
  10. 15 6月, 2019 2 次提交
  11. 04 4月, 2019 1 次提交
    • G
      net: dsa: microchip: mark expected switch fall-through · 0fd12842
      Gustavo A. R. Silva 提交于
      In preparation to enabling -Wimplicit-fallthrough, mark switch cases
      where we are expecting to fall through.
      
      This patch fixes the following warning:
      
      drivers/net/dsa/microchip/ksz9477.c: In function ‘ksz9477_get_interface’:
      drivers/net/dsa/microchip/ksz9477.c:1145:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
         if (gbit)
            ^
      drivers/net/dsa/microchip/ksz9477.c:1147:2: note: here
        case 0:
        ^~~~
      
      Warning level 3 was used: -Wimplicit-fallthrough=3
      
      This patch is part of the ongoing efforts to enable
      -Wimplicit-fallthrough.
      Signed-off-by: NGustavo A. R. Silva <gustavo@embeddedor.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0fd12842
  12. 04 3月, 2019 1 次提交
  13. 25 2月, 2019 5 次提交
  14. 12 2月, 2019 1 次提交
  15. 21 12月, 2018 1 次提交
    • T
      net: dsa: microchip: fix unicast frame leak · 962ad710
      Tristram Ha 提交于
      Port partitioning is done by enabling UNICAST_VLAN_BOUNDARY and changing
      the default port membership of 0x7f to other values such that there is
      no communication between ports.  In KSZ9477 the member for port 1 is
      0x41; port 2, 0x42; port 3, 0x44; port 4, 0x48; port 5, 0x50; and port 7,
      0x60.  Port 6 is the host port.
      
      Setting a zero value can be used to stop port from receiving.
      
      However, when UNICAST_VLAN_BOUNDARY is disabled and the unicast addresses
      are already learned in the dynamic MAC table, setting zero still allows
      devices connected to those ports to communicate.  This does not apply to
      multicast and broadcast addresses though.  To prevent these leaks and
      make the function of port membership consistent UNICAST_VLAN_BOUNDARY
      should never be disabled.
      
      Note that UNICAST_VLAN_BOUNDARY is enabled by default in KSZ9477.
      
      Fixes: b987e98e ("dsa: add DSA switch driver for Microchip KSZ9477")
      Signed-off-by: NTristram Ha <Tristram.Ha@microchip.com>
      Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      962ad710
  16. 17 12月, 2018 1 次提交
  17. 21 11月, 2018 5 次提交
  18. 03 11月, 2018 1 次提交
  19. 17 8月, 2018 1 次提交
  20. 27 4月, 2018 1 次提交
  21. 05 3月, 2018 1 次提交
  22. 03 12月, 2017 2 次提交