1. 02 4月, 2016 3 次提交
  2. 01 4月, 2016 2 次提交
  3. 19 3月, 2016 1 次提交
    • A
      net: mvneta: bm: clarify dependencies · 019ded3a
      Arnd Bergmann 提交于
      MVNETA_BM has a dependency on MVNETA, so we can only select the former
      if the latter is enabled. However, the code dependency is the reverse:
      The mvneta module can call into the mvneta_bm module, so mvneta cannot
      be a built-in if mvneta_bm is a module, or we get a link error:
      
      drivers/net/built-in.o: In function `mvneta_remove':
      drivers/net/ethernet/marvell/mvneta.c:4211: undefined reference to `mvneta_bm_pool_destroy'
      drivers/net/built-in.o: In function `mvneta_bm_update_mtu':
      drivers/net/ethernet/marvell/mvneta.c:1034: undefined reference to `mvneta_bm_bufs_free'
      
      This avoids the problem by further clarifying the dependency so that
      MVNETA_BM is a silent Kconfig option that gets turned on by the
      new MVNETA_BM_ENABLE option. This way both the core HWBM module and
      the MVNETA_BM code are always built-in when needed.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Fixes: dc35a10f ("net: mvneta: bm: add support for hardware buffer management")
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      019ded3a
  4. 15 3月, 2016 7 次提交
    • D
      net: mvneta: replace magic numbers by existing macros · a3703fb3
      Dmitri Epshtein 提交于
      Some literal values are actually already defined by macros, so let's use
      them.
      
      [gregory.clement@free-electrons.com: split intial commit in two
      individual changes]
      Signed-off-by: NDmitri Epshtein <dima@marvell.com>
      Signed-off-by: NGregory CLEMENT <gregory.clement@free-electrons.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a3703fb3
    • D
      net: mvneta: fix error messages in mvneta_port_down function · 0838abb3
      Dmitri Epshtein 提交于
      This commit corrects error printing when shutting down the port.
      
      [gregory.clement@free-electrons.com: split initial commit in two
      individual changes]
      Signed-off-by: NDmitri Epshtein <dima@marvell.com>
      Signed-off-by: NGregory CLEMENT <gregory.clement@free-electrons.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0838abb3
    • D
      net: mvneta: enable change MAC address when interface is up · 928b6519
      Dmitri Epshtein 提交于
      Function eth_prepare_mac_addr_change() is called as part of MAC
      address change. This function check if interface is running.
      To enable change MAC address when interface is running:
      IFF_LIVE_ADDR_CHANGE flag must be set to dev->priv_flags field
      
      Fixes: c5aff182 ("net: mvneta: driver for Marvell Armada 370/XP
      network unit")
      Cc: stable@vger.kernel.org
      Signed-off-by: NDmitri Epshtein <dima@marvell.com>
      Signed-off-by: NGregory CLEMENT <gregory.clement@free-electrons.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      928b6519
    • G
      net: mvneta: Fix spinlock usage · 1c2722a9
      Gregory CLEMENT 提交于
      In the previous patch, the spinlock was not initialized. While it didn't
      cause any trouble yet it could be a problem to use it uninitialized.
      
      The most annoying part was the critical section protected by the spinlock
      in mvneta_stop(). Some of the functions could sleep as pointed when
      activated CONFIG_DEBUG_ATOMIC_SLEEP. Actually, in mvneta_stop() we only
      need to protect the is_stopped flagged, indeed the code of the notifier
      for CPU online is protected by the same spinlock, so when we get the
      lock, the notifer work is done.
      Reported-by: NPatrick Uiterwijk <patrick@puiterwijk.org>
      Signed-off-by: NGregory CLEMENT <gregory.clement@free-electrons.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1c2722a9
    • A
      net: mvneta: Add missing hotplug notifier transition · 0df83e7a
      Anna-Maria Gleixner 提交于
      The mvneta_percpu_notifier() hotplug callback lacks handling of the
      CPU_DOWN_FAILED case. That means, if CPU_DOWN_PREPARE failes, the
      driver is not well configured on the CPU.
      
      Add handling for CPU_DOWN_FAILED[_FROZEN] hotplug notifier transition
      to setup the driver.
      
      Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Cc: netdev@vger.kernel.org
      Signed-off-by: NAnna-Maria Gleixner <anna-maria@linutronix.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0df83e7a
    • G
      net: mvneta: Use the new hwbm framework · baa11ebc
      Gregory CLEMENT 提交于
      Now that the hardware buffer management framework had been introduced,
      let's use it.
      Tested-by: NSebastian Careba <nitroshift@yahoo.com>
      Signed-off-by: NGregory CLEMENT <gregory.clement@free-electrons.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      baa11ebc
    • M
      net: mvneta: bm: add support for hardware buffer management · dc35a10f
      Marcin Wojtas 提交于
      Buffer manager (BM) is a dedicated hardware unit that can be used by all
      ethernet ports of Armada XP and 38x SoC's. It allows to offload CPU on RX
      path by sparing DRAM access on refilling buffer pool, hardware-based
      filling of descriptor ring data and better memory utilization due to HW
      arbitration for using 'short' pools for small packets.
      
      Tests performed with A388 SoC working as a network bridge between two
      packet generators showed increase of maximum processed 64B packets by
      ~20k (~555k packets with BM enabled vs ~535 packets without BM). Also
      when pushing 1500B-packets with a line rate achieved, CPU load decreased
      from around 25% without BM to 20% with BM.
      
      BM comprise up to 4 buffer pointers' (BP) rings kept in DRAM, which
      are called external BP pools - BPPE. Allocating and releasing buffer
      pointers (BP) to/from BPPE is performed indirectly by write/read access
      to a dedicated internal SRAM, where internal BP pools (BPPI) are placed.
      BM hardware controls status of BPPE automatically, as well as assigning
      proper buffers to RX descriptors. For more details please refer to
      Functional Specification of Armada XP or 38x SoC.
      
      In order to enable support for a separate hardware block, common for all
      ports, a new driver has to be implemented ('mvneta_bm'). It provides
      initialization sequence of address space, clocks, registers, SRAM,
      empty pools' structures and also obtaining optional configuration
      from DT (please refer to device tree binding documentation). mvneta_bm
      exposes also a necessary API to mvneta driver, as well as a dedicated
      structure with BM information (bm_priv), whose presence is used as a
      flag notifying of BM usage by port. It has to be ensured that mvneta_bm
      probe is executed prior to the ones in ports' driver. In case BM is not
      used or its probe fails, mvneta falls back to use software buffer
      management.
      
      A sequence executed in mvneta_probe function is modified in order to have
      an access to needed resources before possible port's BM initialization is
      done. According to port-pools mapping provided by DT appropriate registers
      are configured and the buffer pools are filled. RX path is modified
      accordingly. Becaues the hardware allows a wide variety of configuration
      options, following assumptions are made:
      * using BM mechanisms can be selectively disabled/enabled basing
        on DT configuration among the ports
      * 'long' pool's single buffer size is tied to port's MTU
      * using 'long' pool by port is obligatory and it cannot be shared
      * using 'short' pool for smaller packets is optional
      * one 'short' pool can be shared among all ports
      
      This commit enables hardware buffer management operation cooperating with
      existing mvneta driver. New device tree binding documentation is added and
      the one of mvneta is updated accordingly.
      
      [gregory.clement@free-electrons.com: removed the suspend/resume part]
      Signed-off-by: NMarcin Wojtas <mw@semihalf.com>
      Signed-off-by: NGregory CLEMENT <gregory.clement@free-electrons.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      dc35a10f
  5. 13 2月, 2016 8 次提交
  6. 29 1月, 2016 1 次提交
  7. 22 1月, 2016 4 次提交
  8. 08 1月, 2016 2 次提交
  9. 16 12月, 2015 1 次提交
    • T
      net: Rename NETIF_F_ALL_CSUM to NETIF_F_CSUM_MASK · a188222b
      Tom Herbert 提交于
      The name NETIF_F_ALL_CSUM is a misnomer. This does not correspond to the
      set of features for offloading all checksums. This is a mask of the
      checksum offload related features bits. It is incorrect to set both
      NETIF_F_HW_CSUM and NETIF_F_IP_CSUM or NETIF_F_IPV6 at the same time for
      features of a device.
      
      This patch:
        - Changes instances of NETIF_F_ALL_CSUM to NETIF_F_CSUM_MASK (where
          NETIF_F_ALL_CSUM is being used as a mask).
        - Changes bonding, sfc/efx, ipvlan, macvlan, vlan, and team drivers to
          use NEITF_F_HW_CSUM in features list instead of NETIF_F_ALL_CSUM.
      Signed-off-by: NTom Herbert <tom@herbertland.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a188222b
  10. 12 12月, 2015 4 次提交
  11. 05 12月, 2015 3 次提交
  12. 04 12月, 2015 3 次提交
  13. 03 12月, 2015 1 次提交
    • M
      net: mvneta: enable setting custom TX IP checksum limit · 9110ee07
      Marcin Wojtas 提交于
      Since Armada 38x SoC can support IP checksum for jumbo frames only on
      a single port, it means that this feature should be enabled per-port,
      rather than for the whole SoC.
      
      This patch enables setting custom TX IP checksum limit by adding new
      optional property to the mvneta device tree node. If not used, by
      default 1600B is set for "marvell,armada-370-neta" and 9800B for other
      strings, which ensures backward compatibility. Binding documentation
      is updated accordingly.
      Signed-off-by: NMarcin Wojtas <mw@semihalf.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9110ee07