<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>i.MX ProcessorsのトピックFast Ethernet Controller FEC slow start</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Fast-Ethernet-Controller-FEC-slow-start/m-p/435738#M66723</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm building an embedded system using an IMX6SX. I need it to boot very fast, so I've been tuning boot parameters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The system first boots into uboot, which loads the kernel over TFTP, then boots into the kernel using NFS. My bootargs are:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;console=ttymxc0,115200 root=/dev/nfs ip=192.168.42.2:192.168.42.1:192.168.42.1:255.255.255.0::eth0 nfsroot=192.168.42.1:/tmp/rootfs quiet&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Most of the system is booted in the first 0.3 seconds. However when it comes to the FEC it hangs for something VERY close to exactly 4 seconds, before moving on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A log of the issue:&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://pastebin.com/GbHBMSuc" rel="nofollow"&gt;http://pastebin.com/GbHBMSuc&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I try the same boot using a fixed-phy setup, the 4 seconds are reduced to similarly close to 2 seconds, which is still a bit more than I would like. Otherwise the log looks the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To me, given the very exact times, it looks like a timeout or a delay. I was hoping that someone could give me some pointers to mitigate the problem a bit, be reducing the delay. In the final setup the phy will be an FPGA and I will be able to know everything about the setup beforehand, which I hope will help with boot time even further. I can't find what in the source code causes this delay and I can't seem to get it to print out anymore than it already does.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As soon as I get my hands on some of my custom boards, I will try booting without using NFS, which will also mean that the FEC driver is not strictly necessary on boot, which might make it possible to mitigate my problem.&lt;/P&gt;&lt;P&gt;[&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.304651] snvs_rtc 20cc034.snvs-rtc-lp: setting system clock to 1970-01-01 00:24:39 UTC (1479)&lt;BR /&gt;[&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.392520] fec 2188000.ethernet eth0: Freescale FEC PHY driver [Generic PHY] (mii_bus:phy_addr=2188000.ethernet:01, irq=-1)&lt;BR /&gt;[&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.392509] libphy: 2188000.ethernet:01 - Link is Up - 1000/Full&lt;BR /&gt;[&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.432115] IP-Config: Complete:&lt;BR /&gt;[&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.432132]&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; device=eth0, hwaddr=00:04:9f:03:87:c4, ipaddr=192.168.42.2, mask=255.255.255.0, gw=192.168.42.1&lt;BR /&gt;[&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.432141]&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; host=192.168.42.2, domain=, nis-domain=(none)&lt;BR /&gt;[&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.432149]&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; bootserver=192.168.42.1, rootserver=192.168.42.1, rootpath=&lt;BR /&gt;[&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.446599] VFS: Mounted root (nfs filesystem) readonly on device 0:12.&lt;BR /&gt;[&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.447943] devtmpfs: mounted&lt;BR /&gt;[&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.448153] Freeing unused kernel memory: 248K (80698000 - 806d6000)&lt;BR /&gt;[&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.761983] random: dd urandom read with 14 bits of entropy available&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 22 Jul 2015 12:25:25 GMT</pubDate>
    <dc:creator>frederikjuul</dc:creator>
    <dc:date>2015-07-22T12:25:25Z</dc:date>
    <item>
      <title>Fast Ethernet Controller FEC slow start</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Fast-Ethernet-Controller-FEC-slow-start/m-p/435738#M66723</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm building an embedded system using an IMX6SX. I need it to boot very fast, so I've been tuning boot parameters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The system first boots into uboot, which loads the kernel over TFTP, then boots into the kernel using NFS. My bootargs are:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;console=ttymxc0,115200 root=/dev/nfs ip=192.168.42.2:192.168.42.1:192.168.42.1:255.255.255.0::eth0 nfsroot=192.168.42.1:/tmp/rootfs quiet&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Most of the system is booted in the first 0.3 seconds. However when it comes to the FEC it hangs for something VERY close to exactly 4 seconds, before moving on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A log of the issue:&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://pastebin.com/GbHBMSuc" rel="nofollow"&gt;http://pastebin.com/GbHBMSuc&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I try the same boot using a fixed-phy setup, the 4 seconds are reduced to similarly close to 2 seconds, which is still a bit more than I would like. Otherwise the log looks the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To me, given the very exact times, it looks like a timeout or a delay. I was hoping that someone could give me some pointers to mitigate the problem a bit, be reducing the delay. In the final setup the phy will be an FPGA and I will be able to know everything about the setup beforehand, which I hope will help with boot time even further. I can't find what in the source code causes this delay and I can't seem to get it to print out anymore than it already does.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As soon as I get my hands on some of my custom boards, I will try booting without using NFS, which will also mean that the FEC driver is not strictly necessary on boot, which might make it possible to mitigate my problem.&lt;/P&gt;&lt;P&gt;[&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.304651] snvs_rtc 20cc034.snvs-rtc-lp: setting system clock to 1970-01-01 00:24:39 UTC (1479)&lt;BR /&gt;[&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.392520] fec 2188000.ethernet eth0: Freescale FEC PHY driver [Generic PHY] (mii_bus:phy_addr=2188000.ethernet:01, irq=-1)&lt;BR /&gt;[&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.392509] libphy: 2188000.ethernet:01 - Link is Up - 1000/Full&lt;BR /&gt;[&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.432115] IP-Config: Complete:&lt;BR /&gt;[&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.432132]&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; device=eth0, hwaddr=00:04:9f:03:87:c4, ipaddr=192.168.42.2, mask=255.255.255.0, gw=192.168.42.1&lt;BR /&gt;[&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.432141]&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; host=192.168.42.2, domain=, nis-domain=(none)&lt;BR /&gt;[&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.432149]&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; bootserver=192.168.42.1, rootserver=192.168.42.1, rootpath=&lt;BR /&gt;[&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.446599] VFS: Mounted root (nfs filesystem) readonly on device 0:12.&lt;BR /&gt;[&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.447943] devtmpfs: mounted&lt;BR /&gt;[&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.448153] Freeing unused kernel memory: 248K (80698000 - 806d6000)&lt;BR /&gt;[&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.761983] random: dd urandom read with 14 bits of entropy available&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jul 2015 12:25:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Fast-Ethernet-Controller-FEC-slow-start/m-p/435738#M66723</guid>
      <dc:creator>frederikjuul</dc:creator>
      <dc:date>2015-07-22T12:25:25Z</dc:date>
    </item>
    <item>
      <title>Re: Fast Ethernet Controller FEC slow start</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Fast-Ethernet-Controller-FEC-slow-start/m-p/435739#M66724</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think I found out the issue. I tracked it down to the state machine in the PHY subsystem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Apparently the PHY state machine needed two calls get ethernet up and running. These calls were queued in a work queue with a delay of 1 second. Two PHYs * two calls * 1 second = 4 seconds.&amp;nbsp; By changing the delay to 0 I got a much faster boot. Now I just need to test if the increased load on the PHY state machine breaks my system in other ways.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;New boot:&lt;/P&gt;&lt;P&gt;&lt;A href="http://pastebin.com/dPeqUHEv" title="http://pastebin.com/dPeqUHEv"&gt;changed phy.c - Pastebin.com&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The file i changed was in linux/drivers/net/phy/phy.c&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Specifically I changed the HZ to 0 in &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://lxr.free-electrons.com/source/drivers/net/phy/phy.c?v=3.14#L417" title="http://lxr.free-electrons.com/source/drivers/net/phy/phy.c?v=3.14#L417"&gt;Linux/drivers/net/phy/phy.c - Linux Cross Reference - Free Electrons&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;A href="http://lxr.free-electrons.com/source/drivers/net/phy/phy.c?v=3.14#L862" title="http://lxr.free-electrons.com/source/drivers/net/phy/phy.c?v=3.14#L862"&gt;Linux/drivers/net/phy/phy.c - Linux Cross Reference - Free Electrons&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2015 10:22:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Fast-Ethernet-Controller-FEC-slow-start/m-p/435739#M66724</guid>
      <dc:creator>frederikjuul</dc:creator>
      <dc:date>2015-07-23T10:22:16Z</dc:date>
    </item>
    <item>
      <title>Re: Fast Ethernet Controller FEC slow start</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Fast-Ethernet-Controller-FEC-slow-start/m-p/435740#M66725</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Frederik,&lt;/P&gt;&lt;P&gt;Thanks for sharing your solution with the Community!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards!&lt;/P&gt;&lt;P&gt;/Carlos&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2015 19:43:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Fast-Ethernet-Controller-FEC-slow-start/m-p/435740#M66725</guid>
      <dc:creator>CarlosCasillas</dc:creator>
      <dc:date>2015-07-23T19:43:38Z</dc:date>
    </item>
  </channel>
</rss>

