imx6ull network MII transmit timed out

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

imx6ull network MII transmit timed out

Jump to solution
966 Views
dizhuyuan
Contributor III

大家好:

        板子信息:imx6ull  双网口分别通过MII(COL、CRS已使用)和RMII接口接phy芯片 ksz8721,系统使用 linux4.1.15。

        在使用imx6ull的MII接口的网口使用iperf3做压力测试时,内核会出现网络超时。打印信息如下:

# iperf3 -c 192.168.1.11 -t 1024

[ 5] 122.00-123.00 sec 0.00 Bytes 0.00 bits/sec 0 15.7 KBytes
[ 5] 123.00-124.00 sec 0.00 Bytes 0.00 bits/sec 0 15.7 KBytes
[ 5] 124.00-125.00 sec 0.00 Bytes 0.00 bits/sec 0 15.7 KBytes
[ 5] 125.00-126.00 sec 0.00 Bytes 0.00 bits/sec 0 15.7 KBytes
[ 5] 126.00-127.00 sec 0.00 Bytes 0.00 bits/sec 0 15.7 KBytes
[ 5] 127.00-128.00 sec 0.00 Bytes 0.00 bits/sec 0 15.7 KBytes

        [ 142.051928] ------------[ cut here ]------------
[ 142.056571] WARNING: CPU: 0 PID: 0 at net/sched/sch_generic.c:305 dev_watchdog+0x2dc/0x30c()
[ 142.065014] NETDEV WATCHDOG: eth0 (fec): transmit queue 0 timed out
[ 142.071284] Modules linked in:
[ 142.074363] CPU: 0 PID: 0 Comm: swapper Not tainted 4.1.15-rt18-svn46 #126
[ 142.081241] Hardware name: Freescale i.MX6 Ultralite (Device Tree)
[ 142.087424] Backtrace:
[ 142.089905] [<80013014>] (dump_backtrace) from [<80013234>] (show_stack+0x18/0x1c)
[ 142.097477] r7:804684d8 r6:00000131 r5:00000009 r4:00000000
[ 142.103205] [<8001321c>] (show_stack) from [<80545e68>] (dump_stack+0x24/0x28)
[ 142.110442] [<80545e44>] (dump_stack) from [<8002d2b0>] (warn_slowpath_common+0x88/0xb4)
[ 142.118546] [<8002d228>] (warn_slowpath_common) from [<8002d314>] (warn_slowpath_fmt+0x38/0x40)
[ 142.127266] r8:00000000 r7:80779f52 r6:80750610 r5:9a313a00 r4:806c8c60
[ 142.134045] [<8002d2e0>] (warn_slowpath_fmt) from [<804684d8>] (dev_watchdog+0x2dc/0x30c)
[ 142.142224] r3:9a315800 r2:806c8c60
[ 142.145825] r4:9a315800
[ 142.148383] [<804681fc>] (dev_watchdog) from [<8006af94>] (call_timer_fn+0x2c/0xa0)
[ 142.156040] r8:00200200 r7:80741de8 r6:804681fc r5:00000101 r4:9a315a2c
[ 142.162813] [<8006af68>] (call_timer_fn) from [<8006b4b4>] (run_timer_softirq+0x2b8/0x2d0)
[ 142.171078] r6:00000000 r5:807bea80 r4:9a315a2c
[ 142.175745] [<8006b1fc>] (run_timer_softirq) from [<8002ff7c>] (__do_softirq+0x114/0x238)
[ 142.183923] r10:00000101 r9:00000001 r8:00000004 r7:8077ce84 r6:80740000 r5:00000000
[ 142.191817] r4:8077ce88
[ 142.194373] [<8002fe68>] (__do_softirq) from [<80030544>] (irq_exit+0xb8/0x100)
[ 142.201682] r10:00000000 r9:00000021 r8:9a005000 r7:00000000 r6:00000000 r5:00000010
[ 142.209574] r4:80759938
[ 142.212132] [<8003048c>] (irq_exit) from [<8005c528>] (__handle_domain_irq+0x60/0xb0)
[ 142.219961] r5:00000010 r4:80759938
[ 142.223570] [<8005c4c8>] (__handle_domain_irq) from [<800093e8>] (gic_handle_irq+0x2c/0x5c)
[ 142.231920] r9:00000021 r8:0eabc2ee r7:f4a02000 r6:80741ed8 r5:80742354 r4:f4a0200c
[ 142.239734] [<800093bc>] (gic_handle_irq) from [<80013d80>] (__irq_svc+0x40/0x88)
[ 142.247221] Exception stack(0x80741ed8 to 0x80741f20)
[ 142.252278] 1ec0: 80741f28 fffffff7
[ 142.260464] 1ee0: 123e69f8 00000021 123e69f8 00000021 8076cbb8 00000002 0eabc2ee 00000021
[ 142.268648] 1f00: 00000000 80741f5c 00000017 80741f20 a6aaaaab 803d85e8 600f0013 ffffffff
[ 142.276828] r7:80741f0c r6:ffffffff r5:600f0013 r4:803d85e8
[ 142.282550] [<803d8560>] (cpuidle_enter_state) from [<803d8774>] (cpuidle_enter+0x1c/0x20)
[ 142.290814] r10:8076cbb0 r9:00000001 r8:807420d4 r7:8074c140 r6:8076cbb8 r5:807420d4
[ 142.298707] r4:80740000
[ 142.301268] [<803d8758>] (cpuidle_enter) from [<80053ee8>] (cpu_startup_entry+0x178/0x23c)
[ 142.309545] [<80053d70>] (cpu_startup_entry) from [<80542530>] (rest_init+0x8c/0x90)
[ 142.317291] r7:ffffffff
[ 142.319849] [<805424a4>] (rest_init) from [<80705ce8>] (start_kernel+0x3a4/0x3b0)
[ 142.327332] r5:8077c000 r4:8077c050
[ 142.330945] [<80705944>] (start_kernel) from [<80008078>] (0x80008078)
[ 142.337478] ---[ end trace 37c6b41dd7f14c77 ]---
[ 142.342113] fec 20b4000.ethernet eth0: TX ring dump
[ 142.346993] Nr SC addr len SKB
[ 142.351357] 0 0x1c00 0x9a482800 1460 9a4605f0
[ 142.356151] cdb_esc = 0x18000000
[ 142.359385] 1 0x1400 0x9a482000 54 (null)
[ 142.364179] cdb_esc = 0x58000000
[ 142.367414] 2 0x1c00 0x9a949e30 1460 9a460170
[ 142.372208] cdb_esc = 0x18000000
[ 142.375444] 3 0x1400 0x9a4c9000 54 (null)
[ 142.380238] cdb_esc = 0x58000000
[ 142.383473] 4 0x1c00 0x9a4ca800 1460 9a4602f0
[ 142.388267] cdb_esc = 0x18000000

