TI中文支持网
TI专业的中文技术问题搜集分享网站

DM8168+1000M网卡芯片RTL8211EG软重启为什么不能正常工作?

环境: DM8168+dvrrdk4.0.0.2

问题描述: 测试1000M网卡芯片RTL8211EG的时候,网卡驱动没有做任何修改,网卡驱动可以支持RTL8211EG这款芯片,
如果把板子接到1000M交换机上
热拔插网线的话,可以ping通这个ip,网络正常
但是通过(ifconfig eth0 down /ifconfig eth0 up)关闭打开网卡配置网卡相关信息(比如mac地址,网关等等),重启网卡后
示波器测量网卡发送脚(TXD0~TXD7)其中的TXD0就不能发出数据,为什么?
如果把板子接到100M交换机上
热拔插或者(ifconfig eth0 down /ifconfig eth0 up)重启网卡网卡都正常。
现在问题是,接在1000M交换机上,网卡驱动都是一样的,为什么热拔插就可以,(ifconfig eth0 down /ifconfig eth0 up)就是不行?
热拔插就是4组差分线断开再连接,跟(ifconfig eth0 down /ifconfig eth0 up)没什么区别啊?

我这个问题,跟论坛里网友这个问题一模一样的
http://www.deyisupport.com/question_answer/dsp_arm/davinci_digital_media_processors/f/39/t/86489.aspx

做实验如下: 拔插网线内核打印
root@HDMTerm:~# cat /proc/kmsg<6>[ 353.420000] PHY: 0:00 – Link is Down
<6>[ 357.420000] PHY: 0:00 – Link is Up – 1000/Full

(ifconfig eth0 down /ifconfig eth0 up)重启网卡网卡内核打印
<4>[ 439.220000] davinci_mdio davinci_mdio.0: resetting idled controller
<6>[ 439.220000] net eth0: attached PHY driver [Generic PHY] (mii_bus:phy_addr=0:00, id=1cc915)
<6>[ 441.220000] PHY: 0:00 – Link is Up – 1000/Full

测量GTXCLK——吉比特TX..信号的时钟信号(125MHz)没有产生时钟

后来查阅资料发现
在千兆速率下,MAC向PHY提供GTXCLK信号,TXD,TXEN,TXER信号与此时钟信号同步.
否则,在10/100Mbps速率下,PHY提供TXCLK时钟信号给MAC,其它信号与此信号同步.
其工作频率为25MHz(100M网络)或2.5MHz(10M网络).因此我怀疑是软重启的时候寄存器没有打开mac提供给phy的GTXCLK(125M)时钟信号.

请问如何开启mac的GTXCLK(125M)时钟,由内核打印可以看出其实已经识别到了1000M网络信息了,
请TI的工程师给点意见,谢谢!

sir sanmaoljh:

现在测试发现ifconfig eth0 up后,ifconfig eth0 up后变成0x00000000一直是not idle状态,然后给EMAC0_TXCLK一个时钟(假如2.5Mhz)后,变成0x00000001,变成idle状态,同时mac也产生了EMAC0_GMTCLK(125Mhz)参考8168勘误表p12CPGMAC 1-Gbps Mode Does Not Work When EMAC_TXCLK is Not Running

软件解决方法:通过程序如何实现?有什么可以参考吗?谢谢!Software WorkaroundEMAC requires a clock on EMAC_TXCLK only on initialization.Enable EMAC as PHY (can be written only via MDIO), then disable auto-negotiation andforce 100-Mbps full-duplex GMII copper mode so that the PHY starts outputting the clockon EMAC_TXCLK. Then restart the EMAC so it is reinitialized while the clock is running.After that, auto-negotiation is enabled by the generic driver and the Ethernet works inboth U-Boot and Linux in all modes.

Chris Meng:

回复 sir sanmaoljh:

你好,

你是否有参考过下面论坛讨论的方法?

https://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/717/t/128095

赞(0)
未经允许不得转载:TI中文支持网 » DM8168+1000M网卡芯片RTL8211EG软重启为什么不能正常工作?
分享到: 更多 (0)