1. 03 1月, 2018 5 次提交
  2. 21 12月, 2017 3 次提交
  3. 14 11月, 2017 1 次提交
    • S
      net: mvneta: fix handling of the Tx descriptor counter · 0d63785c
      Simon Guinot 提交于
      The mvneta controller provides a 8-bit register to update the pending
      Tx descriptor counter. Then, a maximum of 255 Tx descriptors can be
      added at once. In the current code the mvneta_txq_pend_desc_add function
      assumes the caller takes care of this limit. But it is not the case. In
      some situations (xmit_more flag), more than 255 descriptors are added.
      When this happens, the Tx descriptor counter register is updated with a
      wrong value, which breaks the whole Tx queue management.
      
      This patch fixes the issue by allowing the mvneta_txq_pend_desc_add
      function to process more than 255 Tx descriptors.
      
      Fixes: 2a90f7e1 ("net: mvneta: add xmit_more support")
      Cc: stable@vger.kernel.org # 4.11+
      Signed-off-by: NSimon Guinot <simon.guinot@sequanux.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0d63785c
  4. 02 9月, 2017 1 次提交
  5. 24 8月, 2017 1 次提交
  6. 16 6月, 2017 1 次提交
    • J
      networking: introduce and use skb_put_data() · 59ae1d12
      Johannes Berg 提交于
      A common pattern with skb_put() is to just want to memcpy()
      some data into the new space, introduce skb_put_data() for
      this.
      
      An spatch similar to the one for skb_put_zero() converts many
      of the places using it:
      
          @@
          identifier p, p2;
          expression len, skb, data;
          type t, t2;
          @@
          (
          -p = skb_put(skb, len);
          +p = skb_put_data(skb, data, len);
          |
          -p = (t)skb_put(skb, len);
          +p = skb_put_data(skb, data, len);
          )
          (
          p2 = (t2)p;
          -memcpy(p2, data, len);
          |
          -memcpy(p, data, len);
          )
      
          @@
          type t, t2;
          identifier p, p2;
          expression skb, data;
          @@
          t *p;
          ...
          (
          -p = skb_put(skb, sizeof(t));
          +p = skb_put_data(skb, data, sizeof(t));
          |
          -p = (t *)skb_put(skb, sizeof(t));
          +p = skb_put_data(skb, data, sizeof(t));
          )
          (
          p2 = (t2)p;
          -memcpy(p2, data, sizeof(*p));
          |
          -memcpy(p, data, sizeof(*p));
          )
      
          @@
          expression skb, len, data;
          @@
          -memcpy(skb_put(skb, len), data, len);
          +skb_put_data(skb, data, len);
      
      (again, manually post-processed to retain some comments)
      Reviewed-by: NStephen Hemminger <stephen@networkplumber.org>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      59ae1d12
  7. 19 4月, 2017 4 次提交
  8. 18 4月, 2017 1 次提交
    • J
      net: mvneta: fix failed to suspend if WOL is enabled · 82960fff
      Jisheng Zhang 提交于
      Recently, suspend/resume and WOL support are added into mvneta driver.
      If we enable WOL, then we get some error as below on Marvell BG4CT
      platforms during suspend:
      
      [  184.149723] dpm_run_callback(): mdio_bus_suspend+0x0/0x50 returns -16
      [  184.149727] PM: Device f7b62004.mdio-mi:00 failed to suspend: error -16
      
      -16 means -EBUSY, phy_suspend() will return -EBUSY if it finds the
      device has WOL enabled.
      
      We fix this issue by properly setting the netdev's power.can_wakeup
      and power.wakeup, i.e
      
      1. in mvneta_mdio_probe(), call device_set_wakeup_capable() to set
      power.can_wakeup if the phy support WOL.
      
      2. in mvneta_ethtool_set_wol(), call device_set_wakeup_enable() to
      set power.wakeup if WOL has been successfully enabled in phy.
      Signed-off-by: NJisheng Zhang <jszhang@marvell.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      82960fff
  9. 30 3月, 2017 2 次提交
  10. 17 3月, 2017 1 次提交
  11. 18 2月, 2017 1 次提交
  12. 11 2月, 2017 1 次提交
  13. 06 2月, 2017 1 次提交
  14. 31 1月, 2017 1 次提交
  15. 17 1月, 2017 2 次提交
    • M
      net: mvneta: add BQL support · a29b6235
      Marcin Wojtas 提交于
      Tests showed that when whole bandwidth is consumed, the latency for
      various kind of traffic can reach high values. With saturated
      link (e.g. with iperf from target to host) simple ping could take
      significant amount of time. BQL proved to improve this situation
      when implemented in mvneta driver. Measurements of ping latency
      for 3 link speeds:
      Speed | Latency w/o BQL | Latency with BQL
      10    |      7-14 ms    |     3.5 ms
      100   |      2-12 ms    |     0.6 ms
      1000  |   often timeout |   up to 2ms
      
      Decreasing latency as above result in sligt performance cost - 4kpps
      (-1.4%) when pushing 64B packets via two bridged interfaces of Armada 38x.
      For 1500B packets in the same setup, the mpstat tool showed +8% of
      CPU occupation (default affinity, second CPU idle). Even though this
      cost seems reasonable to take, considering other improvements.
      
      This commit adds byte queue limit mechanism for the mvneta driver.
      Signed-off-by: NMarcin Wojtas <mw@semihalf.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a29b6235
    • S
      net: mvneta: add xmit_more support · 2a90f7e1
      Simon Guinot 提交于
      Basing on xmit_more flag of the skb, TX descriptors can be concatenated
      before flushing. This commit delay Tx descriptor flush if the queue is
      running and if there is more skb's to send.
      
      A maximum allowed number of descriptors for flushing at once due to
      MVNETA_TXQ_UPDATE_REG(q) reqisters limitation, is 255. Because of that
      a new macro was added (MVNETA_TXQ_DEC_SENT_MASK) in order to ensure that
      concatenated amount of descriptor does not exceed that value.
      Signed-off-by: NSimon Guinot <simon.guinot@sequanux.org>
      Signed-off-by: NMarcin Wojtas <mw@semihalf.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2a90f7e1
  16. 09 1月, 2017 1 次提交
  17. 09 12月, 2016 1 次提交
  18. 03 12月, 2016 5 次提交
  19. 30 11月, 2016 1 次提交
  20. 26 11月, 2016 1 次提交
  21. 17 11月, 2016 1 次提交
  22. 18 10月, 2016 1 次提交
    • J
      ethernet/marvell: use core min/max MTU checking · 5777987e
      Jarod Wilson 提交于
      mvneta: min_mtu 68, max_mtu 9676
      - mtu validation routine mostly did range check, merge back into
        mvneta_change_mtu for simplicity
      
      mvpp2: min_mtu 68, max_mtu 9676
      - mtu validation routine mostly did range check, merge back into
        mvpp2_change_mtu for simplicity
      
      pxa168_eth: min_mtu 68, max_mtu 9500
      
      skge: min_mtu 60, max_mtu 9000
      
      sky2: min_mtu 68, max_mtu 1500 or 9000, depending on hw
      
      CC: netdev@vger.kernel.org
      CC: Mirko Lindner <mlindner@marvell.com>
      CC: Stephen Hemminger <stephen@networkplumber.org>
      CC: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Signed-off-by: NJarod Wilson <jarod@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5777987e
  23. 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
  24. 07 9月, 2016 1 次提交
  25. 09 8月, 2016 1 次提交