Internet disconnect after a period of communication

Hi,
I used a switch chip instead of a PHY for Ethernet On ourself carrier board.I changed the PHY mode to fixed link,after that,the Internet is OK,but after a while,the Internet is down.Then i used command "sudo ifconfig eth0 down"and “sudo ifconfig eth0 up”,the Internet is OK and after a while down again.Please help what is the problem?

Please share more information of your ethernet configuration and paste the dmesg log.

Hi WayneWWW,
The only change for device tree is as below

//      phy-handle = <&phy0>;
        fixed-link  {
                         speed = <1000>;
                         full-duplex;
                };

I commented the phy-handle and added fixed-link.After Xavier powered up,the Internet is OK upon DHCP or static IP.And I excluded the cause of IP conflicts. After Ubuntu disconnected from Internet,the icon on the upper right corner of the Desktop is still showing connection normally all the time.

when powered up,the dmesg is show as below,the Internet is connected.

nvidia@jetson-0423418009920:~$ dmesg|grep eth
[    0.000000] psci: probing for conduit method from DT.
[    0.964568] iommu: Adding device 2490000.ether_qos to group 4
[    4.327890] eqos 2490000.ether_qos: no PHY interrupt found
[    4.327926] usbcore: registered new interface driver cdc_ether
[    4.332580] eqos 2490000.ether_qos: No prod values found
[    4.333604] eqos 2490000.ether_qos: Setting local MAC: 0 4 4b cb a3 e6
[   15.041387] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   15.045321] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   16.065149] eqos 2490000.ether_qos eth0: Link is Up - 1Gbps/Full - flow control off
[   16.065316] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

Any kernel error when the disconnection?

Hi,
I can not see any error for Eth. By the way,if there is high packet loss rate,could it lead to Internet down with no warning?

