<?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中的主题 missing half-duplex support with L2-switch</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/missing-half-duplex-support-with-L2-switch/m-p/148136#M554</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;we want to use the L2-switch on our own hardware and found that half-duplex connections are not supported. Comparing with the iMX28 EVK we got the same results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The L2-switch will be configured inside the kernel config as follows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Linux Kernel Configuration&lt;BR /&gt;-&amp;gt; Device Drivers&lt;BR /&gt;--&amp;gt; Network device support&lt;BR /&gt;---&amp;gt; Ethernet (10 or 100Mbit)&lt;BR /&gt;----&amp;gt; L2 Switch Ethernet Controller (of ColdFire CPUs)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and if we plupped in/off an network cable, we got following.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;root@imx28evk ~$ PHY: 0:01 - Link is Up - 10/Half&lt;BR /&gt;PHY: 0:01 - Link is Up - 10/Half&lt;BR /&gt;PHY: 0:01 - Link is Up - 10/Half&lt;BR /&gt;PHY: 0:01 - Link is Up - 10/Half&lt;BR /&gt;PHY: 0:01 - Link is Up - 10/Half&lt;BR /&gt;PHY: 0:01 - Link is Up - 10/Half&lt;BR /&gt;PHY: 0:01 - Link is Up - 10/Half&lt;BR /&gt;PHY: 0:01 - Link is Down&lt;BR /&gt;PHY: 0:00 - Link is Up - 10/Half&lt;BR /&gt;PHY: 0:00 - Link is Up - 10/Half&lt;BR /&gt;PHY: 0:00 - Link is Up - 10/Half&lt;BR /&gt;PHY: 0:00 - Link is Up - 10/Half&lt;BR /&gt;PHY: 0:00 - Link is Up - 10/Half&lt;BR /&gt;PHY: 0:00 - Link is Down&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Searching for the reason inside the kernel sourcecode, I've added some debug code into drivers/net/phy/phy.c. - void phy_state_machine(struct work_struct *work).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here I've seen that the state handler for port 1 floated between 6 ond 9, PHY_RUNNING and PHY_CHANGELINK and sends the Link is Up - 10/Half message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Searching further, I found the missing part inside static fec-switch.c - void switch_adjust_link0(struct net_device *dev)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Duplex link change */&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;if (phy_dev-&amp;gt;link) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;if (fep-&amp;gt;full_duplex != phy_dev-&amp;gt;duplex)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;status_change = 1;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;!!! Here all the time a status_change will be detected !!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Comparing with fec.c - static void fec_enet_adjust_link(struct net_device *dev)&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;/* Duplex link change */&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;if (phy_dev-&amp;gt;link) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;if (fep-&amp;gt;full_duplex != phy_dev-&amp;gt;duplex) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;fec_restart(dev, phy_dev-&amp;gt;duplex);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;status_change = 1;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;/P&gt;&lt;P&gt;there is no function like fec_restart(dev, phy_dev-&amp;gt;duplex) for the L2-switch.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any solution available to use a half-duplex connection together with the L2-switch?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The 10/Half duplex link works fine using normal eth setting without l2-switch&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Birger&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 23 Mar 2012 12:45:07 GMT</pubDate>
    <dc:creator>bba</dc:creator>
    <dc:date>2012-03-23T12:45:07Z</dc:date>
    <item>
      <title>missing half-duplex support with L2-switch</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/missing-half-duplex-support-with-L2-switch/m-p/148136#M554</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;we want to use the L2-switch on our own hardware and found that half-duplex connections are not supported. Comparing with the iMX28 EVK we got the same results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The L2-switch will be configured inside the kernel config as follows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Linux Kernel Configuration&lt;BR /&gt;-&amp;gt; Device Drivers&lt;BR /&gt;--&amp;gt; Network device support&lt;BR /&gt;---&amp;gt; Ethernet (10 or 100Mbit)&lt;BR /&gt;----&amp;gt; L2 Switch Ethernet Controller (of ColdFire CPUs)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and if we plupped in/off an network cable, we got following.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;root@imx28evk ~$ PHY: 0:01 - Link is Up - 10/Half&lt;BR /&gt;PHY: 0:01 - Link is Up - 10/Half&lt;BR /&gt;PHY: 0:01 - Link is Up - 10/Half&lt;BR /&gt;PHY: 0:01 - Link is Up - 10/Half&lt;BR /&gt;PHY: 0:01 - Link is Up - 10/Half&lt;BR /&gt;PHY: 0:01 - Link is Up - 10/Half&lt;BR /&gt;PHY: 0:01 - Link is Up - 10/Half&lt;BR /&gt;PHY: 0:01 - Link is Down&lt;BR /&gt;PHY: 0:00 - Link is Up - 10/Half&lt;BR /&gt;PHY: 0:00 - Link is Up - 10/Half&lt;BR /&gt;PHY: 0:00 - Link is Up - 10/Half&lt;BR /&gt;PHY: 0:00 - Link is Up - 10/Half&lt;BR /&gt;PHY: 0:00 - Link is Up - 10/Half&lt;BR /&gt;PHY: 0:00 - Link is Down&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Searching for the reason inside the kernel sourcecode, I've added some debug code into drivers/net/phy/phy.c. - void phy_state_machine(struct work_struct *work).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here I've seen that the state handler for port 1 floated between 6 ond 9, PHY_RUNNING and PHY_CHANGELINK and sends the Link is Up - 10/Half message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Searching further, I found the missing part inside static fec-switch.c - void switch_adjust_link0(struct net_device *dev)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Duplex link change */&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;if (phy_dev-&amp;gt;link) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;if (fep-&amp;gt;full_duplex != phy_dev-&amp;gt;duplex)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;status_change = 1;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;!!! Here all the time a status_change will be detected !!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Comparing with fec.c - static void fec_enet_adjust_link(struct net_device *dev)&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;/* Duplex link change */&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;if (phy_dev-&amp;gt;link) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;if (fep-&amp;gt;full_duplex != phy_dev-&amp;gt;duplex) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;fec_restart(dev, phy_dev-&amp;gt;duplex);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;status_change = 1;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;/P&gt;&lt;P&gt;there is no function like fec_restart(dev, phy_dev-&amp;gt;duplex) for the L2-switch.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any solution available to use a half-duplex connection together with the L2-switch?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The 10/Half duplex link works fine using normal eth setting without l2-switch&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Birger&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Mar 2012 12:45:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/missing-half-duplex-support-with-L2-switch/m-p/148136#M554</guid>
      <dc:creator>bba</dc:creator>
      <dc:date>2012-03-23T12:45:07Z</dc:date>
    </item>
    <item>
      <title>Re: missing half-duplex support with L2-switch</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/missing-half-duplex-support-with-L2-switch/m-p/148137#M555</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have tried to insert the switch_restart function. Than the periodical "PHY: 0:01 - Link is Up - 10/Half" were removed, but no communication were posssible with 10MBit/Half-duplex, so the code inside switch_restart() seams to be wrong.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;/* Duplex link change */&lt;/P&gt;&lt;P&gt;if (phy_dev-&amp;gt;link) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (fep-&amp;gt;full_duplex != phy_dev-&amp;gt;duplex) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; switch_restart(dev, phy_dev-&amp;gt;duplex);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; status_change = 1;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We also found, that 100Mbit/Half-duplex seams to be working in one pc/networkcard/switch combination with the modification above.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Birger&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Apr 2012 15:12:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/missing-half-duplex-support-with-L2-switch/m-p/148137#M555</guid>
      <dc:creator>bba</dc:creator>
      <dc:date>2012-04-11T15:12:24Z</dc:date>
    </item>
    <item>
      <title>Re: missing half-duplex support with L2-switch</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/missing-half-duplex-support-with-L2-switch/m-p/148138#M556</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, there is a patch from Qiang Li.&lt;/P&gt;&lt;P&gt;&lt;A href="http://imxcommunity.org/profiles/blogs/bug-fix-for-imx28-l2-switch-can-t-work-in-10base-t-network?xg_source=activity" target="_blank"&gt;http://imxcommunity.org/profiles/blogs/bug-fix-for-imx28-l2-switch-can-t-work-in-10base-t-network?xg_source=activity&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Birger&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Apr 2012 09:00:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/missing-half-duplex-support-with-L2-switch/m-p/148138#M556</guid>
      <dc:creator>bba</dc:creator>
      <dc:date>2012-04-25T09:00:10Z</dc:date>
    </item>
  </channel>
</rss>

