This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

am335x eth0不断up/down,导致两个网口都不能使用



我们的板子启动之后使用脚本每隔3S不断地将eth0 up/down,eth0此时不接网线,eth1接上网线,在电脑端不断的去ping,结果在up/down十几次之后,两个网口都不能ping通了。

我们使用的是3.2.0内核,我发现使用3.14.43的内核是没有这个问题的 

尝试修改 cpsw.c文件,添加如下,发现up/down需要更多次才会出现问题

是否在3.2上面有网络这块的补丁?

  • 没看到linux-3.2.0-psp05.06.00.00/patches里有网络这块的补丁。
  • e2echina.ti.com/.../77076
    我看到这个帖子说的现象跟我遇到的差不多,但是没有具体说明是怎么改的。cpsw interrupt需要怎么修改?
  • 我发现这个补丁是串口的,打上这个补丁没有作用

  • 在网口不通之后,我再ping出现如下的问题是什么原因?

    root@am335x:~# ping 192.168.1.1
    PING 192.168.1.1 (192.168.1.1): 56 data bytes
    [ 249.056657] ------------[ cut here ]------------
    [ 249.061551] WARNING: at net/sched/sch_generic.c:255 dev_watchdog+0x260/0x270()
    [ 249.069119] NETDEV WATCHDOG: eth1 (cpsw): transmit queue 0 timed out
    [ 249.075761] Modules linked in:
    [ 249.078963] Backtrace:
    [ 249.081552] [<c0017978>] (dump_backtrace+0x0/0x110) from [<c03f86a8>] (dump_stack+0x18/0x1c)
    [ 249.090390] r6:c052d244 r5:000000ff r4:c05a1dd0 r3:c05c27c8
    [ 249.096348] [<c03f8690>] (dump_stack+0x0/0x1c) from [<c003dc10>] (warn_slowpath_common+0x5c/0x6c)
    [ 249.105652] [<c003dbb4>] (warn_slowpath_common+0x0/0x6c) from [<c003dcc4>] (warn_slowpath_fmt+0x38/0x40)
    [ 249.115580] r8:00200200 r7:c0627b3c r6:c05c3708 r5:00000000 r4:df36e800
    [ 249.122439] r3:00000009
    [ 249.125194] [<c003dc8c>] (warn_slowpath_fmt+0x0/0x40) from [<c0369258>] (dev_watchdog+0x260/0x270)
    [ 249.134573] r3:df36e800 r2:c052d25c
    [ 249.138349] [<c0368ff8>] (dev_watchdog+0x0/0x270) from [<c00481c8>] (run_timer_softirq+0xf8/0x208)
    [ 249.147729] r7:c05a0000 r6:c05c3708 r5:c0614b40 r4:c05a1e28
    [ 249.153676] [<c00480d0>] (run_timer_softirq+0x0/0x208) from [<c00430bc>] (__do_softirq+0xac/0x134)
    [ 249.163065] [<c0043010>] (__do_softirq+0x0/0x134) from [<c004352c>] (irq_exit+0x8c/0xa4)
    [ 249.171561] [<c00434a0>] (irq_exit+0x0/0xa4) from [<c0015168>] (handle_IRQ+0x44/0x8c)
    [ 249.179763] r4:c05dd4a0 r3:c00738a4
    [ 249.183521] [<c0015124>] (handle_IRQ+0x0/0x8c) from [<c00085b8>] (omap3_intc_handle_irq+0x84/0x88)
    [ 249.192897] r6:00000044 r5:fa200000 r4:00000004 r3:00000002
    [ 249.198857] [<c0008534>] (omap3_intc_handle_irq+0x0/0x88) from [<c0013ec0>] (__irq_svc+0x40/0x60)
    [ 249.208148] Exception stack(0xc05a1f00 to 0xc05a1f48)
    [ 249.213438] 1f00: 5b47c4f9 0005574d 4f84d0ba 0005574d 00000000 00000000 c05aa620 00000000
    [ 249.222006] 1f20: 80004059 413fc082 00000000 c05a1f74 4f84d0ba c05a1f48 c005f000 c0027c9c
    [ 249.230564] 1f40: 20000013 ffffffff
    [ 249.234208] r7:c05a1f34 r6:ffffffff r5:20000013 r4:c0027c9c
    [ 249.240178] [<c0027c28>] (am33xx_enter_idle+0x0/0xac) from [<c02e0140>] (cpuidle_idle_call+0xbc/0x134)
    [ 249.249918] r6:c05aa3c8 r5:c0626c8c r4:c05aa620
    [ 249.254772] [<c02e0084>] (cpuidle_idle_call+0x0/0x134) from [<c001545c>] (cpu_idle+0x70/0xb0)
    [ 249.263691] r7:c05a650c r6:c05a6518 r5:c06014c4 r4:c05a0000
    [ 249.269647] [<c00153ec>] (cpu_idle+0x0/0xb0) from [<c03ef5f0>] (rest_init+0x74/0x78)
    [ 249.277755] r6:c0a31100 r5:c0593204 r4:c05a20fc r3:00000000
    [ 249.283710] [<c03ef57c>] (rest_init+0x0/0x78) from [<c05647dc>] (start_kernel+0x2d4/0x2e0)
    [ 249.292370] [<c0564508>] (start_kernel+0x0/0x2e0) from [<80008040>] (0x80008040)
    [ 249.300117] ---[ end trace 9600ff32c3694cc9 ]---

  • 问题已经解决了,确实是interrupt的问题。但是不是那个补丁,这个才是真正的补丁

    www.spinics.net/.../msg233304.html