1 Issue:
The Toshiba neutrino ethernet driver cann't ping PC:
Add dts node "qcom,ntn_avb" in our dts, ping success on 100M.
But it ping fail on 1000MHz.
1.1 Test step:
push the Neutrino firmware(DWC_ETH_QOS_fw.bin) to /tmp:
overlay the /lib/firmware/ by tmp
cd /tmp
mkdir upper work
mount -t overlay overlay -olowerdir=/lib,upperdir=/tmp/upper,workdir=/tmp/work /lib
cp /tmp/DWC_ETH_QOS_fw.bin /lib/firmware/
insmod the driver:
modprobe DWC_ETH_QOS.ko fw_filename=DWC_ETH_QOS_fw.bin
config device and PC ip on same subnet
ifconfig eth0 192.168.225.3 up
1.2 Test status:
- Use Usb-Ethernet adapter(100M) connect PC, DUT connect the adapter, DUT can ping PC success each other .
- DUT connect PC, ping fail.
- Use 100M SWITCH connect our DUT and PC, DUT can ping PC success each other .
- Use 1000M SWITCH connect our DUT and PC, ping fail.
- change network cable ,the same result.
- use toshiba release driver, the same test result.
2 investigate method
2.1 adjust between 100M and 1000M
from the 100M dmesg log:
DWC_ETH_QOS 0000:01:00.0 eth0: Link is Up - 100Mbps/Full - flow control rx/tx
But from 1000M dmesg log:
DWC_ETH_QOS 0000:01:00.0 eth0: Link is Up - 1Gbps/Full - flow control of
This log from kernel/drivers/net/phy/phy.c phy_print_status() ,and be called by DWC_ETH_QOS_adjust_link.
In DWC_ETH_QOS_adjust_link():
case SPEED_1000:
hw_if->set_gmii_speed(pdata);
hw_if->ntn_set_tx_clk_125MHz(pdata);
break;
case SPEED_100:
hw_if->set_mii_speed_100(pdata);
hw_if→ntn_set_tx_clk_25MHz(pdata);
Eth0 related attribute node:
root@swi-mdm9x40:~# cd /sys/class/net/eth0
root@swi-mdm9x40:/sys/devices/80000.qcom,pcie/pci0000:00/0000:00:00.0/0000:01:00.0/net/eth0# ls
addr_assign_type device mtu statistics
addr_len dormant name_assign_type subsystem
address duplex netdev_group tx_queue_len
broadcast flags operstate type
carrier ifalias phys_port_id uevent
carrier_changes ifindex power
dev_id iflink queues
dev_port link_mode speed
Read speed node ,the speed value is correct.
From dmesg log and speed , we know adjust function is normal.
2.2 tcpdump
100M tcpdump :
root@swi-mdm9x40:/tmp# tcpdump -i eth0 -v
tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
00:58:48.551237 IP (tos 0x0, ttl 128, id 31617, offset 0, flags [none], proto UDP (17), length 96)
192.168.225.2.netbios-ns > 192.168.225.255.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
00:58:49.301272 IP (tos 0x0, ttl 128, id 31618, offset 0, flags [none], proto UDP (17), length 96)
192.168.225.2.netbios-ns > 192.168.225.255.ne