From mboxrd@z Thu Jan 1 00:00:00 1970 Message-Id: <6.0.1.1.0.20040303125254.01f120e8@192.168.2.1> Date: Wed, 03 Mar 2004 12:59:36 +0100 To: mporter@kernel.crashing.org From: llandre Subject: Re: Bug in new IBM 4xx on-chip Ethernet drivers? Cc: Stefan Roese , wd@denx.de, linuxppc-embedded@lists.linuxppc.org, Benjamin Herrenschmidt In-Reply-To: <1078311464.15320.6.camel@gaston> References: <6.0.1.1.0.20040303103039.01efcac0@dns.struinfo.it> <1078311464.15320.6.camel@gaston> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Sender: owner-linuxppc-embedded@lists.linuxppc.org List-Id: Hi Matt, Benjamin Herrenschmidt suggested me (see at the end of the message) to get in touch with you about the following problem. I'm working with a custom 405EP-based board (PPChameleonEVB). So far I used the kernel 2.4.20 and now I'm moving to the 2.4.23. I realized that the on-chip Ethernet MAC driver changed. I have a question about the function emac_phy_read in ibm_ocp_enet.c file. In my understanding the following snippet is not correct /* Clear the speed bits and make a read request to the PHY */ stacr = ((EMAC_STACR_READ | (reg & 0x1f)) & ~EMAC_STACR_CLK_100MHZ); stacr |= ((mii_id & 0x1F) << 5); because it assumes the OPB clock frequency is 50MHz. If it differs, the MII clock frequency generated by the Ethernet controller is erroneous. For example, with OPB frequency = 66MHz, the MII clock frequency is set to 3.3MHz (this should be 2.5MHz). I had already reported the problem to Armin Kuster (please see the message http://lists.linuxppc.org/linuxppc-embedded/200306/msg00134.html) and I proposed a solution but I got no response. What do you think? Thanks and best regards. At 11.57 03/03/2004, Benjamin Herrenschmidt wrote: > > because it assumes the OPB clock frequency is 50MHz. If it differs, > > the MII clock frequency generated by the Ethernet controller is erroneous. > > For example, with OPB frequency = 66MHz, the MII clock frequency is set > > to 3.3MHz (this should be 2.5MHz). > > I had already reported the problem to Armin Kuster (please see the message > > http://lists.linuxppc.org/linuxppc-embedded/200306/msg00134.html) and I > > proposed > > a solution but I got no response. > > What do you think? > >Hi ! You may well be right on this one. I don't have any 4xx HW >at hand any more, I suggest you contact Matt Porter > on this one >(Sorry Matt, I know I'm not helping much lately...) > >Ben. llandre ** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/