nvidia@jetson-0423418009920:~$ grep kernel /var/log/syslog |grep error
Apr 18 09:36:39 jetson-0423418009920 kernel: [    4.386869] tegra-xusb 3610000.xhci: Direct firmware load for tegra19x_xusb_firmware failed with error -2
Apr 18 09:36:39 jetson-0423418009920 kernel: [    9.809264] tegra186-cam-rtcpu bc00000.rtcpu: IOVM setup error: 130
Apr 18 09:36:39 jetson-0423418009920 kernel: [    9.811252] tegra186-cam-rtcpu bc00000.rtcpu: RTCPU coverage: IOVM setup error : 4294967291
Apr 18 09:50:45 jetson-0423418009920 kernel: [    4.414320] tegra-xusb 3610000.xhci: Direct firmware load for tegra19x_xusb_firmware failed with error -2
Apr 18 09:50:45 jetson-0423418009920 kernel: [    9.772639] tegra186-cam-rtcpu bc00000.rtcpu: IOVM setup error: 130
Apr 18 09:50:45 jetson-0423418009920 kernel: [    9.774696] tegra186-cam-rtcpu bc00000.rtcpu: RTCPU coverage: IOVM setup error : 4294967291
Apr 18 10:30:34 jetson-0423418009920 kernel: [    4.431626] tegra-xusb 3610000.xhci: Direct firmware load for tegra19x_xusb_firmware failed with error -2
Apr 18 10:30:34 jetson-0423418009920 kernel: [    9.795374] tegra186-cam-rtcpu bc00000.rtcpu: IOVM setup error: 130
Apr 18 10:30:34 jetson-0423418009920 kernel: [    9.797198] tegra186-cam-rtcpu bc00000.rtcpu: RTCPU coverage: IOVM setup error : 4294967291
Apr 18 13:57:39 jetson-0423418009920 kernel: [    4.342292] tegra-xusb 3610000.xhci: Direct firmware load for tegra19x_xusb_firmware failed with error -2
Apr 18 13:57:39 jetson-0423418009920 kernel: [    7.421457] tegra186-cam-rtcpu bc00000.rtcpu: IOVM setup error: 130
Apr 18 13:57:39 jetson-0423418009920 kernel: [    7.421462] tegra186-cam-rtcpu bc00000.rtcpu: RTCPU coverage: IOVM setup error : 4294967291
Apr 18 14:34:17 jetson-0423418009920 kernel: [    4.339135] tegra-xusb 3610000.xhci: Direct firmware load for tegra19x_xusb_firmware failed with error -2
Apr 18 14:34:17 jetson-0423418009920 kernel: [    9.741802] tegra186-cam-rtcpu bc00000.rtcpu: IOVM setup error: 130
Apr 18 14:34:17 jetson-0423418009920 kernel: [    9.743802] tegra186-cam-rtcpu bc00000.rtcpu: RTCPU coverage: IOVM setup error : 4294967291
Apr 18 15:43:53 jetson-0423418009920 kernel: [    4.352184] tegra-xusb 3610000.xhci: Direct firmware load for tegra19x_xusb_firmware failed with error -2
Apr 18 15:43:53 jetson-0423418009920 kernel: [    9.714366] tegra186-cam-rtcpu bc00000.rtcpu: IOVM setup error: 130
Apr 18 15:43:53 jetson-0423418009920 kernel: [    9.716240] tegra186-cam-rtcpu bc00000.rtcpu: RTCPU coverage: IOVM setup error : 4294967291
Apr 18 15:44:00 jetson-0423418009920 NetworkManager[4504]: <info>  [1555573440.1784] device (eth0): state change: ip-check -> secondaries (reason 'none', sys-if
Apr 18 15:44:00 jetson-0423418009920 NetworkManager[4504]: <info>  [1555573440.1801] device (eth0): state change: secondaries -> activated (reason 'none', sys-i
Apr 18 15:44:00 jetson-0423418009920 NetworkManager[4504]: <info>  [1555573440.1811] manager: NetworkManager state is now CONNECTED_LOCAL
Apr 18 15:44:00 jetson-0423418009920 NetworkManager[4504]: <info>  [1555573440.1878] manager: NetworkManager state is now CONNECTED_SITE
Apr 18 15:44:00 jetson-0423418009920 NetworkManager[4504]: <info>  [1555573440.1884] policy: set 'Ethernet connection 1' (eth0) as default for IPv4 routing and 
Apr 18 15:44:00 jetson-0423418009920 NetworkManager[4504]: <info>  [1555573440.1899] device (eth0): Activation: successful, device activated.
Apr 18 15:44:00 jetson-0423418009920 NetworkManager[4504]: <info>  [1555573440.1980] manager: startup complete
Apr 18 15:44:05 jetson-0423418009920 NetworkManager[4504]: <info>  [1555573445.3507] bluez: use BlueZ version 5
Apr 18 15:44:12 jetson-0423418009920 NetworkManager[4504]: <info>  [1555573452.9744] manager: NetworkManager state is now CONNECTED_GLOBAL
Apr 18 15:49:21 jetson-0423418009920 NetworkManager[4504]: <info>  [1555573761.1555] manager: NetworkManager state is now CONNECTED_SITE
nvidia@jetson-0423418009920:~$ service NetworkManager status
● NetworkManager.service - Network Manager
   Loaded: loaded (/lib/systemd/system/NetworkManager.service; enabled; vendor preset: enabled)
   Active: active (running) since Thu 2019-04-18 15:43:54 CST; 10min ago
     Docs: man:NetworkManager(8)
 Main PID: 4504 (NetworkManager)
    Tasks: 4 (limit: 4915)
   CGroup: /system.slice/NetworkManager.service
           └─4504 /usr/sbin/NetworkManager --no-daemon

Apr 18 15:44:00 jetson-0423418009920 NetworkManager[4504]: <info>  [1555573440.1784] device (eth0): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'managed')
Apr 18 15:44:00 jetson-0423418009920 NetworkManager[4504]: <info>  [1555573440.1801] device (eth0): state change: secondaries -> activated (reason 'none', sys-iface-state: 'managed')
Apr 18 15:44:00 jetson-0423418009920 NetworkManager[4504]: <info>  [1555573440.1811] manager: NetworkManager state is now CONNECTED_LOCAL
Apr 18 15:44:00 jetson-0423418009920 NetworkManager[4504]: <info>  [1555573440.1878] manager: NetworkManager state is now CONNECTED_SITE
Apr 18 15:44:00 jetson-0423418009920 NetworkManager[4504]: <info>  [1555573440.1884] policy: set 'Ethernet connection 1' (eth0) as default for IPv4 routing and DNS
Apr 18 15:44:00 jetson-0423418009920 NetworkManager[4504]: <info>  [1555573440.1899] device (eth0): Activation: successful, device activated.
Apr 18 15:44:00 jetson-0423418009920 NetworkManager[4504]: <info>  [1555573440.1980] manager: startup complete
Apr 18 15:44:05 jetson-0423418009920 NetworkManager[4504]: <info>  [1555573445.3507] bluez: use BlueZ version 5
Apr 18 15:44:12 jetson-0423418009920 NetworkManager[4504]: <info>  [1555573452.9744] manager: NetworkManager state is now CONNECTED_GLOBAL
Apr 18 15:49:21 jetson-0423418009920 NetworkManager[4504]: <info>  [1555573761.1555] manager: NetworkManager state is now CONNECTED_SITE

What did you do in this log? Do you capture the syslog after you use “ifconfig eth0 up”?

if there is high packet loss rate,could it lead to Internet down with no warning?

How do you create “high packet loss” in this test? I don’t think it would crash the internet.

BTW, does your application have any error with our default PHY on devkit?

What did you do in this log? Do you capture the syslog after you use “ifconfig eth0 up”?
I did nothing in this log.The upper log showed no complete .

Do you capture the syslog after you use “ifconfig eth0 up”?
Yes,after use “ifconfig eth0 up”,the syslog no change.But before use “ifconfig eth0 up”,using “ifconfig eth0 down”,the syslog shows

Apr 18 17:12:07 jetson-0423418009920 NetworkManager[4380]: <info>  [1555578727.1364] device (eth0): state change: unavailable -> disconnected (reason 'carrier-changed', sys-iface-state: 'managed')
Apr 18 17:12:07 jetson-0423418009920 NetworkManager[4380]: <info>  [1555578727.1411] policy: auto-activating connection 'Ethernet connection 1'
Apr 18 17:12:07 jetson-0423418009920 NetworkManager[4380]: <info>  [1555578727.1494] device (eth0): Activation: starting connection 'Ethernet connection 1' (3012c83e-0197-4b54-8713-36cca469ca6d)
Apr 18 17:12:07 jetson-0423418009920 NetworkManager[4380]: <info>  [1555578727.1508] device (eth0): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
Apr 18 17:12:07 jetson-0423418009920 NetworkManager[4380]: <info>  [1555578727.1537] manager: NetworkManager state is now CONNECTING
Apr 18 17:12:07 jetson-0423418009920 NetworkManager[4380]: <info>  [1555578727.1585] device (eth0): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
Apr 18 17:12:07 jetson-0423418009920 NetworkManager[4380]: <info>  [1555578727.1616] device (eth0): state change: config -> ip-config (reason 'none', sys-iface-state: 'managed')
Apr 18 17:12:07 jetson-0423418009920 NetworkManager[4380]: <info>  [1555578727.1851] device (eth0): state change: ip-config -> ip-check (reason 'none', sys-iface-state: 'managed')
Apr 18 17:12:07 jetson-0423418009920 NetworkManager[4380]: <info>  [1555578727.1975] device (eth0): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'managed')
Apr 18 17:12:07 jetson-0423418009920 NetworkManager[4380]: <info>  [1555578727.2002] device (eth0): state change: secondaries -> activated (reason 'none', sys-iface-state: 'managed')
Apr 18 17:12:07 jetson-0423418009920 NetworkManager[4380]: <info>  [1555578727.2010] manager: NetworkManager state is now CONNECTED_LOCAL
Apr 18 17:12:07 jetson-0423418009920 NetworkManager[4380]: <info>  [1555578727.2081] manager: NetworkManager state is now CONNECTED_SITE
Apr 18 17:12:07 jetson-0423418009920 NetworkManager[4380]: <info>  [1555578727.2085] policy: set 'Ethernet connection 1' (eth0) as default for IPv4 routing and DNS
Apr 18 17:12:07 jetson-0423418009920 NetworkManager[4380]: <info>  [1555578727.2151] device (eth0): Activation: successful, device activated.
Apr 18 17:12:07 jetson-0423418009920 dbus-daemon[4352]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.service' requested by ':1.9' (uid=0 pid=4380 comm="/usr/sbin/NetworkManager --no-daemon ")
Apr 18 17:12:22 jetson-0423418009920 NetworkManager[4380]: <info>  [1555578742.2984] manager: NetworkManager state is now CONNECTED_GLOBAL
Apr 18 17:12:22 jetson-0423418009920 dbus-daemon[4352]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.service' requested by ':1.9' (uid=0 pid=4380 comm="/usr/sbin/NetworkManager --no-daemon ")
Apr 18 17:12:22 jetson-0423418009920 whoopsie[5021]: [17:12:22] The default IPv4 route is: /org/freedesktop/NetworkManager/ActiveConnection/3
Apr 18 17:12:22 jetson-0423418009920 whoopsie[5021]: [17:12:22] Not a paid data plan: /org/freedesktop/NetworkManager/ActiveConnection/3
Apr 18 17:12:22 jetson-0423418009920 whoopsie[5021]: [17:12:22] Found usable connection: /org/freedesktop/NetworkManager/ActiveConnection/3
Apr 18 17:12:35 jetson-0423418009920 NetworkManager[4380]: <info>  [1555578755.0395] manager: NetworkManager state is now CONNECTED_SITE
Apr 18 17:12:35 jetson-0423418009920 dbus-daemon[4352]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.service' requested by ':1.9' (uid=0 pid=4380 comm="/usr/sbin/NetworkManager --no-daemon ")
Apr 18 17:12:36 jetson-0423418009920 NetworkManager[4380]: <info>  [1555578756.1589] device (eth0): carrier: link connected

