public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
* tqm5200s phy link toggles between up and down
@ 2012-12-18  9:44 Johannes Braun
  2012-12-18  9:57 ` Wolfgang Grandegger
  0 siblings, 1 reply; 4+ messages in thread
From: Johannes Braun @ 2012-12-18  9:44 UTC (permalink / raw)
  To: linuxppc-dev

Hello,

I hope someone could help me with my problem. Currently I am porting
a new kernel (3.3.8) for a tqm5200s based board.
The previous kernel was 2.6.23. The new kernel version is needed because
of support for a wireless card.

The new kernel has problems with my ethernet PHY. The problem occurs only
with our hardware. Not with the TQ eval board.
The eval board uses a Intel PHY. Our board uses a Marvel 88E6085 PHY.
I have tested the new kernel on the eval board and everything runs fine.
But After booting the kernel on our hardware, the ethernet connection is
going up and down and loops between these two states.

This is the log output:
[   38.608305] PHY: f0003000:00 - Link is Down
[   41.708310] PHY: f0003000:00 - Link is Up - 10/Half
[   43.744304] PHY: f0003000:00 - Link is Down
[   46.844309] PHY: f0003000:00 - Link is Up - 10/Half

I also had a look inside the driver in
Drivers/net/ethernet/freescale/fec_mpc52xx.c
and made a printk output to the link adjust method,
which is called everytime before the link is going down.

 /* based on generic_adjust_link from fs_enet-main.c */
static void
mpc52xx_fec_adjust_link(struct net_device *dev)
{
   struct mpc52xx_fec_priv *priv = netdev_priv(dev);
   struct phy_device *phydev = priv->phydev;
   int new_state = 0;

   printk( KERN_INFO "%s->%s: entering...",
     __FILE__, __func__ );

   if (phydev->link != PHY_DOWN) {
      if (phydev->duplex != priv->duplex) {
         struct mpc52xx_fec __iomem *fec = priv->fec;
         u32 rcntrl;
         u32 tcntrl;
...
...

This is the output with the above printk:
[   35.589485] PHY: f0003000:00 - Link is Down
[   40.752753] drivers/net/ethernet/freescale/fec_mpc52xx.c
->mpc52xx_fec_adjust_link: entering...
[   40.761494] PHY: f0003000:00 - Link is Up - 10/Half
[   42.796746] drivers/net/ethernet/freescale/fec_mpc52xx.c
->mpc52xx_fec_adjust_link: entering...
[   42.805485] PHY: f0003000:00 - Link is Down
[   49.000755] drivers/net/ethernet/freescale/fec_mpc52xx.c
->mpc52xx_fec_adjust_link: entering...
[   49.009497] PHY: f0003000:00 - Link is Up - 10/Half


As I noticed the problem occurs also with a 2.6.24 kernel.
Seems that the driver was rewritten and moved from drivers/net/fec_mpc52xx/
to drivers/net/ethernet/freescale/fec_mpc52xx.c.

I am note shure where to search for the problem. The PHY link seems to be in
some kind of auto-negotiating loop of going up and down? Has anyone had this
problem before, or does someone has a tip to fix this problem?

Best regards
Johannes

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-12-18 11:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-18  9:44 tqm5200s phy link toggles between up and down Johannes Braun
2012-12-18  9:57 ` Wolfgang Grandegger
2012-12-18 10:05   ` Wolfgang Grandegger
2012-12-18 11:01     ` Johannes Braun

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox