public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] PPC4xx enet crossover
@ 2008-03-03 15:12 Mike Nuss
  2008-03-03 15:49 ` Stefan Roese
  0 siblings, 1 reply; 8+ messages in thread
From: Mike Nuss @ 2008-03-03 15:12 UTC (permalink / raw)
  To: u-boot

I'm using a PPC440EPx with a Marvell PHY (same as on Sequoia). If I connect to a PC with a crossover Ethernet cable, U-Boot sees a link but the PC does not. The PC (running Linux) reports "Autonegotiation failed (remote fault)" and ethtool reports no link.

However if I let the PowerPC boot up into Linux, all of a sudden the PC sees link and pings start working. In fact, it works in Linux with a standard Ethernet cable, too (gigabit ports should be autosensing).

It seems U-Boot is not initializing the PHY correctly to handle a direct connection, but Linux is... any ideas? Everything works fine through a switch.

Thanks,
Mike

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.denx.de/pipermail/u-boot/attachments/20080303/a9450161/attachment.htm 

^ permalink raw reply	[flat|nested] 8+ messages in thread
* [U-Boot-Users] PPC4xx enet crossover
@ 2008-03-03 17:53 Mike Nuss
  2008-03-03 18:03 ` Stefan Roese
  2008-03-03 20:01 ` Wolfgang Denk
  0 siblings, 2 replies; 8+ messages in thread
From: Mike Nuss @ 2008-03-03 17:53 UTC (permalink / raw)
  To: u-boot

Stefan Roese wrote:
> On Monday 03 March 2008, Mike Nuss wrote:
> > I'm using a PPC440EPx with a Marvell PHY (same as on 
> Sequoia). If I connect
> > to a PC with a crossover Ethernet cable, U-Boot sees a link 
> but the PC does
> > not. The PC (running Linux) reports "Autonegotiation failed 
> (remote fault)"
> > and ethtool reports no link.
> 
> Did you really try to communicate with the PC in this 
> situation? Please note 
> that the PHY is only initialized upon ethernet usage. So if 
> you just turn on 
> the Sequoia and stop on the U-Boot prompt, no real PHY 
> configuration will 
> happen.

Yes, I set the ipaddr variable and tried to do a ping. U-Boot reported the PHY autonegotiation succeeding but reported the remote host as down, and the PC logged the autonegotiation error.

Oddly enough, I tried a different PC (with a different NIC) and it worked there. But I'm reluctant to blame the NIC on the first machine, since it worked fine once Linux was running on the PowerPC.

Mike

^ permalink raw reply	[flat|nested] 8+ messages in thread
* [U-Boot-Users] PPC4xx enet crossover
@ 2008-03-03 20:27 Mike Nuss
  2008-03-03 20:45 ` Wolfgang Denk
  2008-03-04  8:30 ` Wolfgang Denk
  0 siblings, 2 replies; 8+ messages in thread
From: Mike Nuss @ 2008-03-03 20:27 UTC (permalink / raw)
  To: u-boot

Wolfgang Denk wrote:

> It seems every now and then a report pops up that the  Sequoia  board
> (or  now on equivalent hardware) has problems connecting to a Gigabit
> capable network interface. In our case,  it's  when  the  Sequoia  is
> attached to a HP Procurve switch.

There were differences in the PHY setup between Linux and U-Boot.

This patch fixes the problem. Apparently "remote fault" is being set,
which signals to some devices (on the other end of the cable) that a
fault has occurred, while other devices ignore it. I believe the RF bit
was causing the issue, but I removed T4 also, to match up with Linux.

Mike

diff --git a/cpu/ppc4xx/miiphy.c b/cpu/ppc4xx/miiphy.c
index 4216f0b..f48e68d 100644
--- a/cpu/ppc4xx/miiphy.c
+++ b/cpu/ppc4xx/miiphy.c
@@ -143,7 +143,7 @@ int phy_setup_aneg (char *devname, unsigned char addr)
        u16 adv;
 
        miiphy_read (devname, addr, PHY_ANAR, &adv);
-       adv |= (PHY_ANLPAR_ACK | PHY_ANLPAR_RF | PHY_ANLPAR_T4 |
+       adv |= (PHY_ANLPAR_ACK |
                PHY_ANLPAR_TXFD | PHY_ANLPAR_TX | PHY_ANLPAR_10FD |
                PHY_ANLPAR_10);
        miiphy_write (devname, addr, PHY_ANAR, adv);

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

end of thread, other threads:[~2008-03-04  8:30 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-03 15:12 [U-Boot-Users] PPC4xx enet crossover Mike Nuss
2008-03-03 15:49 ` Stefan Roese
  -- strict thread matches above, loose matches on Subject: below --
2008-03-03 17:53 Mike Nuss
2008-03-03 18:03 ` Stefan Roese
2008-03-03 20:01 ` Wolfgang Denk
2008-03-03 20:27 Mike Nuss
2008-03-03 20:45 ` Wolfgang Denk
2008-03-04  8:30 ` Wolfgang Denk

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