1. 09 3月, 2015 1 次提交
  2. 27 1月, 2015 1 次提交
    • E
      net: mv643xx_eth: Fix highmem support in non-TSO egress path · 9e911414
      Ezequiel Garcia 提交于
      Commit 69ad0dd7
      Author: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
      Date:   Mon May 19 13:59:59 2014 -0300
      
          net: mv643xx_eth: Use dma_map_single() to map the skb fragments
      
      caused a nasty regression by removing the support for highmem skb
      fragments. By using page_address() to get the address of a fragment's
      page, we are assuming a lowmem page. However, such assumption is incorrect,
      as fragments can be in highmem pages, resulting in very nasty issues.
      
      This commit fixes this by using the skb_frag_dma_map() helper,
      which takes care of mapping the skb fragment properly. Additionally,
      the type of mapping is now tracked, so it can be unmapped using
      dma_unmap_page or dma_unmap_single when appropriate.
      
      This commit also fixes the error path in txq_init() to release the
      resources properly.
      
      Fixes: 69ad0dd7 ("net: mv643xx_eth: Use dma_map_single() to map the skb fragments")
      Reported-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      Signed-off-by: NEzequiel Garcia <ezequiel.garcia@free-electrons.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9e911414
  3. 14 1月, 2015 1 次提交
  4. 09 12月, 2014 2 次提交
    • E
      net: mvneta: fix race condition in mvneta_tx() · 5f478b41
      Eric Dumazet 提交于
      mvneta_tx() dereferences skb to get skb->len too late,
      as hardware might have completed the transmit and TX completion
      could have freed the skb from another cpu.
      
      Fixes: 71f6d1b3 ("net: mvneta: replace Tx timer with a real interrupt")
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5f478b41
    • W
      net: mvneta: fix Tx interrupt delay · aebea2ba
      willy tarreau 提交于
      The mvneta driver sets the amount of Tx coalesce packets to 16 by
      default. Normally that does not cause any trouble since the driver
      uses a much larger Tx ring size (532 packets). But some sockets
      might run with very small buffers, much smaller than the equivalent
      of 16 packets. This is what ping is doing for example, by setting
      SNDBUF to 324 bytes rounded up to 2kB by the kernel.
      
      The problem is that there is no documented method to force a specific
      packet to emit an interrupt (eg: the last of the ring) nor is it
      possible to make the NIC emit an interrupt after a given delay.
      
      In this case, it causes trouble, because when ping sends packets over
      its raw socket, the few first packets leave the system, and the first
      15 packets will be emitted without an IRQ being generated, so without
      the skbs being freed. And since the socket's buffer is small, there's
      no way to reach that amount of packets, and the ping ends up with
      "send: no buffer available" after sending 6 packets. Running with 3
      instances of ping in parallel is enough to hide the problem, because
      with 6 packets per instance, that's 18 packets total, which is enough
      to grant a Tx interrupt before all are sent.
      
      The original driver in the LSP kernel worked around this design flaw
      by using a software timer to clean up the Tx descriptors. This timer
      was slow and caused terrible network performance on some Tx-bound
      workloads (such as routing) but was enough to make tools like ping
      work correctly.
      
      Instead here, we simply set the packet counts before interrupt to 1.
      This ensures that each packet sent will produce an interrupt. NAPI
      takes care of coalescing interrupts since the interrupt is disabled
      once generated.
      
      No measurable performance impact nor CPU usage were observed on small
      nor large packets, including when saturating the link on Tx, and this
      fixes tools like ping which rely on too small a send buffer. If one
      wants to increase this value for certain workloads where it is safe
      to do so, "ethtool -C $dev tx-frames" will override this default
      setting.
      
      This fix needs to be applied to stable kernels starting with 3.10.
      Tested-By: NMaggie Mae Roxas <maggie.mae.roxas@gmail.com>
      Signed-off-by: NWilly Tarreau <w@1wt.eu>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      aebea2ba
  5. 06 12月, 2014 3 次提交
  6. 27 11月, 2014 1 次提交
  7. 22 11月, 2014 1 次提交
  8. 13 11月, 2014 1 次提交
  9. 07 11月, 2014 1 次提交
  10. 02 11月, 2014 1 次提交
  11. 01 11月, 2014 1 次提交
  12. 28 10月, 2014 1 次提交
  13. 25 10月, 2014 3 次提交
  14. 20 10月, 2014 1 次提交
  15. 11 10月, 2014 1 次提交
    • G
      net: pxa168_eth: PXA168_ETH should depend on HAS_DMA · 3b3d136c
      Geert Uytterhoeven 提交于
      If NO_DMA=y:
      
      drivers/built-in.o: In function `rxq_deinit':
      pxa168_eth.c:(.text+0x2a2f2e): undefined reference to `dma_free_coherent'
      drivers/built-in.o: In function `txq_reclaim':
      pxa168_eth.c:(.text+0x2a3044): undefined reference to `dma_unmap_single'
      drivers/built-in.o: In function `txq_deinit':
      pxa168_eth.c:(.text+0x2a310a): undefined reference to `dma_free_coherent'
      drivers/built-in.o: In function `txq_init':
      pxa168_eth.c:(.text+0x2a3226): undefined reference to `dma_alloc_coherent'
      drivers/built-in.o: In function `rxq_init':
      pxa168_eth.c:(.text+0x2a32d4): undefined reference to `dma_alloc_coherent'
      drivers/built-in.o: In function `init_hash_table':
      pxa168_eth.c:(.text+0x2a3354): undefined reference to `dma_alloc_coherent'
      drivers/built-in.o: In function `rxq_refill':
      pxa168_eth.c:(.text+0x2a345a): undefined reference to `dma_map_single'
      drivers/built-in.o: In function `rxq_process':
      pxa168_eth.c:(.text+0x2a39cc): undefined reference to `dma_unmap_single'
      drivers/built-in.o: In function `pxa168_eth_remove':
      pxa168_eth.c:(.text+0x2a3b84): undefined reference to `dma_free_coherent'
      drivers/built-in.o: In function `pxa168_eth_start_xmit':
      pxa168_eth.c:(.text+0x2a3e8a): undefined reference to `dma_map_single'
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3b3d136c
  16. 06 10月, 2014 1 次提交
  17. 04 10月, 2014 1 次提交
  18. 01 10月, 2014 7 次提交
  19. 10 9月, 2014 1 次提交
  20. 26 8月, 2014 2 次提交
  21. 13 8月, 2014 1 次提交
  22. 09 8月, 2014 1 次提交
  23. 08 8月, 2014 1 次提交
  24. 30 7月, 2014 2 次提交
  25. 23 7月, 2014 3 次提交
    • E
      net: mvpp2: Simplify BM pool buffers freeing · 7861f12b
      Ezequiel Garcia 提交于
      Now that all the users of mvpp2_bm_bufs_free() have been fixed, we can safely
      clean the function prototype.
      
      The function is always called to release all the buffers in a BM pool, and
      the number of buffers freed is not needed. Therefore, we change the return
      to a void, and remove the "num" parameter. This is a cosmetic change, to
      make the code slightly cleaner.
      Signed-off-by: NEzequiel Garcia <ezequiel.garcia@free-electrons.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7861f12b
    • E
      net: mvpp2: Fix the BM pool buffer release check · d74c96c1
      Ezequiel Garcia 提交于
      After a call to mvpp2_bm_bufs_free(), the caller usually wants to know
      if the function successfully freed the requested number. However, this
      cannot be done by looking into the BM pool count, because the current
      buffer count was updated by mvpp2_bm_bufs_free().
      
      In fact, the current callers of mvpp2_bm_bufs_free() use it to release
      all the buffers in the pool, so we can fix this by simply checking
      if the pool is not empty.
      Signed-off-by: NEzequiel Garcia <ezequiel.garcia@free-electrons.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d74c96c1
    • M
      net: mvpp2: Enable proper PHY polling and fix port functionality · 08a23755
      Marcin Wojtas 提交于
      Currently, the network interfaces that are not configured by the bootloader
      (using e.g. tftp or ping) can detect the link status but are unable to
      transmit data.
      
      The network controller has a functionality that allows the hardware to
      continuously poll the PHY and directly update the MAC configuration accordingly
      (speed, duplex, etc.). However, this doesn't work well with phylib's
      software-based polling and updating MAC configuration in the driver's callback.
      
      This commit fixes this issue by:
      
        1. Setting MVPP2_PHY_AN_STOP_SMI0_MASK in MVPP2_PHY_AN_CFG0_REG in
           mvpp2_init(), which disables the harware polling feature.
      
        2. Disabling MVPP2_GMAC_PCS_ENABLE_MASK bit in MVPP2_GMAC_CTRL_2_REG in
           mvpp2_port_mii_set() for port types other than SGMII.
      Signed-off-by: NMarcin Wojtas <mw@semihalf.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      08a23755