1. 29 8月, 2015 1 次提交
    • C
      r8169: Add software counter for multicast packages · d7d2d89d
      Corinna Vinschen 提交于
      The multicast hardware counter on 8168/8111 chips is only 32 bit while the
      statistics in struct rtnl_link_stats64 are 64 bit.  Given that statistics
      are requested on an irregular basis, an overflow of the hardware counter
      can go unnoticed.  To count even very large numbers of multicast packets
      reliably, add a software counter and remove previously applied code to
      fill the multicast field requested by @rtl8169_get_stats64 with the values
      read from the rx_multicast hardware counter.
      Signed-off-by: NCorinna Vinschen <vinschen@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d7d2d89d
  2. 28 8月, 2015 14 次提交
  3. 27 8月, 2015 14 次提交
  4. 26 8月, 2015 9 次提交
    • I
      drivers: net: xgene: fix: Oops in linkwatch_fire_event · ccc02ddb
      Iyappan Subramanian 提交于
      [ 1065.801569] Internal error: Oops: 96000006 [#1] SMP
      ...
      [ 1065.866655] Hardware name: AppliedMicro Mustang/Mustang, BIOS 1.1.0 Apr 22 2015
      [ 1065.873937] Workqueue: events_power_efficient phy_state_machine
      [ 1065.879837] task: fffffe01de105e80 ti: fffffe00bcf18000 task.ti: fffffe00bcf18000
      [ 1065.887288] PC is at linkwatch_fire_event+0xac/0xc0
      [ 1065.892141] LR is at linkwatch_fire_event+0xa0/0xc0
      [ 1065.896995] pc : [<fffffe000060284c>] lr : [<fffffe0000602840>] pstate: 200001c5
      [ 1065.904356] sp : fffffe00bcf1bd00
      ...
      [ 1066.196813] Call Trace:
      [ 1066.199248] [<fffffe000060284c>] linkwatch_fire_event+0xac/0xc0
      [ 1066.205140] [<fffffe000061167c>] netif_carrier_off+0x54/0x64
      [ 1066.210773] [<fffffe00004f1654>] phy_state_machine+0x120/0x3bc
      [ 1066.216578] [<fffffe00000d8d10>] process_one_work+0x15c/0x3a8
      [ 1066.222296] [<fffffe00000d9090>] worker_thread+0x134/0x470
      [ 1066.227757] [<fffffe00000df014>] kthread+0xe0/0xf8
      [ 1066.232525] Code: 97f65ee9 f9420660 d538d082 8b000042 (885f7c40)
      
      The fix is to call phy_disconnect() from xgene_enet_mdio_remove,
      which in turn call cancel_delayed_work_sync().
      Signed-off-by: NIyappan Subramanian <isubramanian@apm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ccc02ddb
    • R
      net: fec: use reinit_completion() in mdio accessor functions · aac27c7a
      Russell King 提交于
      Rather than re-initialising the entire completion on every mdio access,
      use reinit_completion() which only resets the completion count.  This
      avoids possible reinitialisation of the contained spinlock and waitqueue
      while they may be in use (eg, mid-completion.)
      
      Such an event could occur if there's a long delay in interrupt handling
      causing the mdio accessor to time out, then a second access comes in
      while the interrupt handler on a different CPU has called complete().
      Another scenario where this has been observed is while locking has
      been missing at the phy layer, allowing concurrent attempts to access
      the MDIO bus.
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      aac27c7a
    • G
      enic: reduce ioread in devcmd2 · dafc2199
      Govindarajulu Varadarajan 提交于
      posted_index is RO in firmware. We need not do ioread everytime to get
      posted index. Store posted index locally.
      Signed-off-by: NGovindarajulu Varadarajan <_govind@gmx.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      dafc2199
    • K
      net: compile renesas directory if NET_VENDOR_RENESAS is configured · 83bc805b
      Kazuya Mizuguchi 提交于
      Currently the renesas ethernet driver directory is compiled if SH_ETH is
      configured rather than NET_VENDOR_RENESAS. Although incorrect that was
      quite harmless as until recently as SH_ETH configured the only driver in
      the renesas directory. However, as of c156633f ("Renesas Ethernet AVB
      driver proper") the renesas directory includes another driver, configured
      by RAVB, and it makes little sense for it to have a hidden dependency on
      SH_ETH.
      Signed-off-by: NKazuya Mizuguchi <kazuya.mizuguchi.ks@renesas.com>
      [horms: rewrote changelog]
      Signed-off-by: NSimon Horman <horms+renesas@verge.net.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      83bc805b
    • C
      r8169: Add values missing in @get_stats64 from HW counters · 6e85d5ad
      Corinna Vinschen 提交于
      The r8169 driver collects statistical information returned by
      @get_stats64 by counting them in the driver itself, even though many
      (but not all) of the values are already collected by tally counters
      (TCs) in the NIC.  Some of these TC values are not returned by
      @get_stats64.  Especially the received multicast packages are missing
      from /proc/net/dev.
      
      Rectify this by fetching the TCs and returning them from
      rtl8169_get_stats64.
      
      The counters collected in the driver obviously disappear as soon as the
      driver is unloaded so after a driver is loaded the counters always start
      at 0. The TCs on the other hand are only reset by a power cycle.  Without
      further considerations the values collected by the driver would not match
      up against the TC values.
      
      This patch introduces a new function rtl8169_reset_counters which
      resets the TCs.  Also, since rtl8169_reset_counters shares most of
      its code with rtl8169_update_counters, refactor the shared code into
      two new functions  rtl8169_map_counters and rtl8169_unmap_counters.
      
      Unfortunately chip versions prior to RTL_GIGA_MAC_VER_19 don't allow
      to reset the TCs programatically.  Therefore introduce an addition to
      the rtl8169_private struct and a function rtl8169_init_counter_offsets
      to store the TCs at first rtl_open.  Use these values as offsets in
      rtl8169_get_stats64.  Propagate a failure to reset *and* update the
      counters up to rtl_open and emit a warning message, if so.
      Signed-off-by: NCorinna Vinschen <vinschen@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6e85d5ad
    • H
      net: sun4i-emac: Claim emac sram · 542a64c7
      Hans de Goede 提交于
      Claim the emac sram ourselves, rather then relying on the bootloader
      having mapped the sram to the emac controller during boot.
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      542a64c7
    • R
      net/mlx5e: Avoid accessing NULL pointer at ndo_select_queue · 5283af89
      Rana Shahout 提交于
      To avoid multiply/division operations on the data path,
      we hold a {channel, tc}==>txq mapping table.
      We held this mapping table inside the channel object that is
      being destroyed upon some configuration operations (e.g MTU change).
      So in case ndo_select_queue occurs during such a configuration operation,
      it may access a NULL channel pointer, resulting in kernel panic.
      To fix this issue we moved the {channel, tc}==>txq mapping table
      outside the channel object so that it will be available also
      during such configuration operations.
      Signed-off-by: NRana Shahout <ranas@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5283af89
    • J
      mlxsw: fix error return code · 5c121979
      Julia Lawall 提交于
      Return a negative error code on failure.
      
      A simplified version of the semantic match that finds this problem is as
      follows: (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @@
      identifier ret; expression e1,e2;
      @@
      (
      if (\(ret < 0\|ret != 0\))
       { ... return ret; }
      |
      ret = 0
      )
      ... when != ret = e1
          when != &ret
      *if(...)
      {
        ... when != ret = e2
            when forall
       return ret;
      }
      // </smpl>
      Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr>
      Acked-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5c121979
    • J
      net: davinci_emac: fix error return code · 1ef53ebf
      Julia Lawall 提交于
      Propagate error code on failure.
      
      A simplified version of the semantic match that finds this problem is as
      follows: (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @@
      identifier ret; expression e1,e2;
      @@
      (
      if (\(ret < 0\|ret != 0\))
       { ... return ret; }
      |
      ret = 0
      )
      ... when != ret = e1
          when != &ret
      *if(...)
      {
        ... when != ret = e2
            when forall
       return ret;
      }
      // </smpl>
      Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1ef53ebf
  5. 25 8月, 2015 1 次提交
  6. 24 8月, 2015 1 次提交
    • J
      net: bcmgenet: fix uncleaned dma flags · b6df7d61
      Jaedon Shin 提交于
      Clean the dma flags of multiq ring buffer int the interface stop
      process. This patch fixes that the genet is not running while the
      interface is re-enabled.
      
      $ ifup eth0 - running after booting
      $ ifdown eth0
      $ ifup eth0 - not running and occur tx_timeout
      
      The bcmgenet_dma_disable() in bcmgenet_open() do clean ring16 dma flag
      only. If the genet has multiq, the dma register is not cleaned. and
      bcmgenet_init_dma() is not done correctly. in case
      GENET_V2(tx_queues=4), tdma_ctrl has 0x1e after running
      bcmgenet_dma_disable().
      Signed-off-by: NJaedon Shin <jaedon.shin@gmail.com>
      Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b6df7d61