1. 29 Aug, 2016 15 commits
  2. 27 Aug, 2016 19 commits
  3. 26 Aug, 2016 6 commits
    • David S. Miller's avatar
      Merge branch 'bcm_sf2-utilize-b53_common' · a29ca894
      David S. Miller authored
      Florian Fainelli says:
      
      ====================
      net: dsa: Make bcm_sf2 utilize b53_common
      
      This patch series makes the bcm_sf2 driver utilize a large number of the core
      functions offered by the b53_common driver since the SWITCH_CORE registers are
      mostly register compatible with the switches driven by b53_common.
      
      In order to accomplish that, we just override the dsa_driver_ops callbacks that
      we need to. There are still integration specific logic from the bcm_sf2 that we
      cannot absorb into b53_common because it is just not there, mostly in the area
      of link management and power management, but most of the features are within
      b53_common now: VLAN, FDB, bridge
      
      Along the process, we also improve support for the BCM58xx SoCs, since those
      also have the same version of the switching IP that 7445 has (for which bcm_sf2
      was developed).
      
      Changes in v3:
      
      - rebase against 145dd5f9 ("net: flush the
        softnet backlog in process context")
      
      Changes in v2:
      
      - rebased against "net: dsa: rename switch operations structure"
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a29ca894
    • Florian Fainelli's avatar
      net: dsa: bcm_sf2: Remove duplicate code · de0b9d3b
      Florian Fainelli authored
      Now that we are using b53_common for most VLAN, FDB and bridge
      operations, delete all the redundant code that we had in bcm_sf2.c to
      keep only the integration specific logic that we have to deal with:
      power management, link management and the external interfaces (RGMII,
      MDIO).
      Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      de0b9d3b
    • Florian Fainelli's avatar
      net: dsa: bcm_sf2: Utilize core B53 driver when possible · f458995b
      Florian Fainelli authored
      The Broadcom Starfighter2 is almost entirely register compatible with
      B53, yet for historical reasons came up first in the tree and is now
      being updated to utilize b53_common.c to the fullest extent possible. A
      few things need to be adjusted to allow that:
      
      - the switch "core" registers currently operate on a 32-bit address,
        whereas b53 passes a page + reg pair to offset from, so we need to
        convert that, thankfully there is a generic formula to do that
      
      - the link managemenent is not self contained with the B53/CORE register
        set, but instead is in the SWITCH_REG block which is part of the
        integration glue logic, so we keep that entirely custom here because
        this really is part of the existing bcm_sf2 implementation
      
      - there are additional power management constraints on the port's
        memories that make us keep the port_enable/disable callbacks custom
        for now, also, we support tagging whereas b53_common does not support
        that yet
      
      All the VLAN and bridge code is entirely identical though so, avoid
      duplicating it. Other things will be migrated in the future like EEE and
      possibly Wake-on-LAN.
      Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f458995b
    • Florian Fainelli's avatar
      net: dsa: b53: Add JOIN_ALL_VLAN support · 48aea33a
      Florian Fainelli authored
      In order to migrate the bcm_sf2 driver over to the b53 driver for most
      VLAN/FDB/bridge operations, we need to add support for the "join all
      VLANs" register and behavior which allows us to make a given port join
      all VLANs and avoid setting specific VLAN entries when it is leaving the
      bridge.
      Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      48aea33a
    • Florian Fainelli's avatar
      net: dsa: b53: Define SF2 MIB layout · bde5d132
      Florian Fainelli authored
      The 58xx and 7445 chips use the Starfighter2 code, define its MIB layout
      and introduce a helper function: is58xx() which checks for both of these
      IDs for now.
      Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      bde5d132
    • Florian Fainelli's avatar
      net: dsa: b53: Prepare to support 7445 switch · 130401d9
      Florian Fainelli authored
      Allocate a device entry for the Broadcom BCM7445 integrated switch
      currently backed by bcm_sf2.c. Since this is the latest generation, it
      has 4 ARL entries, 4K VLANs and uses Port 8 for the CPU/IMP port.
      Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      130401d9