1. 09 Oct, 2008 10 commits
    • Lennert Buytenhek's avatar
      dsa: add support for the Marvell 88E6131 switch chip · 2e5f0320
      Lennert Buytenhek authored
      Add support for the Marvell 88E6131 switch chip.  This chip only
      supports the original (ethertype-less) DSA tagging format.
      
      On the 88E6131, there is a PHY Polling Unit (PPU) which has exclusive
      access to each of the PHYs's MII management registers.  If we want to
      talk to the PHYs from software, we have to disable the PPU and wait
      for it to complete its current transaction before we can do so, and we
      need to re-enable the PPU afterwards to make sure that the switch will
      notice changes in link state and speed on the individual ports as they
      occur.
      
      Since disabling the PPU is rather slow, and since MII management
      accesses are typically done in bursts, this patch keeps the PPU disabled
      for 10ms after a software access completes.  This makes handling the
      PPU slightly more complex, but speeds up something like running ethtool
      on one of the switch slave interfaces from ~300ms to ~30ms on typical
      hardware.
      Signed-off-by: default avatarLennert Buytenhek <buytenh@marvell.com>
      Tested-by: default avatarNicolas Pitre <nico@marvell.com>
      Tested-by: default avatarPeter van Valderen <linux@ddcrew.com>
      Tested-by: default avatarDirk Teurlings <dirk@upexia.nl>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2e5f0320
    • Lennert Buytenhek's avatar
      dsa: add support for original DSA tagging format · cf85d08f
      Lennert Buytenhek authored
      Most of the DSA switches currently in the field do not support the
      Ethertype DSA tagging format that one of the previous patches added
      support for, but only the original DSA tagging format.
      
      The original DSA tagging format carries the same information as the
      Ethertype DSA tagging format, but with the difference that it does not
      have an ethertype field.  In other words, when receiving a packet that
      is tagged with an original DSA tag, there is no way of telling in
      eth_type_trans() that this packet is in fact a DSA-tagged packet.
      
      This patch adds a hook into eth_type_trans() which is only compiled in
      if support for a switch chip that doesn't support Ethertype DSA is
      selected, and which checks whether there is a DSA switch driver
      instance attached to this network device which uses the old tag format.
      If so, it sets the protocol field to ETH_P_DSA without looking at the
      packet, so that the packet ends up in the right place.
      Signed-off-by: default avatarLennert Buytenhek <buytenh@marvell.com>
      Tested-by: default avatarNicolas Pitre <nico@marvell.com>
      Tested-by: default avatarPeter van Valderen <linux@ddcrew.com>
      Tested-by: default avatarDirk Teurlings <dirk@upexia.nl>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      cf85d08f
    • Lennert Buytenhek's avatar
      net: Distributed Switch Architecture protocol support · 91da11f8
      Lennert Buytenhek authored
      Distributed Switch Architecture is a protocol for managing hardware
      switch chips.  It consists of a set of MII management registers and
      commands to configure the switch, and an ethernet header format to
      signal which of the ports of the switch a packet was received from
      or is intended to be sent to.
      
      The switches that this driver supports are typically embedded in
      access points and routers, and a typical setup with a DSA switch
      looks something like this:
      
      	+-----------+       +-----------+
      	|           | RGMII |           |
      	|           +-------+           +------ 1000baseT MDI ("WAN")
      	|           |       |  6-port   +------ 1000baseT MDI ("LAN1")
      	|    CPU    |       |  ethernet +------ 1000baseT MDI ("LAN2")
      	|           |MIImgmt|  switch   +------ 1000baseT MDI ("LAN3")
      	|           +-------+  w/5 PHYs +------ 1000baseT MDI ("LAN4")
      	|           |       |           |
      	+-----------+       +-----------+
      
      The switch driver presents each port on the switch as a separate
      network interface to Linux, polls the switch to maintain software
      link state of those ports, forwards MII management interface
      accesses to those network interfaces (e.g. as done by ethtool) to
      the switch, and exposes the switch's hardware statistics counters
      via the appropriate Linux kernel interfaces.
      
      This initial patch supports the MII management interface register
      layout of the Marvell 88E6123, 88E6161 and 88E6165 switch chips, and
      supports the "Ethertype DSA" packet tagging format.
      
      (There is no officially registered ethertype for the Ethertype DSA
      packet format, so we just grab a random one.  The ethertype to use
      is programmed into the switch, and the switch driver uses the value
      of ETH_P_EDSA for this, so this define can be changed at any time in
      the future if the one we chose is allocated to another protocol or
      if Ethertype DSA gets its own officially registered ethertype, and
      everything will continue to work.)
      Signed-off-by: default avatarLennert Buytenhek <buytenh@marvell.com>
      Tested-by: default avatarNicolas Pitre <nico@marvell.com>
      Tested-by: default avatarByron Bradley <byron.bbradley@gmail.com>
      Tested-by: default avatarTim Ellis <tim.ellis@mac.com>
      Tested-by: default avatarPeter van Valderen <linux@ddcrew.com>
      Tested-by: default avatarDirk Teurlings <dirk@upexia.nl>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      91da11f8
    • Andreas Oberritter's avatar
      8139too: move wmb before TX DMA start · 176eaa58
      Andreas Oberritter authored
      The write barrier should be used before starting a DMA transfer. This fixes
      a problem, where almost all packets received on another machine had garbled
      content. Tested with an RTL8100C on a MIPS machine.
      Signed-off-by: default avatarAndreas Oberritter <obi@linuxtv.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      176eaa58
    • Arjan van de Ven's avatar
      netdev: uniquify the tx_timeout name · ed4cb133
      Arjan van de Ven authored
      there's several drivers that have use "tx_timeout" for the .. tx
      timeout function.  All fine with that, they're static, however for
      doing stats on how often which driver hits the timeout it's a tad
      unfortunate. The patch below gives the ones I found in the
      kerneloops.org database unique names.
      Signed-off-by: default avatarArjan van de Ven <arjan@linux.intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ed4cb133
    • David Brownell's avatar
      drivers/net/usb/Makefile - shrink logspam · 21ce4ffb
      David Brownell authored
      When building with CONFIG_USB_DEBUG, don't create logspam from
      the USB networking drivers.
      Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      21ce4ffb
    • Bruno Prémont's avatar
      r8169: WoL fixes, part 2. · 8b76ab39
      Bruno Prémont authored
      Since recent kernel (2.6.26 or 2.6.27) the PCI wakeup functions are
      influenced by generic device ability and configuration when enabling
      PCI-device triggered wake-up.
      
      This patch causes WoL setting to enable/disable device's wish to
      be permitted to wake-up the host when changing WoL options and
      also during device probing.
      
      Without this patch one has write 'enabled' to
        /sys/bus/pci/devices/0000:02:08.0/power/wakeup
      Signed-off-by: default avatarBruno Prémont <bonbons@linux-vserver.org>
      Acked-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8b76ab39
    • Bruno Prémont's avatar
      r8169: WoL fixes, part 1. · 20037fa4
      Bruno Prémont authored
      When probing the chip and handling it's power management settings
      also remember wether WoL feature is enabled.
      
      Without this patch one has to call ethtool to change WoL settings
      for this flag to be set and any WoL being enabled on suspend to
      RAM.
      Signed-off-by: default avatarBruno Prémont <bonbons@linux-vserver.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      20037fa4
    • Trent Piepho's avatar
      gianfar: Create net device with carrier down · d3eab82b
      Trent Piepho authored
      The device's carrier status is controlled via the functions
      netif_carrier_on() and netif_carrier_off().  These set or clear a bit
      indicating the carrier (aka lower level link) is down, and if the state
      changed, they fire off a routing netlink event.
      
      Add a call to netif_carrier_off() before register_netdev() so that the
      newly created device will be set to carrier down.  Then when the carrier
      comes up for the first time, a netlink event will be generated, as the
      carrier changed from down to up.  Otherwise the initial carrier up will
      appear to be changing the status from up to up, and so no event is
      generated since that's not a change.
      Signed-off-by: default avatarTrent Piepho <tpiepho@freescale.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d3eab82b
    • Lennert Buytenhek's avatar
      mv643xx_eth: include linux/ip.h to fix build · c3efab8e
      Lennert Buytenhek authored
      mv643xx_eth uses ip_hdr() (defined in linux/ip.h), but relied on
      another header file to include the needed header file indirectly.
      In latest net-next this indirect include chain is gone, so the
      driver fails to build.  Include linux/ip.h explicitly to fix this.
      Signed-off-by: default avatarLennert Buytenhek <buytenh@marvell.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c3efab8e
  2. 08 Oct, 2008 30 commits