1. 25 8月, 2017 2 次提交
  2. 10 8月, 2017 1 次提交
  3. 16 6月, 2017 1 次提交
    • J
      networking: make skb_push & __skb_push return void pointers · d58ff351
      Johannes Berg 提交于
      It seems like a historic accident that these return unsigned char *,
      and in many places that means casts are required, more often than not.
      
      Make these functions return void * and remove all the casts across
      the tree, adding a (u8 *) cast only where the unsigned char pointer
      was used directly, all done with the following spatch:
      
          @@
          expression SKB, LEN;
          typedef u8;
          identifier fn = { skb_push, __skb_push, skb_push_rcsum };
          @@
          - *(fn(SKB, LEN))
          + *(u8 *)fn(SKB, LEN)
      
          @@
          expression E, SKB, LEN;
          identifier fn = { skb_push, __skb_push, skb_push_rcsum };
          type T;
          @@
          - E = ((T *)(fn(SKB, LEN)))
          + E = fn(SKB, LEN)
      
          @@
          expression SKB, LEN;
          identifier fn = { skb_push, __skb_push, skb_push_rcsum };
          @@
          - fn(SKB, LEN)[0]
          + *(u8 *)fn(SKB, LEN)
      
      Note that the last part there converts from push(...)[0] to the
      more idiomatic *(u8 *)push(...).
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d58ff351
  4. 02 6月, 2017 1 次提交
  5. 29 3月, 2017 1 次提交
  6. 25 3月, 2017 3 次提交
  7. 23 1月, 2017 2 次提交
    • F
      net: systemport: Add support for SYSTEMPORT Lite · 44a4524c
      Florian Fainelli 提交于
      Add supporf for the SYSTEMPORT Lite Ethernet controller, this piece of hardware
      is largely based on the full-blown SYSTEMPORT and differs in the following:
      
      - no full-blown UniMAC, instead we have the MagicPacket matching from UniMAC at
        same offset, and a GMII Interface Block (GIB) for the MAC-level stuff, since
        we are always interfaced to an Ethernet switch which is fully Ethernet compliant
        shortcuts could be made
      
      - 16 transmit queues, whose interrupts are moved into the first Level-2 interrupt
        controller bank
      
      - slight TDMA offset change (a register was inserted after TDMA_STATUS, *sigh*)
      
      - 256 RX descriptors (512 words) and 256 TX descriptors (not visible)
      
      As a consequence of these two things, update the code paths accordingly to
      differentiate the full-blown from the light version.
      Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      44a4524c
    • F
      net: systemport: Dynamically allocate number of TX rings · 7b78be48
      Florian Fainelli 提交于
      In preparation for adding SYSTEMPORT Lite, which has twice as less transmit
      queues than SYSTEMPORT make sure we do allocate TX rings based on the
      systemport,txq property to get an appropriate memory footprint.
      Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7b78be48
  8. 14 1月, 2017 1 次提交
  9. 05 1月, 2017 2 次提交
  10. 30 11月, 2016 1 次提交
  11. 01 9月, 2016 1 次提交
    • J
      net: systemport: constify ethtool_ops structures · c1ab0e9c
      Julia Lawall 提交于
      Check for ethtool_ops structures that are only stored in the ethtool_ops
      field of a net_device structure or passed as the second argument to
      netdev_set_default_ethtool_ops.  These contexts are declared const, so
      ethtool_ops structures that have these properties can be declared as const
      also.
      
      The semantic patch that makes this change is as follows:
      (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @r disable optional_qualifier@
      identifier i;
      position p;
      @@
      static struct ethtool_ops i@p = { ... };
      
      @ok1@
      identifier r.i;
      struct net_device e;
      position p;
      @@
      e.ethtool_ops = &i@p;
      
      @ok2@
      identifier r.i;
      expression e;
      position p;
      @@
      netdev_set_default_ethtool_ops(e, &i@p)
      
      @bad@
      position p != {r.p,ok1.p,ok2.p};
      identifier r.i;
      @@
      i@p
      
      @depends on !bad disable optional_qualifier@
      identifier r.i;
      @@
      static
      +const
       struct ethtool_ops i = { ... };
      // </smpl>
      Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c1ab0e9c
  12. 26 8月, 2016 1 次提交
  13. 02 7月, 2016 1 次提交
  14. 20 6月, 2016 2 次提交
  15. 05 5月, 2016 1 次提交
  16. 22 4月, 2016 2 次提交
  17. 19 11月, 2015 1 次提交
  18. 16 10月, 2015 1 次提交
  19. 22 9月, 2015 1 次提交
  20. 01 8月, 2015 1 次提交
  21. 10 7月, 2015 1 次提交
  22. 31 5月, 2015 3 次提交
  23. 13 5月, 2015 2 次提交
  24. 02 3月, 2015 1 次提交
    • F
      net: systemport: fix software maintained statistics · 55ff4ea9
      Florian Fainelli 提交于
      Commit 60b4ea17 ("net: systemport: log RX buffer allocation and RX/TX DMA
      failures") added a few software maintained statistics using
      BCM_SYSPORT_STAT_MIB_RX and BCM_SYSPORT_STAT_MIB_TX. These statistics are read
      from the hardware MIB counters, such that bcm_sysport_update_mib_counters() was
      trying to read from a non-existing MIB offset for these counters.
      
      Fix this by introducing a special type: BCM_SYSPORT_STAT_SOFT, similar to
      BCM_SYSPORT_STAT_NETDEV, such that bcm_sysport_get_ethtool_stats will read from
      the software mib.
      
      Fixes: 60b4ea17 ("net: systemport: log RX buffer allocation and RX/TX DMA failures")
      Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      55ff4ea9
  25. 10 12月, 2014 1 次提交
  26. 22 11月, 2014 1 次提交
  27. 13 11月, 2014 1 次提交
  28. 02 11月, 2014 2 次提交
  29. 29 10月, 2014 1 次提交
    • F
      net: systemport: reset UniMAC coming out of a suspend cycle · 704d33e7
      Florian Fainelli 提交于
      bcm_sysport_resume() was missing an UniMAC reset which can lead to
      various receive FIFO corruptions coming out of a suspend cycle. If the
      RX FIFO is stuck, it will deliver corrupted/duplicate packets towards
      the host CPU interface.
      
      This could be reproduced on crowded network and when Wake-on-LAN is
      enabled for this particular interface because the switch still forwards
      packets towards the host CPU interface (SYSTEMPORT), and we had to leave
      the UniMAC RX enable bit on to allow matching MagicPackets.
      
      Once we re-enter the resume function, there is a small window during
      which the UniMAC receive is still enabled, and we start queueing
      packets, but the RDMA and RBUF engines are not ready, which leads to
      having packets stuck in the UniMAC RX FIFO, ultimately delivered towards
      the host CPU as corrupted.
      
      Fixes: 40755a0f ("net: systemport: add suspend and resume support")
      Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      704d33e7