1. 15 2月, 2013 5 次提交
    • C
      gianfar: Remove wrong buffer size conditioning to VLAN h/w offload · 13f228da
      Claudiu Manoil 提交于
      The controller's ref manual states clearly that when the hw Rx vlan
      offload feature is enabled, meaning that the VLEX bit from RCTRL is
      correctly enabled, then the hw performs automatic VLAN tag extraction
      and deletion from the ethernet frames. So there's no point in trying to
      increase the rx buff size when rxvlan is on, as the frame is actually
      smaller.
      And the Tx vlan hw accel feature (VLINS) has nothing to do with rx buff
      size computation.
      Signed-off-by: NClaudiu Manoil <claudiu.manoil@freescale.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      13f228da
    • C
      gianfar: gfar_process_frame returns void · 61db26c6
      Claudiu Manoil 提交于
      No return code is expected from gfar_process_frame(), hence
      change it to return void.
      Signed-off-by: NClaudiu Manoil <claudiu.manoil@freescale.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      61db26c6
    • C
      gianfar: GRO_DROP is unlikely · bd9e89f2
      Claudiu Manoil 提交于
      The change is significant since it affects the rx hot path.
      Paul observed and documented the effects at asm level, see
      below:
      
      "It turns out that it does make a difference, since gfar_process_frame
      gets inlined, and so the increment code gets moved out of line (I have
      marked the if statment with * and the increment code within "-----"):
      
        ------------------------- as is currently ------------------
           4d14:       80 61 00 18     lwz     r3,24(r1)
           4d18:       7f c4 f3 78     mr      r4,r30
           4d1c:       48 00 00 01     bl      4d1c <gfar_clean_rx_ring+0x10c>
        *  4d20:       2f 83 00 04     cmpwi   cr7,r3,4
           4d24:       40 9e 00 1c     bne-    cr7,4d40
      <gfar_clean_rx_ring+0x130>
              ----------------------------
           4d28:       81 3c 01 f8     lwz     r9,504(r28)
           4d2c:       81 5c 01 fc     lwz     r10,508(r28)
           4d30:       31 4a 00 01     addic   r10,r10,1
           4d34:       7d 29 01 94     addze   r9,r9
           4d38:       91 3c 01 f8     stw     r9,504(r28)
           4d3c:       91 5c 01 fc     stw     r10,508(r28)
              ----------------------------
           4d40:       a0 1f 00 24     lhz     r0,36(r31)
           4d44:       81 3f 00 00     lwz     r9,0(r31)
           4d48:       7f a4 eb 78     mr      r4,r29
           4d4c:       7f e3 fb 78     mr      r3,r31
      
        -------------------------- unlikely ------------------------
           4d14:       80 61 00 18     lwz     r3,24(r1)
           4d18:       7f c4 f3 78     mr      r4,r30
           4d1c:       48 00 00 01     bl      4d1c <gfar_clean_rx_ring+0x10c>
        *  4d20:       2f 83 00 04     cmpwi   cr7,r3,4
           4d24:       41 9e 03 94     beq-    cr7,50b8
      <gfar_clean_rx_ring+0x4a8>
           4d28:       a0 1f 00 24     lhz     r0,36(r31)
           4d2c:       81 3f 00 00     lwz     r9,0(r31)
           4d30:       7f a4 eb 78     mr      r4,r29
           4d34:       7f e3 fb 78     mr      r3,r31
      [...]
           50b8:       81 3c 01 f8     lwz     r9,504(r28)
           50bc:       81 5c 01 fc     lwz     r10,508(r28)
           50c0:       31 4a 00 01     addic   r10,r10,1
           50c4:       7d 29 01 94     addze   r9,r9
           50c8:       91 3c 01 f8     stw     r9,504(r28)
           50cc:       91 5c 01 fc     stw     r10,508(r28)
           50d0:       4b ff fc 58     b       4d28 <gfar_clean_rx_ring+0x118>
      
      So, the increment does actually get moved ~1k away."
      
      Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: NClaudiu Manoil <claudiu.manoil@freescale.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bd9e89f2
    • C
      gianfar: Add device ref (dev) in gfar_private · 369ec162
      Claudiu Manoil 提交于
      Use device pointer (dev) to simplify the code and to
      avoid double indirections, especially on the hot path.
      
      Basically, instead of accessing priv to get the ofdev
      reference and then accessing the ofdev structure to
      dereference the needed dev pointer, we will get the
      dev pointer directly from priv.
      
      The dev pointer is required on the hot path, see gfar_new_rxbdp
      or gfar_clean_rx_ring (or xmit), and this patch makes
      it available directly from priv's 1st cacheline.
      
      This change is reflected at asm level too, taking (the hot)
      gfar_new_rxbdp():
      initial version -
          18c0:	7c 7e 1b 78 	mr      r30,r3
      
          18d0:	81 69 04 3c 	lwz     r11,1084(r9)
      
          18d8:	34 6b 00 10 	addic.  r3,r11,16
          18dc:	41 82 00 08 	beq-    18e4
      
      patched version -
          18d0:	80 69 04 38 	lwz     r3,1080(r9)
      
          18d8:	2f 83 00 00 	cmpwi   cr7,r3,0
          18dc:	41 9e 00 08 	beq-    cr7,18e4
      Signed-off-by: NClaudiu Manoil <claudiu.manoil@freescale.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      369ec162
    • C
      gianfar: Remove unused device_node ref in gfar_private · 41a20609
      Claudiu Manoil 提交于
      Remove unused device node pointer.
      Remove duplicated SET_NETDEV_DEV().
      Signed-off-by: NClaudiu Manoil <claudiu.manoil@freescale.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      41a20609
  2. 13 2月, 2013 1 次提交
    • P
      gianfar: convert u64 status counters to atomic64_t · 212079df
      Paul Gortmaker 提交于
      While looking at some asm dump for an unrelated change, Eric
      noticed in the following stats count increment code:
      
          50b8:       81 3c 01 f8     lwz     r9,504(r28)
          50bc:       81 5c 01 fc     lwz     r10,508(r28)
          50c0:       31 4a 00 01     addic   r10,r10,1
          50c4:       7d 29 01 94     addze   r9,r9
          50c8:       91 3c 01 f8     stw     r9,504(r28)
          50cc:       91 5c 01 fc     stw     r10,508(r28)
      
      that a 64 bit counter was used on ppc-32 without sync
      and hence the "ethtool -S" output was racy.
      
      Here we convert all the values to use atomic64_t so that
      the output will always be consistent.
      Reported-by: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      212079df
  3. 09 2月, 2013 1 次提交
  4. 05 2月, 2013 1 次提交
    • P
      gianfar: dont conditionally alloc Rx/Err irq structs · 7c1e7e99
      Paul Gortmaker 提交于
      Commit ee873fda
      
          "gianfar: Pack struct gfar_priv_grp into three cachelines"
      
      causes the following null dereference at driver init on sbc8548:
      
         libphy: Freescale PowerQUICC MII Bus: probed
         Unable to handle kernel paging request for data at address 0x00000000
         Faulting instruction address: 0xc01d6a38
         Oops: Kernel access of bad area, sig: 11 [#1]
         [...]
         NIP [c01d6a38] gfar_parse_group+0x228/0x280
         LR [c01d6a34] gfar_parse_group+0x224/0x280
         Call Trace:
         [ef82dd60] [c01d6a34] gfar_parse_group+0x224/0x280 (unreliable)
         [ef82dd90] [c01d73a4] gfar_probe+0x284/0xfe0
      
      The reason is that the commit also changed the allocation of the
      Rx and error handling irq structs to be skipped for !MQ_MG_MODE.
      In the !MQ_MG_MODE case, only the Tx irq struct is allocated.
      
      Digging further, we see that MQ_MG_MODE is set only if we find
      the OF compatible string "fsl,etsec2".
      
      A quick grep in the dts directory shows lots of boards that support
      Rx/Tx/Err, but without this specific compat string.  And hence they
      go after the unallocated Rx/Error structs and cause the above oops.
      
      Hence such a change can not be deployed until all the dts files
      are updated and sufficiently deployed.  Further, the optimization
      is of limited value, since the kmalloc'd struct in question has only
      a single unsigned int, and an (IFNAMSIZ + 6) sized string.
      
      Note that no changes to the freeing code are needed here, as it
      already did an unconditional free of Rx/Tx/Error gfar_irqinfo.
      
      Cc: Claudiu Manoil <claudiu.manoil@freescale.com>
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7c1e7e99
  5. 30 1月, 2013 2 次提交
  6. 24 1月, 2013 1 次提交
  7. 10 11月, 2012 2 次提交
  8. 07 10月, 2012 1 次提交
    • E
      net: remove skb recycling · acb600de
      Eric Dumazet 提交于
      Over time, skb recycling infrastructure got litle interest and
      many bugs. Generic rx path skb allocation is now using page
      fragments for efficient GRO / TCP coalescing, and recyling
      a tx skb for rx path is not worth the pain.
      
      Last identified bug is that fat skbs can be recycled
      and it can endup using high order pages after few iterations.
      
      With help from Maxime Bizon, who pointed out that commit
      87151b86 (net: allow pskb_expand_head() to get maximum tailroom)
      introduced this regression for recycled skbs.
      
      Instead of fixing this bug, lets remove skb recycling.
      
      Drivers wanting really hot skbs should use build_skb() anyway,
      to allocate/populate sk_buff right before netif_receive_skb()
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Cc: Maxime Bizon <mbizon@freebox.fr>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      acb600de
  9. 25 9月, 2012 1 次提交
    • C
      gianfar: Change default HW Tx queue scheduling mode · b98b8bab
      Claudiu Manoil 提交于
      This is primarily to address transmission timeout occurrences, when
      multiple H/W Tx queues are being used concurrently. Because in
      the priority scheduling mode the controller does not service the
      Tx queues equally (but in ascending index order), Tx timeouts are
      being triggered rightaway for a basic test with multiple simultaneous
      connections like:
      iperf -c <server_ip> -n 100M -P 8
      
      resulting in kernel trace:
      NETDEV WATCHDOG: eth1 (fsl-gianfar): transmit queue <X> timed out
      ------------[ cut here ]------------
      WARNING: at net/sched/sch_generic.c:255
      ...
      and controller reset during intense traffic, and possibly further
      complications.
      
      This patch changes the default H/W Tx scheduling setting (TXSCHED)
      for multi-queue devices, from priority scheduling mode to a weighted
      round robin mode with equal weights for all H/W Tx queues, and
      addresses the issue above.
      Signed-off-by: NClaudiu Manoil <claudiu.manoil@freescale.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b98b8bab
  10. 31 8月, 2012 2 次提交
  11. 10 7月, 2012 1 次提交
  12. 29 6月, 2012 1 次提交
  13. 06 6月, 2012 4 次提交
  14. 23 5月, 2012 1 次提交
  15. 22 4月, 2012 1 次提交
  16. 26 3月, 2012 1 次提交
  17. 19 3月, 2012 1 次提交
  18. 16 3月, 2012 2 次提交
  19. 31 1月, 2012 1 次提交
  20. 13 1月, 2012 2 次提交
  21. 29 11月, 2011 1 次提交
    • A
      net/ethernet: convert drivers/net/ethernet/* to use module_platform_driver() · db62f684
      Axel Lin 提交于
      This patch converts the drivers in drivers/net/ethernet/* to use the
      module_platform_driver() macro which makes the code smaller and a bit
      simpler.
      
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Pantelis Antoniou <pantelis.antoniou@gmail.com>
      Cc: Vitaly Bordug <vbordug@ru.mvista.com>
      Cc: Wan ZongShun <mcuos.com@gmail.com>
      Cc: Nicolas Pitre <nico@fluxnic.net>
      Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
      Cc: Marc Kleine-Budde <mkl@pengutronix.de>
      Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
      Cc: Jiri Pirko <jpirko@redhat.com>
      Cc: Daniel Hellstrom <daniel@gaisler.com>
      Cc: Alexey Dobriyan <adobriyan@gmail.com>
      Cc: Tobias Klauser <tklauser@distanz.ch>
      Cc: Grant Likely <grant.likely@secretlab.ca>
      Cc: Jiri Kosina <jkosina@suse.cz>
      Cc: Richard Cochran <richard.cochran@omicron.at>
      Cc: Jonas Bonn <jonas@southpole.se>
      Cc: Sebastian Poehn <sebastian.poehn@belden.com>
      Cc: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
      Cc: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
      Cc: "Michał Mirosław" <mirq-linux@rere.qmqm.pl>
      Signed-off-by: NAxel Lin <axel.lin@gmail.com>
      Acked-by: NWan ZongShun <mcuos.com@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      db62f684
  22. 17 11月, 2011 2 次提交
  23. 31 8月, 2011 1 次提交
  24. 18 8月, 2011 1 次提交
  25. 12 8月, 2011 1 次提交
    • J
      freescale: Move the Freescale drivers · ec21e2ec
      Jeff Kirsher 提交于
      Move the Freescale drivers into drivers/net/ethernet/freescale/ and
      make the necessary Kconfig and Makefile changes.
      
      CC: Sandeep Gopalpet <sandeep.kumar@freescale.com>
      CC: Andy Fleming <afleming@freescale.com>
      CC: Shlomi Gridish <gridish@freescale.com>
      CC: Li Yang <leoli@freescale.com>
      CC: Pantelis Antoniou <pantelis.antoniou@gmail.com>
      CC: Vitaly Bordug <vbordug@ru.mvista.com>
      CC: Dan Malek <dmalek@jlc.net>
      CC: Sylvain Munaut <tnt@246tNt.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      ec21e2ec
  26. 28 7月, 2011 1 次提交
  27. 22 7月, 2011 1 次提交