1、经多次测试发现问题多出现在CPU主动发送的时候

2、在出现问题时使用示波器查看TXD波形,会有稀疏的波形产生

3、跟踪代码发现txq->cur_tx也在移动(在fec_main.c中的fec_enet_tx_queue函数中)

4、查看了ENETx_EIR寄出中的(BABR、BABT、EBERR、LC、UN、PLR)相应的位(已配置EIMR),均未置1

5、查看了以下寄存器均未发现相关错误置位或计数不为0

dizhuyuan_0-1659622414776.png

dizhuyuan_1-1659622450666.png

6、查看了Enhanced transmit buffer descriptor    (ebdp->cbd_esc)

dizhuyuan_2-1659622566585.png

其中EE、FE、置1、(正常情况下也有置位的),bit30也有被置1的情况,但TXE没有置位,其他错误位均未发现置位。

7、使用MII-Lite(COL、CRS去掉)问题依旧存在。

8、RMII接口正常

现在是我不能找到相关硬件信息来表明网络发送出现问题。也无法进行及时的恢复操作。

从分析来看是发送数据包降速的非常低引起的。

在发送缓冲区满且超时时间到才出现上述内核报错。

有人知道是什么原因吗?期待您的回复,谢谢。

 

 

 

 

 

 

Labels (1)
0 Kudos
1 Solution
905 Views
dizhuyuan
Contributor III

最近重新做了测试底板,CPU提供PHY的时钟,暂时没有发生类似的现象。问题可能在信号质量上。


View solution in original post

0 Kudos
2 Replies
946 Views
jimmychan
NXP TechSupport
NXP TechSupport

L4.1.15 is quite old version of BSP. Could you try the newer version?

 

Linux BSP:

https://www.nxp.com/design/software/embedded-software/i-mx-software/embedded-linux-for-i-mx-applicat...

0 Kudos
906 Views
dizhuyuan
Contributor III

最近重新做了测试底板,CPU提供PHY的时钟,暂时没有发生类似的现象。问题可能在信号质量上。


0 Kudos