{"id":1831,"date":"2016-10-22T08:50:10","date_gmt":"2016-10-22T07:50:10","guid":{"rendered":"http:\/\/rglinuxtech.com\/?p=1831"},"modified":"2016-10-22T08:50:10","modified_gmt":"2016-10-22T07:50:10","slug":"arm64-odroid-c2-hack-to-fix-ethernet-hangs","status":"publish","type":"post","link":"https:\/\/rglinuxtech.com\/?p=1831","title":{"rendered":"ARM64 &#8211; Odroid C2 &#8211; Hack to Fix Ethernet Hangs.."},"content":{"rendered":"<p>I had been constantly frustrated by the Odroid C2 <strong><em>meson8b-dwmac<\/em><\/strong> Ethernet &#8216;hang&#8217; problem, which has persisted over (at least..) eight different &#8216;patched kernel&#8217; versions that I have tested..\u00a0\u00a0\u00a0 The network link hung\/stopped after a short time at full (1000Mbps) speed, and also &#8211; sometimes after a bit longer &#8211; at reduced (100Mbps) speed..<\/p>\n<p>The driver does show some issues, when loading:<\/p>\n<pre><strong><span style=\"font-family: courier new,courier;\">...................<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">[ 328.680810] meson8b-dwmac c9410000.ethernet: no reset control found<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">[ 328.684054] stmmac - user ID: 0x11, Synopsys ID: 0x37<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">[ 328.687734] Ring mode enabled<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">[ 328.689457] DMA HW capability register supported<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">[ 328.692650] Normal descriptors<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">[ 328.694454] RX Checksum Offload Engine supported<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">[ 328.697814] COE Type 2<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">[ 328.698934] TX Checksum insertion supported<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">[ 328.701866] Wake-Up On Lan supported<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">[ 328.704196] Enable RX Mitigation via HW Watchdog Timer<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">...........................<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">[ 328.718634] libphy: stmmac: probed<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">[ 328.718657] eth0: PHY ID 001cc916 at 0 IRQ POLL (stmmac-0:00) active<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">[ 328.720164] eth0: PHY ID 001cc916 at 7 IRQ POLL (stmmac-0:07)<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">.....................<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">[ 328.732305] eth0: device MAC address 00:1e:06:33:13:6e<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">[ 328.801693] meson8b-dwmac c9410000.ethernet eth0: PTP support cannot init.<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">......................<\/span><\/strong><\/pre>\n<p>After more testing (with the latest patched 4.9-rc1 Kernel), I tried turning off the flow control, to see if this made any difference..\u00a0\u00a0 At full speed, the network still hung, but at reduced speed the network link stayed up &#8211; although at a much reduced throughput, as expected..<\/p>\n<p>After boot, I used \u00a0 <strong><span style=\"font-family: courier new,courier;\"># ethtool -s eth0 speed 100 duplex full autoneg off<\/span><\/strong>\u00a0\u00a0 to get a working\/slow network..<\/p>\n<pre><strong><span style=\"font-family: courier new,courier;\">[ 346.559583] Link is Down<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">[ 347.219302] meson8b-dwmac c9410000.ethernet eth0: Link is Down<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">[ 350.291179] meson8b-dwmac c9410000.ethernet eth0: Link is Up - 100Mbps\/Full - flow control off<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">[ 350.946577] Link is Up - 100\/Full<\/span><\/strong><\/pre>\n<p>Using this, I have managed to do a complete Fedora 24 &#8211; 25 Upgrade on the C2, over the network..<\/p>\n<p><em>Robert Gadsdon.\u00a0\u00a0 October 21, 2016.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I had been constantly frustrated by the Odroid C2 meson8b-dwmac Ethernet &#8216;hang&#8217; problem, which has persisted over (at least..) eight different &#8216;patched kernel&#8217; versions that I have tested..\u00a0\u00a0\u00a0 The network link hung\/stopped after a short time at full (1000Mbps) speed, and also &#8211; sometimes after a bit longer &#8211; at reduced (100Mbps) speed.. The driver does show <span class=\"excerpt-dots\">&hellip;<\/span> <a class=\"more-link\" href=\"https:\/\/rglinuxtech.com\/?p=1831\"><span class=\"more-msg\">Continue reading &rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[1132,1131,6,10,1238,11,14,16,1437,1285,19,20],"tags":[1465,1466,1173,242,1464,1468,1286,1467,418],"class_list":["post-1831","post","type-post","status-publish","format-standard","hentry","category-aarch64","category-arm64","category-crash-and-burn","category-fedora","category-fix","category-hacks","category-kernel","category-linux-arm","category-network","category-odroid-c2","category-opinion","category-performance-2","tag-ethernet-hang","tag-flow-control","tag-kernel","tag-linux","tag-meson8b-dwmac","tag-network","tag-odroid-c2","tag-reduce-speed","tag-workaround"],"_links":{"self":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts\/1831","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1831"}],"version-history":[{"count":1,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts\/1831\/revisions"}],"predecessor-version":[{"id":1832,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts\/1831\/revisions\/1832"}],"wp:attachment":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1831"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1831"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1831"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}