Ethernet doesn't work in linux for PPC440GP?

6 messages, 2 authors, 2005-02-23 · open the first message on its own page

Ethernet doesn't work in linux for PPC440GP?

From: Shawn Jin <hidden>
Date: 2005-02-23 03:14:25

Hi,

First please forgive me for the cross-list post. I do believe this
topic is related to both lists.

I'm playing with UBoot and Linux 2.6.10 on IBM PPC440GP evaluation
board (Ebony) and have some issue with ethernet. With Rom Monitor
linux 2.6.10 was running successfully using default configuration for
Ebony. Here the scree dump for ethernet dection.

emac: IBM EMAC Ethernet driver, version 2.0
Maintained by Benjamin Herrenschmidt [off-list ref]
zmii0: input 0 in RMII mode
eth0: IBM emac, MAC 00:04:ac:e3:1b:bb
eth0: Found Generic MII PHY (0x08)
zmii0: input 1 in RMII mode
eth1: IBM emac, MAC 00:04:ac:e3:1b:bc
eth1: Found Generic MII PHY (0x09)

However with Uboot, the emac driver cannot read MAC addresses from VPD
correctly. The original 2.6.10 code didn't recognize uboot's bd_info.
After some hack eth0 gets its MAC address from uboot's bd_info and
seems initialized correctly. But somehow booting an NFS root fs
failed. So I suspect it's due to the ethernet driver. BTW, the same
image is used in the two

emac: IBM EMAC Ethernet driver, version 2.0
Maintained by Benjamin Herrenschmidt [off-list ref]
zmii0: input 0 in SMII mode
eth0: IBM emac, MAC 00:04:ac:e3:1b:bb
eth0: Found Generic MII PHY (0x08)
zmii0: input 1 in RMII mode
eth1: IBM emac, MAC FF:FF:FF:FF:FF:FF
eth1: Found Generic MII PHY (0x09)

I know there was discussion about what a linux ethernet driver should
expect from boot loader. In fact the driver shouldn't expect anything
from a boot loader. Wolfgang has the same opinion in his DULG. What I
don't know is if this EMAC driver expects something configured by boot
loader? It seems to me that Rom Monitor did configure something for
ethernet that the EMAC driver expected.

Anyone has the similar problem before?

Thanks,
-Shawn.

Re: Ethernet doesn't work in linux for PPC440GP?

From: Eugene Surovegin <hidden>
Date: 2005-02-23 04:22:40

On Tue, Feb 22, 2005 at 07:07:44PM -0800, Shawn Jin wrote:
zmii0: input 0 in SMII mode
eth0: IBM emac, MAC 00:04:ac:e3:1b:bb
eth0: Found Generic MII PHY (0x08)
zmii0: input 1 in RMII mode
eth1: IBM emac, MAC FF:FF:FF:FF:FF:FF
eth1: Found Generic MII PHY (0x09)
I already told you that this is wrong, why are you asking again? 
Please, if you asking questions, spend some time reading answers 
given to you, before asking again.

ZMII bridge cannot have inputs in different modes (SMII and RMII).

Ebony uses RMII, so SMII is obviously wrong. Most probably your 
firmware doesn't set correct mode and autodetection in the EMAC driver 
fails.

--
Eugene.

Re: Ethernet doesn't work in linux for PPC440GP?

From: Eugene Surovegin <hidden>
Date: 2005-02-23 04:29:33

On Tue, Feb 22, 2005 at 07:07:44PM -0800, Shawn Jin wrote:
However with Uboot, the emac driver cannot read MAC addresses from VPD
correctly. The original 2.6.10 code didn't recognize uboot's bd_info.
You are welcome to submit patch with U-Boot support for Ebony. 
Currently only OpenBIOS is supported. 

Look at the way it was done for Ocotea, 2.6 now supports both U-Boot 
and PIBS.

--
Eugene

Re: Ethernet doesn't work in linux for PPC440GP?

From: Shawn Jin <hidden>
Date: 2005-02-23 08:02:19

