1. 19 1月, 2010 1 次提交
  2. 31 12月, 2009 1 次提交
    • A
      ucc_geth: Fix netdev watchdog triggering on suspend · 29fb00e0
      Anton Vorontsov 提交于
      Sometimes ucc_geth fails to suspend with the following trace:
      
       ucc_geth e0103000.ucc: suspend
       ucc_geth e0102000.ucc: suspend
       NETDEV WATCHDOG: eth0 (ucc_geth): transmit queue 0 timed out
       ------------[ cut here ]------------
       Badness at net/sched/sch_generic.c:255
       NIP: c021cb5c LR: c021cb5c CTR: c01ab4b4
       [...]
       NIP [c021cb5c] dev_watchdog+0x298/0x2a8
       LR [c021cb5c] dev_watchdog+0x298/0x2a8
       Call Trace:
       [c0389da0] [c021cb5c] dev_watchdog+0x298/0x2a8 (unreliable)
       [c0389e00] [c0031ed8] run_timer_softirq+0x16c/0x1dc
       [c0389e50] [c002c638] __do_softirq+0xa4/0x11c
       [...]
      
      This patch fixes the issue by properly detaching the device on
      suspend, and attaching it back on resume.
      Signed-off-by: NAnton Vorontsov <avorontsov@ru.mvista.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      29fb00e0
  3. 27 12月, 2009 3 次提交
    • A
      ucc_geth: Don't needlessly change MAC settings in adjust_link() · 08fafd84
      Anton Vorontsov 提交于
      If PHY doesn't have an IRQ, phylib would poll for link changes, and
      would call adjust_link() every second. In that case we disable and
      enable the controller every second.
      
      Let's better check if there is actually anything changed, and, if so,
      change the MAC settings.
      Signed-off-by: NAnton Vorontsov <avorontsov@ru.mvista.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      08fafd84
    • A
      ucc_geth: Fix netdev watchdog triggering on link changes · 08b5e1c9
      Anton Vorontsov 提交于
      Since commit 864fdf88 ("ucc_geth:
      Fix hangs after switching from full to half duplex") ucc_geth driver
      disables the controller during MAC configuration changes. Though,
      disabling the controller might take quite awhile, and so the netdev
      watchdog might get upset:
      
       NETDEV WATCHDOG: eth2 (ucc_geth): transmit queue 0 timed out
       ------------[ cut here ]------------
       Badness at c02729a8 [verbose debug info unavailable]
       NIP: c02729a8 LR: c02729a8 CTR: c01b6088
       REGS: c0451c40 TRAP: 0700   Not tainted  (2.6.32-trunk-8360e)
       [...]
       NIP [c02729a8] dev_watchdog+0x280/0x290
       LR [c02729a8] dev_watchdog+0x280/0x290
       Call Trace:
       [c0451cf0] [c02729a8] dev_watchdog+0x280/0x290 (unreliable)
       [c0451d50] [c00377c4] run_timer_softirq+0x164/0x224
       [c0451da0] [c0032a38] __do_softirq+0xb8/0x13c
       [c0451df0] [c00065cc] do_softirq+0xa0/0xac
       [c0451e00] [c003280c] irq_exit+0x7c/0x9c
       [c0451e10] [c00640c4] __ipipe_sync_stage+0x248/0x24c
       [...]
      
      This patch fixes the issue by detaching the netdev during the
      time we change the configuration.
      Reported-by: NLennart Sorensen <lsorense@csclub.uwaterloo.ca>
      Signed-off-by: NAnton Vorontsov <avorontsov@ru.mvista.com>
      Tested-by: NLennart Sorensen <lsorense@csclub.uwaterloo.ca>
      Cc: Stable <stable@vger.kernel.org> [2.6.32]
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      08b5e1c9
    • A
      ucc_geth: Fix empty TX queue processing · 7583605b
      Anton Vorontsov 提交于
      Following oops was seen with the ucc_geth driver:
      
       Unable to handle kernel paging request for data at address 0x00000058
       Faulting instruction address: 0xc024f2fc
       Oops: Kernel access of bad area, sig: 11 [#1]
       [...]
       NIP [c024f2fc] skb_recycle_check+0x14/0x100
       LR [e30aa0a4] ucc_geth_poll+0xd8/0x4e0 [ucc_geth_driver]
       Call Trace:
       [df857d50] [c000b03c] __ipipe_grab_irq+0x3c/0xa4 (unreliable)
       [df857d60] [e30aa0a4] ucc_geth_poll+0xd8/0x4e0 [ucc_geth_driver]
       [df857dd0] [c0258cf8] net_rx_action+0xf8/0x1b8
       [df857e10] [c0032a38] __do_softirq+0xb8/0x13c
       [df857e60] [c00065cc] do_softirq+0xa0/0xac
       [...]
      
      This is because ucc_geth_tx() tries to process an empty queue when
      queues are logically stopped. Stopping the queues doesn't disable
      polling, and since nowadays ucc_geth_tx() is actually called from
      the polling routine, the oops above might pop up.
      
      Fix this by removing 'netif_queue_stopped() == 0' check.
      Reported-by: NLennart Sorensen <lsorense@csclub.uwaterloo.ca>
      Signed-off-by: NAnton Vorontsov <avorontsov@ru.mvista.com>
      Tested-by: NLennart Sorensen <lsorense@csclub.uwaterloo.ca>
      Cc: Stable <stable@vger.kernel.org> [2.6.32]
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7583605b
  4. 04 12月, 2009 2 次提交
  5. 12 9月, 2009 2 次提交
  6. 31 8月, 2009 3 次提交
  7. 15 8月, 2009 1 次提交
  8. 23 7月, 2009 1 次提交
  9. 08 7月, 2009 1 次提交
  10. 06 7月, 2009 1 次提交
  11. 18 6月, 2009 2 次提交
  12. 03 6月, 2009 1 次提交
  13. 27 5月, 2009 1 次提交
  14. 19 5月, 2009 2 次提交
  15. 28 4月, 2009 1 次提交
  16. 27 4月, 2009 1 次提交
  17. 22 4月, 2009 1 次提交
  18. 21 4月, 2009 1 次提交
  19. 02 4月, 2009 2 次提交
  20. 29 3月, 2009 1 次提交
  21. 28 3月, 2009 1 次提交
    • A
      ucc_geth: Fix three oopses in PHY {de,}initialization code · 79675900
      Anton Vorontsov 提交于
      When there are no free snums, UCC ethernet should gracefully fail, but
      currently it oopses this way:
      
        # ifconfig eth0 up
        fill_init_enet_entries: Can not get SNUM.
        ucc_geth_startup: Can not fill p_init_enet_param_shadow.
        eth0: Cannot configure net device, aborting.
        Unable to handle kernel paging request for data at address 0x00000190
        Faulting instruction address: 0xc0294c88
        Oops: Kernel access of bad area, sig: 11 [#1]
        [...]
        NIP [c0294c88] mutex_lock+0x0/0x1c
        LR [c01b6be8] phy_stop+0x20/0x70
        Call Trace:
        [efb25da0] [efb2eb60] 0xefb2eb60 (unreliable)
        [efb25db0] [c01b2058] ucc_geth_stop+0x2c/0x8c
        [efb25dd0] [c01b4194] ucc_geth_open+0x48/0x27c
        [efb25df0] [c020eec0] dev_open+0xc0/0x118
        [...]
      
      This is because the ucc_geth_stop() routine assumes that ugeth->phydev
      is always initialized by the ucc_geth_open(), while it is not in case
      of errors.
      
      If we add a check to the ucc_geth_stop(), then another oops pops up:
      
        Unable to handle kernel paging request for data at address 0x00000004
        Faulting instruction address: 0xc01b46a4
        Oops: Kernel access of bad area, sig: 11 [#1]
        [...]
        NIP [c01b46a4] adjust_link+0x20/0x1b4
        LR [c01b770c] phy_state_machine+0xdc/0x44c
        Call Trace:
        [ef83bf10] [c021b388] linkwatch_schedule_work+0x74/0xf8 (unreliable)
        [ef83bf40] [c01b770c] phy_state_machine+0xdc/0x44c
        [ef83bf60] [c004c13c] run_workqueue+0xb8/0x148
        [ef83bf90] [c004c870] worker_thread+0x70/0xd0
        [ef83bfd0] [c00505fc] kthread+0x48/0x84
        [ef83bff0] [c000f464] kernel_thread+0x4c/0x68
        [...]
      
      That one happens because ucc_geth_stop() does not call phy_disconnect()
      and so phylib state machine is running without any idea that a MAC has
      just died.
      
      Also, when device tree specifies fixed-link, and CONFIG_FIXED_PHY
      is disabled, we'll get this oops:
      
        0:01 not found
        eth2: Could not attach to PHY
        eth2: Cannot initialize PHY, aborting.
        Unable to handle kernel paging request for data at address 0x00000190
        Faulting instruction address: 0xc02967d0
        Oops: Kernel access of bad area, sig: 11 [#1]
        [...]
        NIP [c02967d0] mutex_lock+0x0/0x1c
        LR [c01b6bcc] phy_stop+0x20/0x70
        Call Trace:
        [ef82be50] [efb6bb60] 0xefb6bb60 (unreliable)
        [ef82be60] [c01b2058] ucc_geth_stop+0x2c/0x8c
        [ef82be80] [c01b4194] ucc_geth_open+0x48/0x27c
        [ef82bea0] [c0210a04] dev_open+0xc0/0x118
        [ef82bec0] [c020f85c] dev_change_flags+0x84/0x1ac
        [ef82bee0] [c037b768] ic_open_devs+0x168/0x2bc
        [ef82bf20] [c037ca98] ip_auto_config+0x90/0x28c
        [ef82bf60] [c0001b9c] do_one_initcall+0x34/0x1a0
        [ef82bfd0] [c035e240] do_initcalls+0x38/0x58
        [ef82bfe0] [c035e2c4] kernel_init+0x30/0x90
        [ef82bff0] [c000f464] kernel_thread+0x4c/0x68
        [...]
      
      And again, ucc_geth_stop() assumes that ugeth->phydev is there, while
      it isn't.
      
      This patch fixes all three oopses simply by rearranging some code:
      
      - In ucc_geth_open(): move init_phy() call to the beginning, so
        that we only call ucc_geth_stop() with a PHY attached;
      - Move phy_disconnect() call from ucc_geth_close() to
        ucc_geth_stop(), so that we'll always disconnect the PHY.
      Signed-off-by: NAnton Vorontsov <avorontsov@ru.mvista.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      79675900
  22. 25 3月, 2009 2 次提交
  23. 24 3月, 2009 1 次提交
  24. 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
  25. 05 2月, 2009 1 次提交
  26. 30 1月, 2009 1 次提交
  27. 22 1月, 2009 1 次提交
  28. 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
  29. 26 12月, 2008 1 次提交
  30. 23 12月, 2008 1 次提交