<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><blockquote type="cite"><div><font class="Apple-style-span" color="#000000"><br></font><blockquote type="cite"> *Technically*, full &nbsp;<br></blockquote><blockquote type="cite">duplex is required for GMII, as GMII is used only for gigabit. &nbsp;However, <br></blockquote><blockquote type="cite">we've been treating the GMII interface type as an indicator that the PHY <br></blockquote><blockquote type="cite">*has* a GMII connection to the NIC. &nbsp;When gianfar detects the speed is <br></blockquote><blockquote type="cite">10/100 it switches to the compatible MII interface via this code, just <br></blockquote><blockquote type="cite">below:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case 100:<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case 10:<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tempval =<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;((tempval &amp; ~(MACCFG2_IF)) | &nbsp;<br></blockquote><blockquote type="cite">MACCFG2_MII);<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">My concern is that you will be detecting the GMII interface, and &nbsp;<br></blockquote><blockquote type="cite">disallowing half-duplex, despite the fact that the interface is actually <br></blockquote><blockquote type="cite">running at 10 or 100 Mbit.<br></blockquote><br>Very interesting, though I'm not sure I'm completely following. :-)<br><br>Are you saying that I should do this instead:<br><br><span class="Apple-tab-span" style="white-space:pre">        </span>if (!phydev-&gt;duplex &amp;&amp;<br><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span>(phyi == PHY_INTERFACE_MODE_MII ||<br><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span> phyi == PHY_INTERFACE_MODE_RMII ||<br><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span> (phyi == PHY_INTERFACE_MODE_GMII &amp;&amp;<br><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span> &nbsp;phydev-&gt;speed &lt; 1000)))<br><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span>tempval &amp;= ~MACCFG2_FULL_DUPLEX;<br><span class="Apple-tab-span" style="white-space:pre">        </span>else<br><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span>tempval |= MACCFG2_FULL_DUPLEX;<br><br>i.e. we detected GMII interface initially, but it downgraded<br>to MII since speed is &lt; 1000, thus we can set half-duplex in MAC?<br></div></blockquote></div><br><div>Yeah, I think that works out more correctly. &nbsp;And I suspect that the same is true for UCC</div><div><br></div><div>Andy</div></body></html>