How do you create “high packet loss” in this test? I don’t think it would crash the internet.
I agree with you.

BTW, does your application have any error with our default PHY on devkit?
When using the nvidia carrier board with your default PHY on devkit, there is no error in our application. Our carrier board using a switch instead of a PHY. And no driver changed except the device tree.

So even syslog does not give out any disconnection message when you hit error?

Sorry for my mistake, I thought you are using a new PHY. Does it mean I can reproduce this issue with my devkit if I connect it to a switch (maybe need your application)?

I also wonder why you need to set link speed and full/half duplex in DT. Why cannot use auto negotiation?

So even syslog does not give out any disconnection message when you hit error?
Yes,no error in syslog.

Does it mean I can reproduce this issue with my devkit if I connect it to a switch (maybe need your application)?
I dont think so.The swtich I used is an on board chip that connected Xavier with RGMII. I think it is different If you only connected it to a external swtich with RJ45 on devkit ,unless using a swtich chip instead the PHY on devkit.

I also wonder why you need to set link speed and full/half duplex in DT. Why cannot use auto negotiation?
Beacause the port of switch chip connected to RGMII of Xavier is fixed to 1000 speed. It is possible that is the problem?

In DT,if make no any change,the PHY part of the Eth driver would accured error and the Ethernet could not be initialized,Because there’s no SMA PHY control port for Xavier or its driver.So the phy mode of the driver should be set to fixed-link.

