1. 25 3月, 2009 2 次提交
  2. 24 3月, 2009 1 次提交
  3. 23 3月, 2009 1 次提交
    • A
      ucc_geth: Fix oops when using fixed-link support · 61fa9dcf
      Anton Vorontsov 提交于
      commit b1c4a9dd ("ucc_geth: Change
      uec phy id to the same format as gianfar's") introduced a regression
      in the ucc_geth driver that causes this oops when fixed-link is used:
      
      Unable to handle kernel paging request for data at address 0x00000000
      Faulting instruction address: 0xc0151270
      Oops: Kernel access of bad area, sig: 11 [#1]
      TMCUTU
      NIP: c0151270 LR: c0151270 CTR: c0017760
      REGS: cf81fa60 TRAP: 0300   Not tainted  (2.6.29-rc8)
      MSR: 00009032 <EE,ME,IR,DR>  CR: 24024042  XER: 20000000
      DAR: 00000000, DSISR: 20000000
      TASK = cf81cba0[1] 'swapper' THREAD: cf81e000
      GPR00: c0151270 cf81fb10 cf81cba0 00000000 c0272e20 c025f354 00001e80
      cf86b08c
      GPR08: d1068200 cffffb74 06000000 d106c200 42024042 10085148 0fffd000
      0ffc81a0
      GPR16: 00000001 00000001 00000000 007ffeb0 00000000 0000c000 cf83f36c
      cf83f000
      GPR24: 00000030 cf83f360 cf81fb20 00000000 d106c200 20000000 00001e80
      cf83f360
      NIP [c0151270] ucc_geth_open+0x330/0x1efc
      LR [c0151270] ucc_geth_open+0x330/0x1efc
      Call Trace:
      [cf81fb10] [c0151270] ucc_geth_open+0x330/0x1efc (unreliable)
      [cf81fba0] [c0187638] dev_open+0xbc/0x12c
      [cf81fbc0] [c0187e38] dev_change_flags+0x8c/0x1b0
      
      This patch fixes the issue by removing offending (and somewhat
      duplicate) code from init_phy() routine, and changes _probe()
      function to use uec_mdio_bus_name().
      
      Also, since we fully construct phy_bus_id in the _probe() routine,
      we no longer need ->phy_address and ->mdio_bus fields in
      ucc_geth_info structure.
      
      I wish the patch would be a bit shorter, but it seems like the only
      way to fix the issue in a sane way. Luckily, the patch has been
      tested with real PHYs and fixed-link, so no further regressions
      expected.
      Reported-by: NJoakim Tjernlund <Joakim.Tjernlund@transmode.se>
      Signed-off-by: NAnton Vorontsov <avorontsov@ru.mvista.com>
      Tested-by: NJoakim Tjernlund <Joakim.Tjernlund@transmode.se>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      61fa9dcf
  4. 05 2月, 2009 1 次提交
  5. 30 1月, 2009 1 次提交
  6. 22 1月, 2009 1 次提交
  7. 11 1月, 2009 1 次提交
    • T
      ucc_geth: use correct UCCE macros · 3bc53427
      Timur Tabi 提交于
      The UCC Event Register (UCCE) already has unambigous macro definitions in qe.h,
      so we should not be defining our own in the UCC Ethernet driver.
      
      Removed unused local variable 'dev' from ucc_geth_poll(), which fixes
      a warning caused by commit 908a7a16
      ("net: Remove unused netdev arg from some NAPI interfaces.").
      
      Replaced in_be/out_be pairs with setbits32 or clrbits32, where applicable.
      Signed-off-by: NTimur Tabi <timur@freescale.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3bc53427
  8. 26 12月, 2008 1 次提交
  9. 23 12月, 2008 1 次提交
  10. 19 12月, 2008 6 次提交
    • A
      ucc_geth: Remove UGETH_FILTERING dead code · 221b3d60
      Anton Vorontsov 提交于
      The code appears to be dead: nobody call these functions, plus build
      breaks when UGETH_FILTERING is enabled:
      
      ucc_geth.c:1848: warning: 'struct enet_addr' declared inside parameter list
      ucc_geth.c:1848: warning: its scope is only this definition or declaration, which is probably not what you want
      ucc_geth.c: In function 'ugeth_82xx_filtering_get_match_addr_in_hash':
      ucc_geth.c:1856: error: dereferencing pointer to incomplete type
      ucc_geth.c:1874: error: dereferencing pointer to incomplete type
      ucc_geth.c:1877: warning: return from incompatible pointer type
      ucc_geth.c: At top level:
      ucc_geth.c:1885: warning: 'struct enet_addr' declared inside parameter list
      ucc_geth.c: In function 'ugeth_82xx_filtering_add_addr_in_hash':
      ucc_geth.c:1894: error: dereferencing pointer to incomplete type
      ucc_geth.c:1909: warning: passing argument 2 of 'ugeth_82xx_filtering_get_match_addr_in_hash' from incompatible pointer type
      ucc_geth.c:1909: warning: assignment from incompatible pointer type
      ucc_geth.c:1918: error: dereferencing pointer to incomplete type
      ucc_geth.c: At top level:
      ucc_geth.c:1928: warning: 'struct enet_addr' declared inside parameter list
      ucc_geth.c: In function 'ugeth_82xx_filtering_clear_addr_in_hash':
      ucc_geth.c:1947: warning: passing argument 2 of 'ugeth_82xx_filtering_get_match_addr_in_hash' from incompatible pointer type
      ucc_geth.c:1947: warning: assignment from incompatible pointer type
      ucc_geth.c:1954: error: dereferencing pointer to incomplete type
      ucc_geth.c: At top level:
      ucc_geth.c:2060: warning: 'struct enet_addr' declared inside parameter list
      ucc_geth.c: In function 'ugeth_82xx_filtering_add_addr_in_paddr':
      ucc_geth.c:2064: error: dereferencing pointer to incomplete type
      ucc_geth.c:2073: error: dereferencing pointer to incomplete type
      ucc_geth.c:2075: warning: passing argument 2 of 'hw_add_addr_in_paddr' from incompatible pointer type
      make[2]: *** [ucc_geth.o] Error 1
      
      The code is there since the driver was merged, and nobody seem to be
      interested in fixing or actually using it. If we ever want the
      filtering support, we can always revert the patch and fix it, but so
      far it just draws reader's attention.
      Signed-off-by: NAnton Vorontsov <avorontsov@ru.mvista.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      221b3d60
    • A
      ucc_geth: Fix IO memory (un)mapping code · 3e73fc9a
      Anton Vorontsov 提交于
      The driver doesn't check ioremap() return value, and doesn't free the
      remapped memory.
      
      This patch fixes it.
      Signed-off-by: NAnton Vorontsov <avorontsov@ru.mvista.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3e73fc9a
    • A
      ucc_geth: Cleanup repetitive ucc_geth_memclean() calls · ba574696
      Anton Vorontsov 提交于
      No need to call ucc_geth_memclean() so many times, just check for
      errors in ucc_geth_open(), and call ucc_geth_stop() in case of errors.
      
      The ucc_geth_stop() may be called anytime and will do the right thing.
      Signed-off-by: NAnton Vorontsov <avorontsov@ru.mvista.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ba574696
    • A
      ucc_geth: Fix IRQ freeing code in ucc_geth_open() · 67c2fb8f
      Anton Vorontsov 提交于
      open() routine calls stop() in case of errors, the function will try
      to free the requested IRQ. But we don't know if it was actually
      requested, so the code might issue bogus free_irq(0, dev) call.
      
      Fix this by rearranging the code so that now request_irq() is the last
      call in the open() routine, and move free_irq() into the close().
      Signed-off-by: NAnton Vorontsov <avorontsov@ru.mvista.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      67c2fb8f
    • A
      ucc_geth: Fix TX watchdog timeout handling · 1762a29a
      Anton Vorontsov 提交于
      The timeout handling code is currently broken in several ways:
      
      - It calls stop() (which frees all the memory and IRQ), and then
        calls startup() (which won't re-request IRQ, neither it will
        re-init the Fast UCC structure).
      - It calls these routines from the softirq context, which is wrong,
        since stop() calls free_irq() (which might sleep) and startup()
        allocates things with GFP_KERNEL.
      - It won't soft-reset the PHY. We need the PHY reset for at least
        MPC8360E-MDS boards with Marvell 88E1111 PHY, the PHY won't recover
        from timeouts w/o the reset.
      
      So the patch fixes these problems by implementing the workqueue for the
      timeout handling, and there we fully re-open the device via close() and
      open() calls. The close/open paths do the right things, and I can see
      that the driver actually survive the timeouts.
      Signed-off-by: NAnton Vorontsov <avorontsov@ru.mvista.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1762a29a
    • A
      ucc_geth: Fix endless loop in stop_{tx,rx} routines · b3431c64
      Anton Vorontsov 提交于
      Currently the routines wait for the various bits w/o an assumption that
      bits may never get set. When timeouts happen I see that these bits never
      get set and so the routines hang the kernel.
      
      With this patch we'll wait the graceful stop for 100 ms, and then will
      simply exit. There is nothing* we can do about that, but it's OK since
      we'll do full reset later.
      
      * Well, actually, there is also not-graceful variant for the TX stop,
        but specs says that we never should use it.
      Signed-off-by: NAnton Vorontsov <avorontsov@ru.mvista.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b3431c64
  11. 11 11月, 2008 1 次提交
  12. 04 11月, 2008 1 次提交
  13. 25 9月, 2008 1 次提交
  14. 21 7月, 2008 1 次提交
    • A
      ucc_geth: do not touch net queue in adjust_link phylib callback · ebbdbd7c
      Anton Vorontsov 提交于
      If the net queue has not been started, we'll get this nice oops
      and non-working ethernet:
      
      ------------[ cut here ]------------
      Kernel BUG at c01f4648 [verbose debug info unavailable]
      Oops: Exception in kernel mode, sig: 5 [#1]
      MPC836x RDK
      Modules linked in:
      NIP: c01f4648 LR: c01c0a10 CTR: c01c08e4
      REGS: cf839e40 TRAP: 0700   Not tainted  (2.6.26-05254-gc7b9969)
      MSR: 00021032 <ME,IR,DR>  CR: 22042044  XER: 00000000
      TASK = cf828c30[4] 'events/0' THREAD: cf838000
      GPR00: c01c0a10 cf839ef0 cf828c30 c035ceb0 cf8469a0 00000064 00000000 00000000
      GPR08: c035ceb0 00000001 00000001 cf99c280 22044044 7ca81020 0fffc000 00000000
      GPR16: 0fff2544 0fff63c0 00000000 0fff78e0 0ffa5580 00000004 00000000 00000000
      GPR24: 02082000 cf9d0000 d1068000 00009032 cf846800 cf846b80 00000001 00000014
      NIP [c01f4648] __netif_schedule+0x28/0x8c
      LR [c01c0a10] adjust_link+0x12c/0x1e4
      Call Trace:
      [cf839ef0] [c0380f50] 0xc0380f50 (unreliable)
      [cf839f10] [c01c0a10] adjust_link+0x12c/0x1e4
      [cf839f40] [c01c2628] phy_state_machine+0x2e0/0x448
      [cf839f60] [c00425e8] run_workqueue+0xc8/0x168
      [cf839f90] [c0042c6c] worker_thread+0x70/0xd0
      [cf839fd0] [c0046954] kthread+0x48/0x84
      [cf839ff0] [c0012488] kernel_thread+0x44/0x60
      Instruction dump:
      7c0803a6 4e800020 3d20c036 9421ffe0 7c0802a6 7c681b78 3929ceb0 7c694a78
      7d290034 90010024 bfa10014 5529d97e <0f090000> 39600002 38030024 7d200028
      ---[ end trace a57d367843bd2904 ]---
      
      Since the driver is using phylib (which is doing netif_carrier_on/off()),
      we should simply remove netif_tx_schedule_all() from adjust_link().
      Signed-off-by: NAnton Vorontsov <avorontsov@ru.mvista.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ebbdbd7c
  15. 18 7月, 2008 1 次提交
  16. 11 7月, 2008 1 次提交
  17. 30 6月, 2008 1 次提交
  18. 22 5月, 2008 1 次提交
  19. 07 5月, 2008 2 次提交
  20. 25 4月, 2008 1 次提交
  21. 17 4月, 2008 2 次提交
  22. 12 4月, 2008 1 次提交
  23. 17 3月, 2008 1 次提交
  24. 03 2月, 2008 2 次提交
  25. 29 1月, 2008 1 次提交
    • J
      [netdrvr] irq handler minor cleanups in several drivers · 28fc1f5a
      Jeff Garzik 提交于
      * use irq_handler_t where appropriate
      
      * no need to use 'irq' function arg, its already stored in a data struct
      
      * rename irq handler 'irq' argument to 'dummy', where the function
        has been analyzed and proven not to use its first argument.
      
      * remove always-false "dev_id == NULL" test from irq handlers
      
      * remove pointless casts from void*
      
      * declance: irq argument is not const
      
      * add KERN_xxx printk prefix
      
      * fix minor whitespace weirdness
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      28fc1f5a
  26. 15 12月, 2007 1 次提交
  27. 14 12月, 2007 1 次提交
  28. 02 12月, 2007 1 次提交
  29. 29 10月, 2007 1 次提交
  30. 24 10月, 2007 1 次提交
  31. 16 10月, 2007 1 次提交