rk3568 yt8521S phy设备层丢包定位处理
0,场景
PC持续向主控端发包时,发现mac-rx有误码统计,我们交叉对换硬件设备上的phy设备,查看丢包是跟着phy芯片走的,而且我们查看对接设备打流100M没有丢包,1000M有丢包统计。
1,查看收发包统计
由PC持续向主控端发包。
a,根据上图配置remote loopback模式(不过mac层) 。
b, 配置ext_reg0xA0 bit15置1 bit14清0 打开收发包统计。
c,轮询 读取下图查看收发包计数结果 。
查看是否还是否有丢包,如果没有就要查看mac层。如果有就看phy.
2,环回查看收发包情况寄存器配置
环回测试:
3,查看a001和a003 寄存器,查看工作模式和tx-delay和rx-delay。
[root@platform:/app]# ./mii_cmd w 0 0x1 0x16 0xa001
MII_DEV:/dev/miio_0x00000000001afc000
[root@platform:/app]# ./mii_cmd r 0 0x1 0x1f
MII_DEV:/dev/miio_0x00000000001afc000
bus:0
reg:0x1f
val:8150
[root@platform:/app]# ./mii_cmd w 0 0x1 0x16 0xa003
MII_DEV:/dev/miio_0x00000000001afc000
[root@platform:/app]# ./mii_cmd r 0 0x1 0x1f
MII_DEV:/dev/miio_0x00000000001afc000
bus:0
reg:0x1f
val:0x00f3
将a003写为0xff后正常,没有丢包。
写寄存器
[root@platform:/app]# ./mii_cmd w 0 0x1 0x16 0xa001
MII_DEV:/dev/miio_0x00000000001afc000
[root@platform:/app]# ./mii_cmd w 0 0x1 0x1f 0xff
MII_DEV:/dev/miio_0x00000000001afc000
[root@platform:/app]# ./mii_cmd w 0 0x1 0x16 0xa003
MII_DEV:/dev/miio_0x00000000001afc000
[root@platform:/app]# ./mii_cmd r 0 0x1 0x1f
MII_DEV:/dev/miio_0x00000000001afc000
bus:0
reg:0x1f
val:0x00ff