Part Number:TDA4VM
环境:J721E EVM,自编译SBL启动版本
现象:eth0网口存在,但是配置IP地址后,无法和外部通信。
问题排查过程:
1、TCP/IP无问题:ifconfig eth0 网口存在,且ping包的时候,TX packets计数在增长,ping 127.0.0.1可以ping通。
2、网口PHY工作正常:J721E EVM和PC通过1000M以太网线连接的时候,日志口有打印“eth0: link becomes ready”和“am65-cpsw-nuss 46000000.ethernet eth0: Link is Up – 1Gbps/Full – flow control rx/tx”,且ethtool eth0可以看到link up。
3、网络发送DMA应当没有问题:a. 中断号注册成功:am65_cpsw_nuss_ndev_add_tx_napi函数中tx_chn->irq=63,am65_cpsw_nuss_init_rx_chns函数中rx_chn->irq=65
b.am65_cpsw_nuss_tx_compl_packets函数可以走到,且发送看起来也是正常的,每次发包while中第一次发送res返回0,第二次res返回-ENODATA。
4、问题点1:"ethtool -S eth0" 发现tx_good_frames=0。通过查看“am65-cpsw-ethtool.c”代码,“tx_good_frames”是直接读取的寄存器值。
5、问题点2:ifconfig -a之后,只发现了“eth0”和“lo”两个网卡,其它虚拟网卡都没有。
6、问题点3:我们使用的设备树是“k3-j721e-mcu-wakeup.dtsi”,eth0设备树如下:
mcu_cpsw: ethernet@46000000 {
compatible = "ti,j721e-cpsw-nuss";
#address-cells = <2>;
#size-cells = <2>;
reg = <0x0 0x46000000 0x0 0x200000>;
reg-names = "cpsw_nuss";
ranges = <0x0 0x0 0x0 0x46000000 0x0 0x200000>;
dma-coherent;
clocks = <&k3_clks 18 22>;
clock-names = "fck";
power-domains = <&k3_pds 18 TI_SCI_PD_EXCLUSIVE>;
dmas = <&mcu_udmap 0xf000>,
<&mcu_udmap 0xf001>,
<&mcu_udmap 0xf002>,
<&mcu_udmap 0xf003>,
<&mcu_udmap 0xf004>,
<&mcu_udmap 0xf005>,
<&mcu_udmap 0xf006>,
<&mcu_udmap 0xf007>,
<&mcu_udmap 0x7000>;
dma-names = "tx0", "tx1", "tx2", "tx3",
"tx4", "tx5", "tx6", "tx7",
"rx";
ethernet-ports {
#address-cells = <1>;
#size-cells = <0>;
cpsw_port1: port@1 {
reg = <1>;
ti,mac-only;
label = "port1";
ti,syscon-efuse = <&mcu_conf 0x200>;
phys = <&phy_gmii_sel 1>;
};
};
davinci_mdio: mdio@f00 {
compatible = "ti,cpsw-mdio","ti,davinci_mdio";
reg = <0x0 0xf00 0x0 0x100>;
#address-cells = <1>;
#size-cells = <0>;
clocks = <&k3_clks 18 22>;
clock-names = "fck";
bus_freq = <1000000>;
};
cpts@3d000 {
compatible = "ti,am65-cpts";
reg = <0x0 0x3d000 0x0 0x400>;
clocks = <&k3_clks 18 2>;
clock-names = "cpts";
interrupts-extended = <&gic500 GIC_SPI 858 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "cpts";
ti,cpts-ext-ts-inputs = <4>;
ti,cpts-periodic-outputs = <2>;
};
};
cao qi:
添加一个问题现象,发送一会包之后提示错误信息:am65-cpsw-nuss 46000000.ethernet eth0: txq:0 DRV_XOFF:0 tmo:482336 dql_avail:-6 free_desc:508
,
Cherry Zhou:
您好,您的问题我们需要升级到英文论坛寻求帮助,链接如下:
https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1273081/tda4vm-eth0-failed-to-start