Any help?

Hi 544485316,

There is a cycle auto-off during work, looks like some period wake-driving problem. You should ask for the help from vendor of switch first.

I made the same changes as you,but my net work doesn`t work.

nvidia@jetson-0423518031457:~$ dmesg | grep eth
[    0.000000] psci: probing for conduit method from DT.
[    0.972362] iommu: Adding device 2490000.ether_qos to group 4
[    4.327664] eqos 2490000.ether_qos: no PHY interrupt found
[    4.327730] usbcore: registered new interface driver cdc_ether
[    4.341807] eqos 2490000.ether_qos: No prod values found
[    4.342531] eqos 2490000.ether_qos: Setting local MAC: 0 4 4b cb af 67
[    9.493135] using random self ethernet address
[    9.495249] using random host ethernet address
[    9.519804] using random self ethernet address
[    9.519806] using random host ethernet address
[   10.527367] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   10.543192] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   11.570558] eqos 2490000.ether_qos eth0: Link is Up - 1Gbps/Full - flow control off
[   11.570635] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   20.646436] bnep: disagrees about version of symbol eth_validate_addr
[   20.646910] bnep: Unknown symbol eth_validate_addr (err -22)
[   20.648226] bnep: disagrees about version of symbol ether_setup
[   20.654243] bnep: Unknown symbol ether_setup (err -22)
[   20.670987] bnep: disagrees about version of symbol eth_type_trans
[   20.677339] bnep: Unknown symbol eth_type_trans (err -22)
[   21.004064] bnep: disagrees about version of symbol eth_change_mtu
[   21.010310] bnep: Unknown symbol eth_change_mtu (err -22)

Have you made any other changes?

Thanks