While checking the ep93xx-eth driver on the Sim.One board I have, I noticed a
few problems:
- it does not detect when the link status changes, so the link is always
assumed to be up (no issue so far)
- MDC/MDIO reads to the PHY chip are always failing, see the log attached
(ep93xx-mdio-read-fails)
I was wondering whether it could be a timing problem, so I reduced the value
of mdc_divisor from 40 down to 80, and it does not change anything.
Are the MDC/MDIO lines correctly wired from the Ethernet MAC to the PHY chip?
Do you see any other potential problem?
Please also find attached a patch which converts ep93xx-eth to using phylib.
Thank you very much for your answer.
--
Florian
While cooking the phylib patch, I also noticed that we never change the duplex
registers in the Ethernet MAC, I believe this is wrong because most Ethernet
MACs I have seen so far need to be aware of that.
Is there any public documentation for the EP93xx Ethernet MAC available
somewhere?
--
Florian
Yes, that does seem to be the case.
> - MDC/MDIO reads to the PHY chip are always failing, see the log attached
> (ep93xx-mdio-read-fails)
I've never seen this. What version of the kernel are you running, and
is it one provided by simplemachines or one you have compiled
yourself?
> Please also find attached a patch which converts ep93xx-eth to using phylib.
What are the advantages of this? It seems to add more
platform-specific code than it removes.
Does this resolve either of the issues you raise, move from a
deprecated interface to a modern one, or improve performance in some
way?
> Is there any public documentation for the EP93xx Ethernet MAC available
> somewhere?
I only know of the chapter in the EP93XX User's Guide
http://www.cirrus.com/en/pubs/manual/EP93xx_Users_Guide_UM1.pdf
M
This is being discussed on linux-arm-kernel list - see patch [1] in this message
http://marc.info/?l=linux-netdev&m=130726347110074
which seems to enable PHY but, unlike your patch, doesn't disable MII.
I don't know enough to judge what is correct.
So the answer to the link detection issue is that it had never been
included in the linux kernel yet, and I'll wait until they decide
which way to go.
M
After some more reading, I was missing a phy_start() in ep93xx_mii_probe(). My
patch has been posted to netdev. Thanks for the pointer, I did not even see
Herbert's patch, which seems better than my patch actually.
I will keep you posted on this.
--
Florian
On Sunday 05 June 2011 16:56:44 Martin Guy wrote:
> 2011/6/4 Florian Fainelli <f.fai...@gmail.com>:
> > While checking the ep93xx-eth driver on the Sim.One board I have, I
> > noticed a few problems:
> >
> > - it does not detect when the link status changes, so the link is always
> > assumed to be up (no issue so far)
>
> Yes, that does seem to be the case.
>
> > - MDC/MDIO reads to the PHY chip are always failing, see the log attached
> > (ep93xx-mdio-read-fails)
>
> I've never seen this. What version of the kernel are you running, and
> is it one provided by simplemachines or one you have compiled
> yourself?
This is a kernel compiled by myself. The original rootfs with kernel 2.6.24.1
shows the same behavior.
>
> > Please also find attached a patch which converts ep93xx-eth to using
> > phylib.
>
> What are the advantages of this? It seems to add more
> platform-specific code than it removes.
> Does this resolve either of the issues you raise, move from a
> deprecated interface to a modern one, or improve performance in some
> way?
It's actually moving towards the most modern interface, also it brings proper
link notification and phy querying to user-land or kernel consumers.
>
> > Is there any public documentation for the EP93xx Ethernet MAC available
> > somewhere?
>
> I only know of the chapter in the EP93XX User's Guide
> http://www.cirrus.com/en/pubs/manual/EP93xx_Users_Guide_UM1.pdf
Thank you for the documentation pointer, I found what I was talking about.
--
Florian