1. 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
  2. 19 2月, 2013 1 次提交
  3. 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
  4. 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
  5. 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
  6. 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
  7. 15 1月, 2013 1 次提交
  8. 09 1月, 2013 1 次提交
  9. 08 1月, 2013 1 次提交
  10. 07 1月, 2013 1 次提交
  11. 05 1月, 2013 1 次提交
  12. 04 12月, 2012 1 次提交
  13. 02 11月, 2012 2 次提交
  14. 11 7月, 2012 1 次提交
  15. 28 6月, 2012 4 次提交
  16. 12 5月, 2012 1 次提交
  17. 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
  18. 04 4月, 2012 1 次提交
  19. 14 2月, 2012 1 次提交
  20. 08 2月, 2012 1 次提交
    • F
      net: fec: Fix build due to wrong dev annotation · b72061a3
      Fabio Estevam 提交于
      commit 21a4e469 (netdev: ethernet dev_alloc_skb to netdev_alloc_skb)
      should have used "ndev" instead of "dev".
      
      This causes the following build errors:
      
      drivers/net/ethernet/freescale/fec.c: In function 'fec_enet_rx':
      drivers/net/ethernet/freescale/fec.c:714: error: 'dev' undeclared (first use in this function)
      drivers/net/ethernet/freescale/fec.c:714: error: (Each undeclared identifier is reported only once
      drivers/net/ethernet/freescale/fec.c:714: error: for each function it appears in.)
      drivers/net/ethernet/freescale/fec.c: In function 'fec_enet_alloc_buffers':
      drivers/net/ethernet/freescale/fec.c:1213: error: 'dev' undeclared (first use in this function)
      
      Fix it, so that fec driver can be built again.
      Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b72061a3
  21. 07 2月, 2012 1 次提交
  22. 01 2月, 2012 1 次提交
  23. 25 1月, 2012 1 次提交
  24. 13 1月, 2012 1 次提交
  25. 11 1月, 2012 1 次提交
  26. 06 1月, 2012 1 次提交
  27. 29 12月, 2011 1 次提交
  28. 28 12月, 2011 1 次提交
  29. 09 12月, 2011 7 次提交
  30. 08 12月, 2011 1 次提交
    • S
      net/fec: fix the use of pdev->id · 43af940c
      Shawn Guo 提交于
      The pdev->id is used in several places for different purpose.  All
      these uses assume it's always the id of fec device which is >= 0.
      However this is only true for non-DT case.  When DT plays, pdev->id
      is always -1, which will break these pdev->id users.
      
      Instead of fixing all these users one by one, this patch introduces
      a new member 'dev_id' to 'struct fec_enet_private' for holding the
      correct fec device id, and replaces all the existing uses of pdev->id
      with this dev_id.
      Signed-off-by: NShawn Guo <shawn.guo@linaro.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      43af940c