1. 03 12月, 2016 6 次提交
  2. 30 11月, 2016 1 次提交
  3. 26 11月, 2016 2 次提交
    • A
      mvpp2: use correct size for memset · e8f967c3
      Arnd Bergmann 提交于
      gcc-7 detects a short memset in mvpp2, introduced in the original
      merge of the driver:
      
      drivers/net/ethernet/marvell/mvpp2.c: In function 'mvpp2_cls_init':
      drivers/net/ethernet/marvell/mvpp2.c:3296:2: error: 'memset' used with length equal to number of elements without multiplication by element size [-Werror=memset-elt-size]
      
      The result seems to be that we write uninitialized data into the
      flow table registers, although we did not get any warning about
      that uninitialized data usage.
      
      Using sizeof() lets us initialize then entire array instead.
      
      Fixes: 3f518509 ("ethernet: Add new driver for Marvell Armada 375 network unit")
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e8f967c3
    • A
      net: ethernet: mvneta: Remove IFF_UNICAST_FLT which is not implemented · 97db8afa
      Andrew Lunn 提交于
      The mvneta driver advertises it supports IFF_UNICAST_FLT. However, it
      actually does not. The hardware probably does support it, but there is
      no code to configure the filter. As a quick and simple fix, remove the
      flag. This will cause the core to fall back to promiscuous mode.
      Signed-off-by: NAndrew Lunn <andrew@lunn.ch>
      Fixes: b50b72de ("net: mvneta: enable features before registering the driver")
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      97db8afa
  4. 22 11月, 2016 1 次提交
    • A
      marvell: mark mvneta and mvpp2 32-bit only · 06b37b65
      Arnd Bergmann 提交于
      Both of these drivers won't work on 64-bit architectures unless they
      are redesigned, since they store a virtual address pointer in a 32-bit
      field of the descriptors:
      
      drivers/net/ethernet/marvell/mvneta_bm.c: In function 'mvneta_bm_construct':
      drivers/net/ethernet/marvell/mvneta_bm.c:103:16: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
      drivers/net/ethernet/marvell/mvpp2.c: In function 'mvpp2_prs_vlan_init':
      drivers/net/ethernet/marvell/mvpp2.c:2563:32: error: large integer implicitly truncated to unsigned type [-Werror=overflow]
      
      This limits the COMPILE_TEST option for the two drivers again to
      only build them on 32-bit. This seems nicer than shutting up the
      warnings, in case we ever actually want to use them on 64-bit,
      as the warnings indicate which parts of the driver are currently
      broken there.
      
      Fixes: a0627f77 ("net: marvell: Allow drivers to be built with COMPILE_TEST")
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      06b37b65
  5. 19 11月, 2016 2 次提交
    • F
      net: marvell: Allow drivers to be built with COMPILE_TEST · a0627f77
      Florian Fainelli 提交于
      All Marvell Ethernet drivers actually build fine with COMPILE_TEST with
      a few warnings. We need to add a few HAS_DMA dependencies to fix linking
      failures on problematic architectures like m32r.
      Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a0627f77
    • J
      net: sky2: Fix shutdown crash · 06ba3b21
      Jeremy Linton 提交于
      The sky2 frequently crashes during machine shutdown with:
      
      sky2_get_stats+0x60/0x3d8 [sky2]
      dev_get_stats+0x68/0xd8
      rtnl_fill_stats+0x54/0x140
      rtnl_fill_ifinfo+0x46c/0xc68
      rtmsg_ifinfo_build_skb+0x7c/0xf0
      rtmsg_ifinfo.part.22+0x3c/0x70
      rtmsg_ifinfo+0x50/0x5c
      netdev_state_change+0x4c/0x58
      linkwatch_do_dev+0x50/0x88
      __linkwatch_run_queue+0x104/0x1a4
      linkwatch_event+0x30/0x3c
      process_one_work+0x140/0x3e0
      worker_thread+0x60/0x44c
      kthread+0xdc/0xf0
      ret_from_fork+0x10/0x50
      
      This is caused by the sky2 being called after it has been shutdown.
      A previous thread about this can be found here:
      
      https://lkml.org/lkml/2016/4/12/410
      
      An alternative fix is to assure that IFF_UP gets cleared by
      calling dev_close() during shutdown. This is similar to what the
      bnx2/tg3/xgene and maybe others are doing to assure that the driver
      isn't being called following _shutdown().
      Signed-off-by: NJeremy Linton <jeremy.linton@arm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      06ba3b21
  6. 17 11月, 2016 3 次提交
  7. 16 11月, 2016 1 次提交
  8. 02 11月, 2016 1 次提交
  9. 31 10月, 2016 2 次提交
  10. 30 10月, 2016 1 次提交
  11. 21 10月, 2016 1 次提交
    • J
      ethernet: use net core MTU range checking in more drivers · d894be57
      Jarod Wilson 提交于
      Somehow, I missed a healthy number of ethernet drivers in the last pass.
      Most of these drivers either were in need of an updated max_mtu to make
      jumbo frames possible to enable again. In a few cases, also setting a
      different min_mtu to match previous lower bounds. There are also a few
      drivers that had no upper bounds checking, so they're getting a brand new
      ETH_MAX_MTU that is identical to IP_MAX_MTU, but accessible by includes
      all ethernet and ethernet-like drivers all have already.
      
      acenic:
      - min_mtu = 0, max_mtu = 9000
      
      amazon/ena:
      - min_mtu = 128, max_mtu = adapter->max_mtu
      
      amd/xgbe:
      - min_mtu = 0, max_mtu = 9000
      
      sb1250:
      - min_mtu = 0, max_mtu = 1518
      
      cxgb3:
      - min_mtu = 81, max_mtu = 65535
      
      cxgb4:
      - min_mtu = 81, max_mtu = 9600
      
      cxgb4vf:
      - min_mtu = 81, max_mtu = 65535
      
      benet:
      - min_mtu = 256, max_mtu = 9000
      
      ibmveth:
      - min_mtu = 68, max_mtu = 65535
      
      ibmvnic:
      - min_mtu = adapter->min_mtu, max_mtu = adapter->max_mtu
      - remove now redundant ibmvnic_change_mtu
      
      jme:
      - min_mtu = 1280, max_mtu = 9202
      
      mv643xx_eth:
      - min_mtu = 64, max_mtu = 9500
      
      mlxsw:
      - min_mtu = 0, max_mtu = 65535
      - Basically bypassing the core checks, and instead relying on dynamic
        checks in the respective switch drivers' ndo_change_mtu functions
      
      ns83820:
      - min_mtu = 0
      - remove redundant ns83820_change_mtu, only checked for mtu > 1500
      
      netxen:
      - min_mtu = 0, max_mtu = 8000 (P2), max_mtu = 9600 (P3)
      
      qlge:
      - min_mtu = 1500, max_mtu = 9000
      - driver only supports setting mtu to 1500 or 9000, so the core check only
        rules out < 1500 and > 9000, qlge_change_mtu still needs to check that
        the value is 1500 or 9000
      
      qualcomm/emac:
      - min_mtu = 46, max_mtu = 9194
      
      xilinx_axienet:
      - min_mtu = 64, max_mtu = 9000
      
      Fixes: 61e84623 ("net: centralize net_device min/max MTU checking")
      CC: netdev@vger.kernel.org
      CC: Jes Sorensen <jes@trained-monkey.org>
      CC: Netanel Belgazal <netanel@annapurnalabs.com>
      CC: Tom Lendacky <thomas.lendacky@amd.com>
      CC: Santosh Raspatur <santosh@chelsio.com>
      CC: Hariprasad S <hariprasad@chelsio.com>
      CC: Sathya Perla <sathya.perla@broadcom.com>
      CC: Ajit Khaparde <ajit.khaparde@broadcom.com>
      CC: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
      CC: Somnath Kotur <somnath.kotur@broadcom.com>
      CC: Thomas Falcon <tlfalcon@linux.vnet.ibm.com>
      CC: John Allen <jallen@linux.vnet.ibm.com>
      CC: Guo-Fu Tseng <cooldavid@cooldavid.org>
      CC: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
      CC: Jiri Pirko <jiri@mellanox.com>
      CC: Ido Schimmel <idosch@mellanox.com>
      CC: Manish Chopra <manish.chopra@qlogic.com>
      CC: Sony Chacko <sony.chacko@qlogic.com>
      CC: Rajesh Borundia <rajesh.borundia@qlogic.com>
      CC: Timur Tabi <timur@codeaurora.org>
      CC: Anirudha Sarangi <anirudh@xilinx.com>
      CC: John Linn <John.Linn@xilinx.com>
      Signed-off-by: NJarod Wilson <jarod@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d894be57
  12. 18 10月, 2016 2 次提交
  13. 12 10月, 2016 2 次提交
  14. 03 10月, 2016 1 次提交
  15. 26 9月, 2016 1 次提交
    • B
      net: mvneta: mark symbols static where possible · 2dc0d2b4
      Baoyou Xie 提交于
      We get 2 warnings when building kernel with W=1:
      drivers/net/ethernet/marvell/mvneta.c:639:27: warning: no previous prototype for 'mvneta_get_stats64' [-Wmissing-prototypes]
      drivers/net/ethernet/marvell/mvneta.c:3529:5: warning: no previous prototype for 'mvneta_ethtool_set_link_ksettings' [-Wmissing-prototypes]
      
      In fact, these two functions are only used in the file in which they are
      declared and don't need a declaration, but can be made static.
      so this patch marks these functions with 'static'.
      Signed-off-by: NBaoyou Xie <baoyou.xie@linaro.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2dc0d2b4
  16. 13 9月, 2016 1 次提交
  17. 07 9月, 2016 1 次提交
  18. 02 9月, 2016 1 次提交
  19. 09 8月, 2016 2 次提交
  20. 02 8月, 2016 3 次提交
  21. 18 7月, 2016 2 次提交
  22. 09 7月, 2016 1 次提交
    • D
      net: mvneta: set real interrupt per packet for tx_done · 06708f81
      Dmitri Epshtein 提交于
      Commit aebea2ba ("net: mvneta: fix Tx interrupt delay") intended to
      set coalescing threshold to a value guaranteeing interrupt generation
      per each sent packet, so that buffers can be released with no delay.
      
      In fact setting threshold to '1' was wrong, because it causes interrupt
      every two packets. According to the documentation a reason behind it is
      following - interrupt occurs once sent buffers counter reaches a value,
      which is higher than one specified in MVNETA_TXQ_SIZE_REG(q). This
      behavior was confirmed during tests. Also when testing the SoC working
      as a NAS device, better performance was observed with int-per-packet,
      as it strongly depends on the fact that all transmitted packets are
      released immediately.
      
      This commit enables NETA controller work in interrupt per sent packet mode
      by setting coalescing threshold to 0.
      Signed-off-by: NDmitri Epshtein <dima@marvell.com>
      Signed-off-by: NMarcin Wojtas <mw@semihalf.com>
      Cc: <stable@vger.kernel.org> # v3.10+
      Fixes aebea2ba ("net: mvneta: fix Tx interrupt delay")
      Acked-by: NWilly Tarreau <w@1wt.eu>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      06708f81
  23. 01 7月, 2016 1 次提交
    • R
      net: mvneta: fix open() error cleanup · 3d8c4530
      Russell King - ARM Linux 提交于
      If mvneta_mdio_probe() fails, a kernel warning is triggered due to
      missing cleanup in the error path.  Add the necessary cleanup.
      
      ------------[ cut here ]------------
      WARNING: CPU: 1 PID: 281 at kernel/irq/manage.c:1814 __free_percpu_irq+0xfc/0x130
      percpu IRQ 38 still enabled on CPU0!
      Modules linked in: bnep bluetooth xhci_plat_hcd xhci_hcd marvell_cesa armada_thermal des_generic ehci_orion mcp3021 spi_orion sfp mdio_i2c evbug fuse
      CPU: 1 PID: 281 Comm: connmand Not tainted 4.7.0-rc2+ #53
      Hardware name: Marvell Armada 380/385 (Device Tree)
      Backtrace:
      [<c0013488>] (dump_backtrace) from [<c00137d0>] (show_stack+0x18/0x1c)
       r6:60010093 r5:ffffffff r4:00000000 r3:dc8ba500
      [<c00137b8>] (show_stack) from [<c02c6fe0>] (dump_stack+0xa4/0xdc)
      [<c02c6f3c>] (dump_stack) from [<c002d4ec>] (__warn+0xd8/0x104)
       r6:c081e6a0 r5:00000000 r4:edfe5d50 r3:dc8ba500
      [<c002d414>] (__warn) from [<c002d5d0>] (warn_slowpath_fmt+0x40/0x48)
       r10:a0010013 r8:c09356f8 r7:00000026 r6:ef11a260 r5:edd7b980 r4:ef11a200
      [<c002d594>] (warn_slowpath_fmt) from [<c008c8e0>] (__free_percpu_irq+0xfc/0x130)
       r3:00000026 r2:c081e7ac
      [<c008c7e4>] (__free_percpu_irq) from [<c008c95c>] (free_percpu_irq+0x48/0x74)
       r10:00008914 r8:00000000 r7:ffffffed r6:c09356f8 r5:00000026 r4:ef11a200
      [<c008c914>] (free_percpu_irq) from [<c043dd70>] (mvneta_open+0x118/0x134)
       r6:ffffffed r5:ef01e640 r4:ef01e000 r3:ef01e000
      [<c043dc58>] (mvneta_open) from [<c055f5b4>] (__dev_open+0xa4/0x108)
       r7:ef01e030 r6:c06ff3d8 r5:ffff9003 r4:ef01e000
      [<c055f510>] (__dev_open) from [<c055f844>] (__dev_change_flags+0x94/0x150)
       r7:00001002 r6:00000001 r5:ffff9003 r4:ef01e000
      [<c055f7b0>] (__dev_change_flags) from [<c055f938>] (dev_change_flags+0x20/0x50)
       r8:00000000 r7:c09334c8 r6:00001002 r5:00000148 r4:ef01e000 r3:00008914
      [<c055f918>] (dev_change_flags) from [<c05de044>] (devinet_ioctl+0x6f4/0x7e0)
       r8:00000000 r7:c09334c8 r6:00000000 r5:ee87200c r4:00000000 r3:00008914
      [<c05dd950>] (devinet_ioctl) from [<c05e0168>] (inet_ioctl+0x1b8/0x1c8)
       r10:beb4499c r9:edfe4000 r8:ecf13280 r7:c096cf00 r6:beb4499c r5:eef7c240
       r4:00008914
      [<c05dffb0>] (inet_ioctl) from [<c053c898>] (sock_ioctl+0x78/0x300)
      [<c053c820>] (sock_ioctl) from [<c0155ecc>] (do_vfs_ioctl+0x98/0xa60)
       r7:00000011 r6:00008914 r5:00000011 r4:c01568d0
      [<c0155e34>] (do_vfs_ioctl) from [<c01568d0>] (SyS_ioctl+0x3c/0x60)
       r10:00000000 r9:edfe4000 r8:beb4499c r7:00000011 r6:00008914 r5:ecf13280
       r4:ecf13280
      [<c0156894>] (SyS_ioctl) from [<c000fe60>] (ret_fast_syscall+0x0/0x1c)
       r8:c0010004 r7:00000036 r6:00000011 r5:000a2978 r4:00000000 r3:00009003
      ---[ end trace 711f625d5b04b3a7 ]---
      Signed-off-by: NRussell King <rmk+kernel@armlinux.org.uk>
      Tested-by: NJon Nettleton <jon@solid-run.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3d8c4530
  24. 29 6月, 2016 1 次提交