1. 25 4月, 2013 1 次提交
  2. 19 4月, 2013 1 次提交
  3. 17 4月, 2013 1 次提交
  4. 15 4月, 2013 1 次提交
  5. 14 4月, 2013 1 次提交
  6. 13 4月, 2013 1 次提交
  7. 03 4月, 2013 1 次提交
    • G
      net/freescale/fec: Simplify OF dependencies · 6c5f7808
      Guenter Roeck 提交于
      Since of_get_mac_address() is now defined even if CONFIG_OF_NET
      is not configured, the ifdef around the code calling it is no longer
      necessary and can be removed.
      
      Similar, since of_get_phy_mode() is now defined as dummy function
      if OF_NET is not configured, it is no longer necessary to provide
      an OF dependent function as front-end. Also, the function depends
      on OF_NET, not on OF, so the conditional code was not correct anyway.
      Drop the front-end function and call of_get_phy_mode() directly.
      Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6c5f7808
  8. 27 3月, 2013 1 次提交
  9. 26 3月, 2013 1 次提交
  10. 21 3月, 2013 2 次提交
  11. 15 3月, 2013 3 次提交
  12. 12 3月, 2013 2 次提交
  13. 10 3月, 2013 1 次提交
  14. 05 3月, 2013 1 次提交
    • F
      net: fec: put tx to napi poll function to fix dead lock · de5fb0a0
      Frank Li 提交于
      up stack ndo_start_xmit already hold lock.
      fec_enet_start_xmit needn't spin lock.
      stat_xmit just update fep->cur_tx
      fec_enet_tx just update fep->dirty_tx
      
      Reserve a empty bdb to check full or empty
      cur_tx == dirty_tx    means full
      cur_tx == dirty_tx +1 means empty
      
      So needn't is_full variable.
      
      Fix spin lock deadlock
      
      =================================
      [ INFO: inconsistent lock state ]
      3.8.0-rc5+ #107 Not tainted
      ---------------------------------
      inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage.
      ptp4l/615 [HC1[1]:SC0[0]:HE0:SE1] takes:
       (&(&list->lock)->rlock#3){?.-...}, at: [<8042c3c4>] skb_queue_tail+0x20/0x50
       {HARDIRQ-ON-W} state was registered at:
       [<80067250>] mark_lock+0x154/0x4e8
       [<800676f4>] mark_irqflags+0x110/0x1a4
       [<80069208>] __lock_acquire+0x494/0x9c0
       [<80069ce8>] lock_acquire+0x90/0xa4
       [<80527ad0>] _raw_spin_lock_bh+0x44/0x54
       [<804877e0>] first_packet_length+0x38/0x1f0
       [<804879e4>] udp_poll+0x4c/0x5c
       [<804231f8>] sock_poll+0x24/0x28
       [<800d27f0>] do_poll.isra.10+0x120/0x254
       [<800d36e4>] do_sys_poll+0x15c/0x1e8
       [<800d3828>] sys_poll+0x60/0xc8
       [<8000e780>] ret_fast_syscall+0x0/0x3c
      
       *** DEADLOCK ***
      
       1 lock held by ptp4l/615:
        #0:  (&(&fep->hw_lock)->rlock){-.-...}, at: [<80355f9c>] fec_enet_tx+0x24/0x268
        stack backtrace:
        Backtrace:
        [<800121e0>] (dump_backtrace+0x0/0x10c) from [<80516210>] (dump_stack+0x18/0x1c)
        r6:8063b1fc r5:bf38b2f8 r4:bf38b000 r3:bf38b000
        [<805161f8>] (dump_stack+0x0/0x1c) from [<805189d0>] (print_usage_bug.part.34+0x164/0x1a4)
        [<8051886c>] (print_usage_bug.part.34+0x0/0x1a4) from [<80518a88>] (print_usage_bug+0x78/0x88)
        r8:80065664 r7:bf38b2f8 r6:00000002 r5:00000000 r4:bf38b000
        [<80518a10>] (print_usage_bug+0x0/0x88) from [<80518b58>] (mark_lock_irq+0xc0/0x270)
        r7:bf38b000 r6:00000002 r5:bf38b2f8 r4:00000000
        [<80518a98>] (mark_lock_irq+0x0/0x270) from [<80067270>] (mark_lock+0x174/0x4e8)
        [<800670fc>] (mark_lock+0x0/0x4e8) from [<80067744>] (mark_irqflags+0x160/0x1a4)
        [<800675e4>] (mark_irqflags+0x0/0x1a4) from [<80069208>] (__lock_acquire+0x494/0x9c0)
        r5:00000002 r4:bf38b2f8
        [<80068d74>] (__lock_acquire+0x0/0x9c0) from [<80069ce8>] (lock_acquire+0x90/0xa4)
        [<80069c58>] (lock_acquire+0x0/0xa4) from [<805278d8>] (_raw_spin_lock_irqsave+0x4c/0x60)
        [<8052788c>] (_raw_spin_lock_irqsave+0x0/0x60) from [<8042c3c4>] (skb_queue_tail+0x20/0x50)
        r6:bfbb2180 r5:bf1d0190 r4:bf1d0184
        [<8042c3a4>] (skb_queue_tail+0x0/0x50) from [<8042c4cc>] (sock_queue_err_skb+0xd8/0x188)
        r6:00000056 r5:bfbb2180 r4:bf1d0000 r3:00000000
        [<8042c3f4>] (sock_queue_err_skb+0x0/0x188) from [<8042d15c>] (skb_tstamp_tx+0x70/0xa0)
        r6:bf0dddb0 r5:bf1d0000 r4:bfbb2180 r3:00000004
        [<8042d0ec>] (skb_tstamp_tx+0x0/0xa0) from [<803561d0>] (fec_enet_tx+0x258/0x268)
        r6:c089d260 r5:00001c00 r4:bfbd0000
        [<80355f78>] (fec_enet_tx+0x0/0x268) from [<803562cc>] (fec_enet_interrupt+0xec/0xf8)
        [<803561e0>] (fec_enet_interrupt+0x0/0xf8) from [<8007d5b0>] (handle_irq_event_percpu+0x54/0x1a0)
        [<8007d55c>] (handle_irq_event_percpu+0x0/0x1a0) from [<8007d740>] (handle_irq_event+0x44/0x64)
        [<8007d6fc>] (handle_irq_event+0x0/0x64) from [<80080690>] (handle_fasteoi_irq+0xc4/0x15c)
        r6:bf0dc000 r5:bf811290 r4:bf811240 r3:00000000
        [<800805cc>] (handle_fasteoi_irq+0x0/0x15c) from [<8007ceec>] (generic_handle_irq+0x28/0x38)
        r5:807130c8 r4:00000096
        [<8007cec4>] (generic_handle_irq+0x0/0x38) from [<8000f16c>] (handle_IRQ+0x54/0xb4)
        r4:8071d280 r3:00000180
        [<8000f118>] (handle_IRQ+0x0/0xb4) from [<80008544>] (gic_handle_irq+0x30/0x64)
        r8:8000e924 r7:f4000100 r6:bf0ddef8 r5:8071c974 r4:f400010c
        r3:00000000
        [<80008514>] (gic_handle_irq+0x0/0x64) from [<8000e2e4>] (__irq_svc+0x44/0x5c)
        Exception stack(0xbf0ddef8 to 0xbf0ddf40)
      Signed-off-by: NFrank Li <Frank.Li@freescale.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      de5fb0a0
  15. 23 2月, 2013 1 次提交
    • F
      net: fec: Fix division by zero · e2f8d555
      Fabio Estevam 提交于
      commit 7f7d6c28 (net: fec: Ensure that initialization is done prior to
      request_irq()) placed fec_ptp_init() into a point that ptp clock was not
      available, which causes a division by zero in fec_ptp_start_cyclecounter():
      
      [   17.895723] Division by zero in kernel.
      [   17.899571] Backtrace:
      [   17.902094] [<80012564>] (dump_backtrace+0x0/0x10c) from [<8056deec>]
      (dump_stack+0x18/0x1c)
      [   17.910539]  r6:bfba8500 r5:8075c950 r4:bfba8000 r3:bfbd0000
      [   17.916284] [<8056ded4>] (dump_stack+0x0/0x1c) from [<80012688>]
      (__div0+0x18/0x20)
      [   17.923968] [<80012670>] (__div0+0x0/0x20) from [<802829c4>] (Ldiv0+0x8/0x10)
      [   17.931140] [<80398534>] (fec_ptp_start_cyclecounter+0x0/0x110) from
      [<80394f64>] (fec_restart+0x6c8/0x754)
      [   17.940898] [<8039489c>] (fec_restart+0x0/0x754) from [<803969a0>]
      (fec_enet_adjust_link+0xdc/0x108)
      [   17.950046] [<803968c4>] (fec_enet_adjust_link+0x0/0x108) from [<80390bc4>]
      (phy_state_machine+0x178/0x534)
      ...
      
      Fix this by rearraging the code so that fec_ptp_init() is called only after
      the clocks have been properly acquired.
      
      Tested on both mx53 and mx6 platforms.
      Reported-by: NJim Baxter <jim_baxter@mentor.com>
      Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e2f8d555
  16. 22 2月, 2013 1 次提交
    • F
      net: fec: Ensure that initialization is done prior to request_irq() · 7f7d6c28
      Fabio Estevam 提交于
      Currently request_irq() is called prior to fec_enet_init() and fec_ptp_init(),
      which causes the following crash on a mx53qsb:
      
      Unable to handle kernel NULL pointer dereference at virtual address 00000002
      pgd = 80004000
      [00000002] *pgd=00000000
      Internal error: Oops: 5 [#1] SMP ARM
      Modules linked in:
      CPU: 0    Not tainted  (3.8.0-rc7-next-20130215+ #346)
      PC is at fec_enet_interrupt+0xd0/0x348
      LR is at fec_enet_interrupt+0xb8/0x348
      pc : [<80372b7c>]    lr : [<80372b64>]    psr: 60000193
      sp : df855c20  ip : df855c20  fp : df855c74
      r10: 00000516  r9 : 1c000000  r8 : 00000000
      r7 : 00000000  r6 : 00000000  r5 : 00000000  r4 : df9b7800
      r3 : df9b7df4  r2 : 00000000  r1 : 00000000  r0 : df9b7d34
      
      Ensure that such initialization functions are called prior to requesting the
      interrupts, so that all necessary the data structures are in place when the
      irqs occur.
      Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7f7d6c28
  17. 19 2月, 2013 1 次提交
  18. 08 2月, 2013 1 次提交
    • F
      net: fec: correct fix method about miss init spinlock · 365cc174
      Frank Li 提交于
      Old method will cause init spinlock twice.
      New method will avoid init spinlock twice and fix miss init spinlock
      at fec_restart.
      
      BUG: spinlock bad magic on CPU#1, swapper/0/1
      lock: 0xbfae0f8c, .magic: 00000000, .owner: <none>/-1, .owner_cpu: 0
      Backtrace:
       [<80011d54>] (dump_backtrace+0x0/0x10c) from [<804e7800>] (dump_stack+0x18/0x1c)
       r6:bfae0000 r5:bfae0f8c r4:00000000 r3:806c1310
       [<804e77e8>] (dump_stack+0x0/0x1c) from [<804e9f20>] (spin_dump+0x80/0x94)
       [<804e9ea0>] (spin_dump+0x0/0x94) from [<804e9f60>] (spin_bug+0x2c/0x30)
       r5:805f6f8c r4:bfae0f8c
       [<804e9f34>] (spin_bug+0x0/0x30) from [<80257984>] (do_raw_spin_lock+0x170/0x1b0                                         )
       r5:806b4950 r4:bfae0f8c
       [<80257814>] (do_raw_spin_lock+0x0/0x1b0) from [<804ed15c>] (_raw_spin_lock_irqs                                         ave+0x18/0x20)
       [<804ed144>] (_raw_spin_lock_irqsave+0x0/0x20) from [<8033c694>] (fec_ptp_start_                                         cyclecounter+0x3c/0x120)
       r4:bfae0f8c r3:00000002
       [<8033c658>] (fec_ptp_start_cyclecounter+0x0/0x120) from [<80339e08>] (fec_resta                                         rt+0x56c/0x5f8)
       r8:00000000 r7:806e6f48 r6:00000112 r5:806b4950 r4:bfae0000
       [<8033989c>] (fec_restart+0x0/0x5f8) from [<8033b9e4>] (fec_probe+0x508/0xa48)
      Signed-off-by: NFrank Li <Frank.Li@freescale.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      365cc174
  19. 05 2月, 2013 1 次提交
    • F
      net: fec: fix miss init spinlock · 7d3e673f
      Frank Li 提交于
      BUG: spinlock bad magic on CPU#1, swapper/0/1
      lock: 0xbfae0f8c, .magic: 00000000, .owner: <none>/-1, .owner_cpu: 0
      Backtrace:
       [<80011d54>] (dump_backtrace+0x0/0x10c) from [<804e7800>] (dump_stack+0x18/0x1c)
       r6:bfae0000 r5:bfae0f8c r4:00000000 r3:806c1310
       [<804e77e8>] (dump_stack+0x0/0x1c) from [<804e9f20>] (spin_dump+0x80/0x94)
       [<804e9ea0>] (spin_dump+0x0/0x94) from [<804e9f60>] (spin_bug+0x2c/0x30)
       r5:805f6f8c r4:bfae0f8c
       [<804e9f34>] (spin_bug+0x0/0x30) from [<80257984>] (do_raw_spin_lock+0x170/0x1b0                                         )
       r5:806b4950 r4:bfae0f8c
       [<80257814>] (do_raw_spin_lock+0x0/0x1b0) from [<804ed15c>] (_raw_spin_lock_irqs                                         ave+0x18/0x20)
       [<804ed144>] (_raw_spin_lock_irqsave+0x0/0x20) from [<8033c694>] (fec_ptp_start_                                         cyclecounter+0x3c/0x120)
       r4:bfae0f8c r3:00000002
       [<8033c658>] (fec_ptp_start_cyclecounter+0x0/0x120) from [<80339e08>] (fec_resta                                         rt+0x56c/0x5f8)
       r8:00000000 r7:806e6f48 r6:00000112 r5:806b4950 r4:bfae0000
       [<8033989c>] (fec_restart+0x0/0x5f8) from [<8033b9e4>] (fec_probe+0x508/0xa48)
      Signed-off-by: NFrank Li <Frank.Li@freescale.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7d3e673f
  20. 30 1月, 2013 1 次提交
    • F
      net: fec: add napi support to improve proformance · dc975382
      Frank Li 提交于
      Add napi support
      
      Before this patch
      
       iperf -s -i 1
       ------------------------------------------------------------
       Server listening on TCP port 5001
       TCP window size: 85.3 KByte (default)
       ------------------------------------------------------------
       [  4] local 10.192.242.153 port 5001 connected with 10.192.242.138 port 50004
       [ ID] Interval       Transfer     Bandwidth
       [  4]  0.0- 1.0 sec  41.2 MBytes   345 Mbits/sec
       [  4]  1.0- 2.0 sec  43.7 MBytes   367 Mbits/sec
       [  4]  2.0- 3.0 sec  42.8 MBytes   359 Mbits/sec
       [  4]  3.0- 4.0 sec  43.7 MBytes   367 Mbits/sec
       [  4]  4.0- 5.0 sec  42.7 MBytes   359 Mbits/sec
       [  4]  5.0- 6.0 sec  43.8 MBytes   367 Mbits/sec
       [  4]  6.0- 7.0 sec  43.0 MBytes   361 Mbits/sec
      
      After this patch
       [  4]  2.0- 3.0 sec  51.6 MBytes   433 Mbits/sec
       [  4]  3.0- 4.0 sec  51.8 MBytes   435 Mbits/sec
       [  4]  4.0- 5.0 sec  52.2 MBytes   438 Mbits/sec
       [  4]  5.0- 6.0 sec  52.1 MBytes   437 Mbits/sec
       [  4]  6.0- 7.0 sec  52.1 MBytes   437 Mbits/sec
       [  4]  7.0- 8.0 sec  52.3 MBytes   439 Mbits/sec
      Signed-off-by: NFrank Li <Frank.Li@freescale.com>
      Signed-off-by: NFugang Duan <B38611@freescale.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      dc975382
  21. 19 1月, 2013 1 次提交
    • F
      net: fec: enable pause frame to improve rx prefomance for 1G network · baa70a5c
      Frank Li 提交于
      The limition of imx6 internal bus cause fec can't achieve 1G perfomance.
      There will be many packages lost because FIFO over run.
      
      This patch enable pause frame flow control.
      
      Before this patch
      iperf -s -i 1
      TCP window size: 85.3 KByte (default)
      ------------------------------------------------------------
      [  4] local 10.192.242.153 port 5001 connected with 10.192.242.94 port 49773
      [ ID] Interval       Transfer     Bandwidth
      [  4]  0.0- 1.0 sec  6.35 MBytes  53.3 Mbits/sec
      [  4]  1.0- 2.0 sec  3.39 MBytes  28.5 Mbits/sec
      [  4]  2.0- 3.0 sec  2.63 MBytes  22.1 Mbits/sec
      [  4]  3.0- 4.0 sec  1.10 MBytes  9.23 Mbits/sec
      
      ifconfig
         RX packets:46195 errors:1859 dropped:1 overruns:1859 frame:1859
      
      After this patch
      iperf -s -i 1
      
      [  4] local 10.192.242.153 port 5001 connected with 10.192.242.94 port 49757
      [ ID] Interval       Transfer     Bandwidth
      [  4]  0.0- 1.0 sec  49.8 MBytes   418 Mbits/sec
      [  4]  1.0- 2.0 sec  50.1 MBytes   420 Mbits/sec
      [  4]  2.0- 3.0 sec  47.5 MBytes   399 Mbits/sec
      [  4]  3.0- 4.0 sec  45.9 MBytes   385 Mbits/sec
      [  4]  4.0- 5.0 sec  44.8 MBytes   376 Mbits/sec
      
      ifconfig
         RX packets:2348454 errors:0 dropped:16 overruns:0 frame:0
      Signed-off-by: NFrank Li <Frank.Li@freescale.com>
      Signed-off-by: NFugang Duan <B38611@freescale.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      baa70a5c
  22. 15 1月, 2013 1 次提交
  23. 09 1月, 2013 1 次提交
  24. 08 1月, 2013 1 次提交
  25. 07 1月, 2013 1 次提交
  26. 05 1月, 2013 1 次提交
  27. 04 12月, 2012 1 次提交
  28. 02 11月, 2012 2 次提交
  29. 11 7月, 2012 1 次提交
  30. 28 6月, 2012 4 次提交
  31. 12 5月, 2012 1 次提交
  32. 25 4月, 2012 1 次提交
    • S
      net fec: do not depend on grouped clocks · f4d40de3
      Sascha Hauer 提交于
      the current i.MX clock support groups together unrelated clocks
      to a single clock which is then used by the driver. This can't
      be accomplished with the generic clock framework so we instead
      request the individual clocks in the driver. For i.MX there are
      generally three different clocks:
      
      ipg: bus clock (needed to access registers)
      ahb: dma relevant clock, sometimes referred to as hclk in the datasheet
      per: bit clock, pixel clock
      
      This patch changes the driver to request the individual clocks.
      Currently all clk_get will get the same clock until the SoCs
      are converted to the generic clock framework
      Signed-off-by: NSascha Hauer <s.hauer@pengutronix.de>
      f4d40de3