1. 10 3月, 2015 1 次提交
    • F
      net: dsa: utilize of_find_net_device_by_node · 769a0202
      Florian Fainelli 提交于
      Using of_find_device_by_node() restricts the search to platform_device that
      match the specified device_node pointer. This is not even remotely true for
      network devices backed by a pci_device for instance.
      
      of_find_net_device_by_node() allows us to do a more thorough lookup to find the
      struct net_device corresponding to a particular device_node pointer.
      
      For symetry with the non-OF code path, we hold the net_device pointer in
      dsa_probe() just like what dev_to_net_dev() does when we call this
      function.
      Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      769a0202
  2. 06 3月, 2015 5 次提交
  3. 26 2月, 2015 3 次提交
    • G
      net: dsa: Introduce dsa_is_port_initialized · d79d2107
      Guenter Roeck 提交于
      To avoid race conditions when using the ds->ports[] array,
      we need to check if the accessed port has been initialized.
      Introduce and use helper function dsa_is_port_initialized
      for that purpose and use it where needed.
      Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d79d2107
    • F
      net: dsa: integrate with SWITCHDEV for HW bridging · b73adef6
      Florian Fainelli 提交于
      In order to support bridging offloads in DSA switch drivers, select
      NET_SWITCHDEV to get access to the port_stp_update and parent_get_id
      NDOs that we are required to implement.
      
      To facilitate the integratation at the DSA driver level, we implement 3
      types of operations:
      
      - port_join_bridge
      - port_leave_bridge
      - port_stp_update
      
      DSA will resolve which switch ports that are currently bridge port
      members as some Switch hardware/drivers need to know about that to limit
      the register programming to just the relevant registers (especially for
      slow MDIO buses).
      
      We also take care of setting the correct STP state when slave network
      devices are brought up/down while being bridge members.
      
      Finally, when a port is leaving the bridge, we make sure we set in
      BR_STATE_FORWARDING state, otherwise the bridge layer would leave it
      disabled as a result of having left the bridge.
      Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Reviewed-by: NGuenter Roeck <linux@roeck-us.net>
      Tested-by: NGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b73adef6
    • G
      net: dsa: Ensure that port array elements are initialized before being used · d87d6f44
      Guenter Roeck 提交于
      A network device notifier can be called for one or more of the created
      slave devices before all slave devices have been registered. This can
      result in a mismatch between ds->phys_port_mask and the registered devices
      by the time the call is made, and it can result in a slave device being
      added to a bridge before its entry in ds->ports[] has been initialized.
      
      Rework the initialization code to initialize entries in ds->ports[] in
      dsa_slave_create. With this change, dsa_slave_create no longer needs
      to return slave_dev but can return an error code instead.
      Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d87d6f44
  4. 08 2月, 2015 1 次提交
  5. 17 11月, 2014 2 次提交
  6. 12 11月, 2014 1 次提交
  7. 31 10月, 2014 2 次提交
  8. 29 10月, 2014 1 次提交
  9. 20 10月, 2014 1 次提交
  10. 02 10月, 2014 1 次提交
  11. 23 9月, 2014 1 次提交
  12. 16 9月, 2014 3 次提交
  13. 02 9月, 2014 1 次提交
  14. 28 8月, 2014 5 次提交
    • F
      net: dsa: add Broadcom SF2 switch driver · 246d7f77
      Florian Fainelli 提交于
      Add support for the Broadcom Starfigther 2 switch chip using a DSA
      driver. This switch driver supports the following features:
      
      - configuration of the external switch port interface: MII, RevMII,
        RGMII and RGMII_NO_ID are supported
      - support for the per-port MIB counters
      - support for link interrupts for special ports (e.g: MoCA)
      - powering up/down of switch memories to conserve power when ports are
        unused
      
      Finally, update the compatible property for the DSA core code to match
      our switch top-level compatible node.
      Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      246d7f77
    • F
      net: dsa: allow for more complex PHY setups · 0d8bcdd3
      Florian Fainelli 提交于
      Modify the DSA slave interface to be bound to an arbitray PHY, not just
      the ones that are available as child PHY devices of the switch MDIO bus.
      
      This allows us for instance to have external PHYs connected to a
      separate MDIO bus, but yet also connected to a given switch port.
      
      Under certain configurations, the physical port mask might not be a 1:1
      mapping to the MII PHYs mask. This is the case, if e.g: Port 1 of the
      switch is used and connects to a PHY at a MDIO address different than 1.
      
      Introduce a phys_mii_mask variable which allows driver to implement and
      divert their own MDIO read/writes operations for a subset of the MDIO
      PHY addresses.
      Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0d8bcdd3
    • F
      net: dsa: retain a per-port device_node pointer · bd47497a
      Florian Fainelli 提交于
      We will later use the per-port device_node pointer to fetch a bunch of
      port-specific properties.
      Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bd47497a
    • F
      net: dsa: provide a switch device device tree node pointer · fa981d9a
      Florian Fainelli 提交于
      We might need to fetch additional resources from the device tree node
      pointer, such as register ranges or other properties. Keep a device_node
      pointer around for this.
      Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fa981d9a
    • F
      net: dsa: reduce number of protocol hooks · 3e8a72d1
      Florian Fainelli 提交于
      DSA is currently registering one packet_type function per EtherType it
      needs to intercept in the receive path of a DSA-enabled Ethernet device.
      Right now we have three of them: trailer, DSA and eDSA, and there might
      be more in the future, this will not scale to the addition of new
      protocols.
      
      This patch proceeds with adding a new layer of abstraction and two new
      functions:
      
      dsa_switch_rcv() which will dispatch into the tag-protocol specific
      receive function implemented by net/dsa/tag_*.c
      
      dsa_slave_xmit() which will dispatch into the tag-protocol specific
      transmit function implemented by net/dsa/tag_*.c
      
      When we do create the per-port slave network devices, we iterate over
      the switch protocol to assign the DSA-specific receive and transmit
      operations.
      
      A new fake ethertype value is used: ETH_P_XDSA to illustrate the fact
      that this is no longer going to look like ETH_P_DSA or ETH_P_TRAILER
      like it used to be.
      
      This allows us to greatly simplify the check in eth_type_trans() and
      always override the skb->protocol with ETH_P_XDSA for Ethernet switches
      tagged protocol, while also reducing the number repetitive slave
      netdevice_ops assignments.
      Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3e8a72d1
  15. 26 6月, 2014 1 次提交
  16. 17 5月, 2014 1 次提交
  17. 26 3月, 2013 2 次提交
  18. 25 3月, 2013 1 次提交
  19. 22 1月, 2013 1 次提交
  20. 21 8月, 2012 1 次提交
    • T
      workqueue: deprecate flush[_delayed]_work_sync() · 43829731
      Tejun Heo 提交于
      flush[_delayed]_work_sync() are now spurious.  Mark them deprecated
      and convert all users to flush[_delayed]_work().
      
      If you're cc'd and wondering what's going on: Now all workqueues are
      non-reentrant and the regular flushes guarantee that the work item is
      not pending or running on any CPU on return, so there's no reason to
      use the sync flushes at all and they're going away.
      
      This patch doesn't make any functional difference.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: Ian Campbell <ian.campbell@citrix.com>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Mattia Dongili <malattia@linux.it>
      Cc: Kent Yoder <key@linux.vnet.ibm.com>
      Cc: David Airlie <airlied@linux.ie>
      Cc: Jiri Kosina <jkosina@suse.cz>
      Cc: Karsten Keil <isdn@linux-pingi.de>
      Cc: Bryan Wu <bryan.wu@canonical.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Alasdair Kergon <agk@redhat.com>
      Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
      Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: linux-wireless@vger.kernel.org
      Cc: Anton Vorontsov <cbou@mail.ru>
      Cc: Sangbeom Kim <sbkim73@samsung.com>
      Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Eric Van Hensbergen <ericvh@gmail.com>
      Cc: Takashi Iwai <tiwai@suse.de>
      Cc: Steven Whitehouse <swhiteho@redhat.com>
      Cc: Petr Vandrovec <petr@vandrovec.name>
      Cc: Mark Fasheh <mfasheh@suse.com>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Avi Kivity <avi@redhat.com> 
      43829731
  21. 27 11月, 2011 3 次提交
  22. 01 11月, 2011 1 次提交
  23. 24 1月, 2011 1 次提交