transmit queue 0 timed out (RGMII MAC to MAC - i.MX6Q)

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

transmit queue 0 timed out (RGMII MAC to MAC - i.MX6Q)

5,971 次查看
weichao_li1
Contributor I

hello,

我在使用i.MX6Q通过rgmii接口和sja1105通信时,遇到了transmit queue 0 timed out的问题,麻烦支持一下!谢谢!

问题描述:

1)linux内核版本4.14.98。

2)i.MX6Q通过rgmii和sja1105连接,mac to mac,固定为千兆,双工。

3)主要问题是网络不通,ping 100%丢包,过段时间以后出现NETDEV WATCHDOG: eth0 (fec): transmit queue 0 timed out,ping的过程中用示波器测量txc没有时钟信号。

设备树配置:

pinctrl_vmds_enet: vmds_enetgrp {

                            fsl,pins = <

                                   MX6QDL_PAD_RGMII_TXC__RGMII_TXC                  0x1b030

                                   MX6QDL_PAD_RGMII_TD0__RGMII_TD0                  0x1b030

                                   MX6QDL_PAD_RGMII_TD1__RGMII_TD1                  0x1b030

                                   MX6QDL_PAD_RGMII_TD2__RGMII_TD2                  0x1b030

                                   MX6QDL_PAD_RGMII_TD3__RGMII_TD3                  0x1b030

                                   MX6QDL_PAD_RGMII_TX_CTL__RGMII_TX_CTL        0x1b030

                                   MX6QDL_PAD_RGMII_RXC__RGMII_RXC                 0x1b030

                                   MX6QDL_PAD_RGMII_RD0__RGMII_RD0                 0x1b030

                                   MX6QDL_PAD_RGMII_RD1__RGMII_RD1                 0x1b030

                                   MX6QDL_PAD_RGMII_RD2__RGMII_RD2                 0x1b030

                                   MX6QDL_PAD_RGMII_RD3__RGMII_RD3                 0x1b030

                                   MX6QDL_PAD_RGMII_RX_CTL__RGMII_RX_CTL        0x1b030

                                   MX6QDL_PAD_GPIO_16__ENET_REF_CLK               0x4001b0a8

                            >;

                     };

&fec {

       pinctrl-0 = <&pinctrl_vmds_enet>;

       phy-mode = "rgmii-id";

       fsl,magic-packet;

       fixed-link {

              speed = <1000>;

              full-duplex;

    };

};

调试过程参考:

1)启动过程信息:

Generic PHY fixed-0:00: attached PHY driver [Generic PHY] (mii_bus:phy_addr=fixed-0:00, irq=POLL)

IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready

fec 2188000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off

IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

2)ping和ping后ifconfig结果

root@imx6qvmds:~# ping 192.168.100.10

PING 192.168.100.10 (192.168.100.10): 56 data bytes

^C

--- 192.168.100.10 ping statistics ---

9 packets transmitted, 0 packets received, 100% packet loss

 

root@imx6qvmds:~# ifconfig

eth0      Link encap:Ethernet  HWaddr 76:D9:14:98:64:99

          inet addr:192.168.100.12  Bcast:192.168.100.255  Mask:255.255.255.0

          inet6 addr: fe80::74d9:14ff:fe98:6499/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:2 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

 

lo        Link encap:Local Loopback

          inet addr:127.0.0.1  Mask:255.0.0.0

          inet6 addr: ::1/128 Scope:Host

          UP LOOPBACK RUNNING  MTU:65536  Metric:1

          RX packets:47200 errors:0 dropped:0 overruns:0 frame:0

          TX packets:47200 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:3398720 (3.2 MiB)  TX bytes:3398720 (3.2 MiB)

3)在调试fec过程中发现fec_enet_start_xmit已经被调用,但发送中断没有产生,查看bufdesc_ex的内容cbd_escINTTxBDOffset + A BIT14)设置为1

补充说明:

1)同样的内核代码在imx8qm和qxp上已经测试通过。

2)关于enet中dma的配置,我在imx8的手册上有看到ENET_DMA1CFG,当时imx6的手册上没有找到。

标签 (3)
标记 (3)
0 项奖励
回复
3 回复数

5,665 次查看
igorpadykov
NXP Employee
NXP Employee

Hi weichao

one can check solutions provided on

[PATCH] imx6q: work around fec tx-queue timeouts when SATA/SD + ethernet is active with high through... 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励
回复

5,665 次查看
weichao_li1
Contributor I

Hi igorpadykov

非常感谢您的回答!

我之前看过这个补丁,但4.14.98内核的fec.h已经修改了

#define FEC_ENET_RX_PAGES 256
#define FEC_ENET_RX_FRSIZE 2048
#define FEC_ENET_RX_FRPPG (PAGE_SIZE / FEC_ENET_RX_FRSIZE)
#define RX_RING_SIZE (FEC_ENET_RX_FRPPG * FEC_ENET_RX_PAGES)
#define FEC_ENET_TX_FRSIZE 2048
#define FEC_ENET_TX_FRPPG (PAGE_SIZE / FEC_ENET_TX_FRSIZE)
#define TX_RING_SIZE 512 /* Must be power of two */
#define TX_RING_MOD_MASK 511 /* for this to work */

#define BD_ENET_RX_INT 0x00800000

0 项奖励
回复

4,727 次查看
aa136466
Contributor I

Have you solved this problem? I also have a headache about this problem.

0 项奖励
回复