1. 01 6月, 2016 5 次提交
  2. 30 5月, 2016 2 次提交
  3. 27 5月, 2016 8 次提交
  4. 26 5月, 2016 11 次提交
    • E
      net/mlx4_en: get rid of private net_device_stats · f73a6f43
      Eric Dumazet 提交于
      We simply can use the standard net_device stats.
      
      We do not need to clear fields that are already 0.
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Cc: Willem de Bruijn <willemb@google.com>
      Cc: Eugenia Emantayev <eugenia@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f73a6f43
    • E
      net/mlx4_en: get rid of ret_stats · 9ed17db1
      Eric Dumazet 提交于
      mlx4 uses a private struct net_device_stats in a vain attempt
      to avoid races.
      
      This is buggy because multiple cpus could call mlx4_en_get_stats()
      at the same time, so ret_stats can not guarantee stable results.
      
      To fix this, we need to switch to ndo_get_stats64() as this
      method provides per-thread storage.
      
      This allows to reduce mlx4_en_priv bloat.
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Cc: Willem de Bruijn <willemb@google.com>
      Cc: Eugenia Emantayev <eugenia@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9ed17db1
    • E
      net/mlx4_en: clear some TX ring stats in mlx4_en_clear_stats() · 45acbac6
      Eric Dumazet 提交于
      mlx4_en_clear_stats() clears about everything but few TX ring
      fields are missing :
      - queue_stopped, wake_queue, tso_packets, xmit_more
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Cc: Willem de Bruijn <willemb@google.com>
      Cc: Eugenia Emantayev <eugenia@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      45acbac6
    • E
      net/mlx4_en: fix tx_dropped bug · 63a664b7
      Eric Dumazet 提交于
      1) mlx4_en_xmit() can increment priv->stats.tx_dropped, but this variable
      is overwritten in mlx4_en_DUMP_ETH_STATS().
      
      2) This increment was not SMP safe, as a port might have many TX queues.
      
      Add a per TX ring tx_dropped to fix these issues.
      
      This is u32 as mlx4_en_DUMP_ETH_STATS() will add a 32bit field.
      
      So lets avoid bugs with SNMP agents having to cope with partial
      overwraps. (One of these agents being bond_fold_stats())
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Reported-by: NWillem de Bruijn <willemb@google.com>
      Cc: Eugenia Emantayev <eugenia@mellanox.com>
      Acked-by: NAlexei Starovoitov <ast@kernel.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      63a664b7
    • M
      net: arc: trivial: Replace comma with a semicolon · 3424d9be
      Marek Vasut 提交于
      Fix a typo in the driver, replace comma with a semicolon at the end
      of statement. While using comma is a legal C here and probably does
      not even generate compiler warning, it was unlikely the intention.
      Signed-off-by: NMarek Vasut <marex@denx.de>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Caesar Wang <wxt@rock-chips.com>
      Cc: Heiko Stuebner <heiko@sntech.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3424d9be
    • M
      net: stmmac: Fix incorrect memcpy source memory · 643d60bf
      Marek Vasut 提交于
      The memcpy() currently copies mdio_bus_data into new_bus->irq, which
      makes no sense, since the mdio_bus_data structure contains more than
      just irqs. The code was likely supposed to copy mdio_bus_data->irqs
      into the new_bus->irq instead, so fix this.
      
      Fixes: e7f4dc35 ("mdio: Move allocation of interrupts into core")
      Signed-off-by: NMarek Vasut <marex@denx.de>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
      Cc: Alexandre Torgue <alexandre.torgue@st.com>
      Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      643d60bf
    • F
      net: alx: use custom skb allocator · 26c5f03b
      Feng Tang 提交于
      This patch follows Eric Dumazet's commit 7b701764 for Atheros
      atl1c driver to fix one exactly same bug in alx driver, that the
      network link will be lost in 1-5 minutes after the device is up.
      
      My laptop Lenovo Y580 with Atheros AR8161 ethernet device hit the
      same problem with kernel 4.4, and it will be cured by Jarod Wilson's
      commit c406700c for alx driver which get merged in 4.5. But there
      are still some alx devices can't function well even with Jarod's
      patch, while this patch could make them work fine. More details on
      	https://bugzilla.kernel.org/show_bug.cgi?id=70761
      
      The debug shows the issue is very likely to be related with the RX
      DMA address, specifically 0x...f80, if RX buffer get 0x...f80 several
      times, their will be RX overflow error and device will stop working.
      
      For kernel 4.5.0 with Jarod's patch which works fine with my
      AR8161/Lennov Y580, if I made some change to the
      	__netdev_alloc_skb
      		--> __alloc_page_frag()
      to make the allocated buffer can get an address with 0x...f80,
      then the same error happens. If I make it to 0x...f40 or 0x....fc0,
      everything will be still fine. So I tend to believe that the
      0x..f80 address cause the silicon to behave abnormally.
      
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=70761
      Cc: Eric Dumazet <edumazet@google.com>
      Cc: Johannes Berg <johannes@sipsolutions.net>
      Cc: Jarod Wilson <jarod@redhat.com>
      Signed-off-by: NFeng Tang <feng.tang@intel.com>
      Tested-by: NOle Lukoie <olelukoie@mail.ru>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      26c5f03b
    • I
      team: don't call netdev_change_features under team->lock · f6988cb6
      Ivan Vecera 提交于
      The team_device_event() notifier calls team_compute_features() to fix
      vlan_features under team->lock to protect team->port_list. The problem is
      that subsequent __team_compute_features() calls netdev_change_features()
      to propagate vlan_features to upper vlan devices while team->lock is still
      taken. This can lead to deadlock when NETIF_F_LRO is modified on lower
      devices or team device itself.
      
      Example:
      The team0 as active backup with eth0 and eth1 NICs. Both eth0 & eth1 are
      LRO capable and LRO is enabled. Thus LRO is also enabled on team0.
      
      The command 'ethtool -K team0 lro off' now hangs due to this deadlock:
      
      dev_ethtool()
      -> ethtool_set_features()
       -> __netdev_update_features(team)
        -> netdev_sync_lower_features()
         -> netdev_update_features(lower_1)
          -> __netdev_update_features(lower_1)
          -> netdev_features_change(lower_1)
           -> call_netdevice_notifiers(...)
            -> team_device_event(lower_1)
             -> team_compute_features(team) [TAKES team->lock]
              -> netdev_change_features(team)
               -> __netdev_update_features(team)
                -> netdev_sync_lower_features()
                 -> netdev_update_features(lower_2)
                  -> __netdev_update_features(lower_2)
                  -> netdev_features_change(lower_2)
                   -> call_netdevice_notifiers(...)
                    -> team_device_event(lower_2)
                     -> team_compute_features(team) [DEADLOCK]
      
      The bug is present in team from the beginning but it appeared after the commit
      fd867d51 (net/core: generic support for disabling netdev features down stack)
      that adds synchronization of features with lower devices.
      
      Fixes: fd867d51 (net/core: generic support for disabling netdev features down stack)
      Cc: Jiri Pirko <jiri@resnulli.us>
      Signed-off-by: NIvan Vecera <ivecera@redhat.com>
      Signed-off-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f6988cb6
    • E
      sfc: on MC reset, clear PIO buffer linkage in TXQs · c0795bf6
      Edward Cree 提交于
      Otherwise, if we fail to allocate new PIO buffers, our TXQs will try to
      use the old ones, which aren't there any more.
      
      Fixes: 183233be "sfc: Allocate and link PIO buffers; map them with write-combining"
      Signed-off-by: NEdward Cree <ecree@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c0795bf6
    • G
      net: mvneta: Fix lacking spinlock initialization · 91c45e38
      Gregory CLEMENT 提交于
      The spinlock used by the hwbm functions must be initialized by the
      network driver. This commit fixes this lack and the following erros when
      lockdep is enabled:
      
      INFO: trying to register non-static key.
      the code is fine but needs lockdep annotation.
      turning off the locking correctness validator.
      [<c010ff80>] (unwind_backtrace) from [<c010bd08>] (show_stack+0x10/0x14)
      [<c010bd08>] (show_stack) from [<c032913c>] (dump_stack+0xb4/0xe0)
      [<c032913c>] (dump_stack) from [<c01670e4>] (__lock_acquire+0x1f58/0x2060)
      [<c01670e4>] (__lock_acquire) from [<c0167dec>] (lock_acquire+0xa4/0xd0)
      [<c0167dec>] (lock_acquire) from [<c06f6650>] (_raw_spin_lock_irqsave+0x54/0x68)
      [<c06f6650>] (_raw_spin_lock_irqsave) from [<c058e830>] (hwbm_pool_add+0x1c/0xdc)
      [<c058e830>] (hwbm_pool_add) from [<c043f4e8>] (mvneta_bm_pool_use+0x338/0x490)
      [<c043f4e8>] (mvneta_bm_pool_use) from [<c0443198>] (mvneta_probe+0x654/0x1284)
      [<c0443198>] (mvneta_probe) from [<c03b894c>] (platform_drv_probe+0x4c/0xb0)
      [<c03b894c>] (platform_drv_probe) from [<c03b7158>] (driver_probe_device+0x214/0x2c0)
      [<c03b7158>] (driver_probe_device) from [<c03b72c4>] (__driver_attach+0xc0/0xc4)
      [<c03b72c4>] (__driver_attach) from [<c03b5440>] (bus_for_each_dev+0x68/0x9c)
      [<c03b5440>] (bus_for_each_dev) from [<c03b65b8>] (bus_add_driver+0x1a0/0x218)
      [<c03b65b8>] (bus_add_driver) from [<c03b79cc>] (driver_register+0x78/0xf8)
      [<c03b79cc>] (driver_register) from [<c01018f4>] (do_one_initcall+0x90/0x1dc)
      [<c01018f4>] (do_one_initcall) from [<c0900de4>] (kernel_init_freeable+0x15c/0x1fc)
      [<c0900de4>] (kernel_init_freeable) from [<c06eed90>] (kernel_init+0x8/0x114)
      [<c06eed90>] (kernel_init) from [<c0107910>] (ret_from_fork+0x14/0x24)
      
      Fixes: baa11ebc ("net: mvneta: Use the new hwbm framework")
      Reported-by: NRussell King <rmk+kernel@armlinux.org.uk>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NGregory CLEMENT <gregory.clement@free-electrons.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      91c45e38
    • S
      qed: Reset the enable flag for eth protocol. · ec7c7f5c
      Sudarsana Reddy Kalluru 提交于
      This patch fixes the coding error in determining the enable flag for
      the application/protocol. The enable flag should be set for all protocols
      but the eth.
      Signed-off-by: NSudarsana Reddy Kalluru <sudarsana.kalluru@qlogic.com>
      Signed-off-by: NYuval Mintz <Yuval.Mintz@qlogic.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ec7c7f5c
  5. 25 5月, 2016 1 次提交
    • G
      net/qlge: Avoids recursive EEH error · 3275c0c6
      Gavin Shan 提交于
      One timer, whose handler keeps reading on MMIO register for EEH
      core to detect error in time, is started when the PCI device driver
      is loaded. MMIO register can't be accessed during PE reset in EEH
      recovery. Otherwise, the unexpected recursive error is triggered.
      The timer isn't closed that time if the interface isn't brought
      up. So the unexpected recursive error is seen during EEH recovery
      when the interface is down.
      
      This avoids the unexpected recursive EEH error by closing the timer
      in qlge_io_error_detected() before EEH PE reset unconditionally. The
      timer is started unconditionally after EEH PE reset in qlge_io_resume().
      Also, the timer should be closed unconditionally when the device is
      removed from the system permanently in qlge_io_error_detected().
      Reported-by: NShriya R. Kulkarni <shriyakul@in.ibm.com>
      Signed-off-by: NGavin Shan <gwshan@linux.vnet.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3275c0c6
  6. 24 5月, 2016 3 次提交
  7. 21 5月, 2016 10 次提交