1. 21 8月, 2019 4 次提交
  2. 17 8月, 2019 1 次提交
    • M
      net: dsa: mv88e6xxx: check for mode change in port_setup_mac · 927441ad
      Marek Behún 提交于
      The mv88e6xxx_port_setup_mac checks if the requested MAC settings are
      different from the current ones, and if not, does nothing (since chaning
      them requires putting the link down).
      
      In this check it only looks if the triplet [link, speed, duplex] is
      being changed.
      
      This patch adds support to also check if the mode parameter (of type
      phy_interface_t) is requested to be changed. The current mode is
      computed by the ->port_link_state() method, and if it is different from
      PHY_INTERFACE_MODE_NA, we check for equality with the requested mode.
      
      In the implementations of the mv88e6250_port_link_state() method we set
      the current mode to PHY_INTERFACE_MODE_NA - so the code does not check
      for mode change on 6250.
      
      In the mv88e6352_port_link_state() method, we use the cached cmode of
      the port to determine the mode as phy_interface_t (and if it is not
      enough, eg. for RGMII, we also look at the port control register for
      RX/TX timings).
      Signed-off-by: NMarek Behún <marek.behun@nic.cz>
      Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      927441ad
  3. 12 8月, 2019 3 次提交
  4. 06 8月, 2019 1 次提交
  5. 03 8月, 2019 4 次提交
  6. 02 8月, 2019 5 次提交
  7. 31 7月, 2019 1 次提交
  8. 30 7月, 2019 1 次提交
    • R
      net: dsa: mv88e6xxx: avoid some redundant vtu load/purge operations · 1cb9dfca
      Rasmus Villemoes 提交于
      We have an ERPS (Ethernet Ring Protection Switching) setup involving
      mv88e6250 switches which we're in the process of switching to a BSP
      based on the mainline driver. Breaking any link in the ring works as
      expected, with the ring reconfiguring itself quickly and traffic
      continuing with almost no noticable drops. However, when plugging back
      the cable, we see 5+ second stalls.
      
      This has been tracked down to the userspace application in charge of
      the protocol missing a few CCM messages on the good link (the one that
      was not unplugged), causing it to broadcast a "signal fail". That
      message eventually reaches its link partner, which responds by
      blocking the port. Meanwhile, the first node has continued to block
      the port with the just plugged-in cable, breaking the network. And the
      reason for those missing CCM messages has in turn been tracked down to
      the VTU apparently being too busy servicing load/purge operations that
      the normal lookups are delayed.
      
      Initial state, the link between C and D is blocked in software.
      
           _____________________
          /                     \
         |                       |
         A ----- B ----- C *---- D
      
      Unplug the cable between C and D.
      
           _____________________
          /                     \
         |                       |
         A ----- B ----- C *   * D
      
      Reestablish the link between C and D.
           _____________________
          /                     \
         |                       |
         A ----- B ----- C *---- D
      
      Somehow, enough VTU/ATU operations happen inside C that prevents
      the application from receving the CCM messages from B in a timely
      manner, so a Signal Fail message is sent by C. When B receives
      that, it responds by blocking its port.
      
           _____________________
          /                     \
         |                       |
         A ----- B *---* C *---- D
      
      Very shortly after this, the signal fail condition clears on the
      BC link (some CCM messages finally make it through), so C
      unblocks the port. However, a guard timer inside B prevents it
      from removing the blocking before 5 seconds have elapsed.
      
      It is not unlikely that our userspace ERPS implementation could be
      smarter and/or is simply buggy. However, this patch fixes the symptoms
      we see, and is a small optimization that should not break anything
      (knock wood). The idea is simply to avoid doing an VTU load of an
      entry identical to the one already present. To do that, we need to
      know whether mv88e6xxx_vtu_get() actually found an existing entry, or
      has just prepared a struct mv88e6xxx_vtu_entry for us to load. To that
      end, let vlan->valid be an output parameter. The other two callers of
      mv88e6xxx_vtu_get() are not affected by this patch since they pass
      new=false.
      Signed-off-by: NRasmus Villemoes <rasmus.villemoes@prevas.dk>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1cb9dfca
  9. 24 7月, 2019 1 次提交
  10. 30 6月, 2019 1 次提交
  11. 24 6月, 2019 1 次提交
  12. 16 6月, 2019 2 次提交
  13. 13 6月, 2019 1 次提交
  14. 05 6月, 2019 1 次提交
    • R
      net: dsa: mv88e6xxx: add support for mv88e6250 · 1f71836f
      Rasmus Villemoes 提交于
      This adds support for the Marvell 88E6250. I've checked that each
      member in the ops-structure makes sense, and basic switchdev
      functionality works fine.
      
      It uses the new dual_chip option, and since its port registers start
      at SMI address 0x08 or 0x18 (i.e., always sw_addr + 0x08), we need to
      introduce a new compatible string in order for the auto-identification
      in mv88e6xxx_detect() to work.
      
      The chip has four per port 16-bits statistics registers, two of which
      correspond to the existing "sw_in_filtered" and "sw_out_filtered" (but
      at offsets 0x13 and 0x10 rather than 0x12 and 0x13, because why should
      this be easy...). Wiring up those four statistics seems to require
      introducing a STATS_TYPE_PORT_6250 bit or similar, which seems a tad
      ugly, so for now this just allows access to the STATS_TYPE_BANK0 ones.
      
      The chip does have ptp support, and the existing
      mv88e6352_{gpio,avb,ptp}_ops at first glance seem like they would work
      out-of-the-box, but for simplicity (and lack of testing) I'm eliding
      this.
      Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NRasmus Villemoes <rasmus.villemoes@prevas.dk>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1f71836f
  15. 03 6月, 2019 1 次提交
  16. 31 5月, 2019 2 次提交
  17. 06 5月, 2019 1 次提交
  18. 04 5月, 2019 3 次提交
  19. 28 4月, 2019 1 次提交
  20. 20 4月, 2019 1 次提交
  21. 28 3月, 2019 1 次提交
  22. 09 3月, 2019 1 次提交
  23. 05 3月, 2019 2 次提交