quoted
zmii0: input 0 in SMII mode
eth0: IBM emac, MAC 00:04:ac:e3:1b:bb
eth0: Found Generic MII PHY (0x08)
zmii0: input 1 in RMII mode
eth1: IBM emac, MAC FF:FF:FF:FF:FF:FF
eth1: Found Generic MII PHY (0x09)
I already told you that this is wrong, why are you asking again?
Please, if you asking questions, spend some time reading answers
given to you, before asking again.
Well, don't be mad at me first. The question may bring out another
round of arguments whether it's a bug related to uboot or linux EMAC
driver. Wolfgang makes it very clear that this is a bug in linux
ethernet driver. And I agree with him. This argument happened before
and I just forgot what specific ethernet driver was in the argument.
Ebony uses RMII, so SMII is obviously wrong. Most probably your
firmware doesn't set correct mode and autodetection in the EMAC driver
fails.
So the EMAC driver does expect a boot loader (the firmware you
mentioned here) to set something for it. Then I think I need to fix it
in this driver instead of in uboot.

-Shawn.

Re: Ethernet doesn't work in linux for PPC440GP?

From: Shawn Jin <hidden>
Date: 2005-02-23 08:03:06

You are welcome to submit patch with U-Boot support for Ebony.
Currently only OpenBIOS is supported.

Look at the way it was done for Ocotea, 2.6 now supports both U-Boot
and PIBS.
I've done this and will submit it to the list soon.

Regards,
-Shawn.

Re: Ethernet doesn't work in linux for PPC440GP?

From: Eugene Surovegin <hidden>
Date: 2005-02-23 09:38:52

On Wed, Feb 23, 2005 at 12:02:04AM -0800, Shawn Jin wrote:
quoted
quoted
zmii0: input 0 in SMII mode
eth0: IBM emac, MAC 00:04:ac:e3:1b:bb
eth0: Found Generic MII PHY (0x08)
zmii0: input 1 in RMII mode
eth1: IBM emac, MAC FF:FF:FF:FF:FF:FF
eth1: Found Generic MII PHY (0x09)
I already told you that this is wrong, why are you asking again?
Please, if you asking questions, spend some time reading answers
given to you, before asking again.
Well, don't be mad at me first. The question may bring out another
round of arguments whether it's a bug related to uboot or linux EMAC
driver. Wolfgang makes it very clear that this is a bug in linux
ethernet driver. And I agree with him. This argument happened before
and I just forgot what specific ethernet driver was in the argument.
This is really irrelevant.
quoted
Ebony uses RMII, so SMII is obviously wrong. Most probably your
firmware doesn't set correct mode and autodetection in the EMAC driver
fails.
So the EMAC driver does expect a boot loader (the firmware you
mentioned here) to set something for it. Then I think I need to fix it
in this driver instead of in uboot.
Current EMAC driver uses autodetection logic if PHY mode wasn't 
specified by the board support code. It works for Ebony + OpenBIOS. 
You can try the following patch (untested) to set PHY mode explicitly:

===== arch/ppc/platforms/4xx/ebony.c 1.10 vs edited =====
--- 1.10/arch/ppc/platforms/4xx/ebony.c	2005-02-03 06:42:41 -08:00
+++ edited/arch/ppc/platforms/4xx/ebony.c	2005-02-23 01:28:04 -08:00
@@ -52,6 +52,13 @@
 
 #include <syslib/gen550.h>
 
+/*
+ * This is a horrible kludge, we eventually need to abstract this
+ * generic PHY stuff, so the  standard phy mode defines can be
+ * easily used from arch code.
+ */
+#include "../../../../drivers/net/ibm_emac/ibm_emac_phy.h"
+
 static struct ibm44x_clocks clocks __initdata;
 
 /*
@@ -267,9 +274,11 @@
 	def = ocp_get_one_device(OCP_VENDOR_IBM, OCP_FUNC_EMAC, 0);
 	emacdata = def->additions;
 	memcpy(emacdata->mac_addr, EBONY_NA0_ADDR(vpd_base), 6);
+	emacdata->phy_mode = PHY_MODE_RMII;
 	def = ocp_get_one_device(OCP_VENDOR_IBM, OCP_FUNC_EMAC, 1);
 	emacdata = def->additions;
 	memcpy(emacdata->mac_addr, EBONY_NA1_ADDR(vpd_base), 6);
+	emacdata->phy_mode = PHY_MODE_RMII;
 	iounmap(vpd_base);
 
 	/*


--
Eugene
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help