* Domen's MPC5200 FEC cleanup patch.
@ 2007-09-15 3:38 Jon Smirl
2007-09-15 4:28 ` Jon Smirl
0 siblings, 1 reply; 15+ messages in thread
From: Jon Smirl @ 2007-09-15 3:38 UTC (permalink / raw)
To: Domen Puncer, linuxppc-embedded
This patch doesn't seem to working quite right on my hardware (Phytec
pcm030). At boot I get a long pause.
I have a long pause when Ethernet is initializing
[ 0.798529] NET: Registered protocol family 1
[ 0.802988] NET: Registered protocol family 17
[ 1.313708] net eth0: attached phy 0 to driver Generic PHY
[ 2.320013] Sending DHCP requests ...... timed out!
[ 81.968863] IP-Config: Retrying forever (NFS root)...
[ 82.477527] net eth0: attached phy 0 to driver Generic PHY
[ 83.487809] Sending DHCP requests .<6>PHY: f0003000:00 - Link is Up
- 100/Full
[ 86.323795] ., OK
[ 88.579802] IP-Config: Got DHCP answer from 192.168.1.200, my
address is 192.168.1.5
[ 88.587923] IP-Config: Complete:
Reverting back to
0008-drivers-net-Add-support-for-Freescale-MPC5200-SoC-i.patch the
pause goes away.
[ 0.793916] TCP cubic registered
[ 0.797309] NET: Registered protocol family 1
[ 0.801808] NET: Registered protocol family 17
[ 1.309611] eth0: config: auto-negotiation on, 100HDX, 10HDX.
[ 2.316014] Sending DHCP requests .., OK
[ 7.124005] IP-Config: Got DHCP answer from 192.168.1.200, my
address is 192.168.1.5
[ 7.132121] IP-Config: Complete:
[ 7.135212] device=eth0, addr=192.168.1.5,
mask=255.255.255.0, gw=192.168.1.200,
[ 7.143192] host=MPC, domain=home, nis-domain=(none),
[ 7.148778] bootserver=192.168.1.200, rootserver=192.168.1.4, rootpath=
Something not quite right with interrupts maybe? I'm trying to debug it.
--
Jon Smirl
jonsmirl@gmail.com
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Domen's MPC5200 FEC cleanup patch.
2007-09-15 3:38 Domen's MPC5200 FEC cleanup patch Jon Smirl
@ 2007-09-15 4:28 ` Jon Smirl
2007-09-15 12:22 ` Domen Puncer
0 siblings, 1 reply; 15+ messages in thread
From: Jon Smirl @ 2007-09-15 4:28 UTC (permalink / raw)
To: Domen Puncer, linuxppc-embedded
On 9/14/07, Jon Smirl <jonsmirl@gmail.com> wrote:
> This patch doesn't seem to working quite right on my hardware (Phytec
> pcm030). At boot I get a long pause.
It also doesn't compile if CONFIG_FEC_MPC52xx_MDIO is undefined.
--
Jon Smirl
jonsmirl@gmail.com
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Domen's MPC5200 FEC cleanup patch.
2007-09-15 4:28 ` Jon Smirl
@ 2007-09-15 12:22 ` Domen Puncer
2007-09-15 15:55 ` Jon Smirl
0 siblings, 1 reply; 15+ messages in thread
From: Domen Puncer @ 2007-09-15 12:22 UTC (permalink / raw)
To: Jon Smirl; +Cc: linuxppc-embedded
On 15/09/07 00:28 -0400, Jon Smirl wrote:
> On 9/14/07, Jon Smirl <jonsmirl@gmail.com> wrote:
> > This patch doesn't seem to working quite right on my hardware (Phytec
> > pcm030). At boot I get a long pause.
>
> It also doesn't compile if CONFIG_FEC_MPC52xx_MDIO is undefined.
Right, darn.
Try this one: http://coderock.org/tmp/fec-v3rc1/
Does it work without phy-handle in device tree, but
with this part being unconditional (fec.c):
709 // if (priv->has_phy)
710 rcntrl |= FEC_RCNTRL_MII_MODE;
This effectively disables phy part of the driver,
but still allows hardware to use PHY/MII.
I am puzzled by the symptoms you see.
Domen
>
> --
> Jon Smirl
> jonsmirl@gmail.com
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Domen's MPC5200 FEC cleanup patch.
2007-09-15 12:22 ` Domen Puncer
@ 2007-09-15 15:55 ` Jon Smirl
2007-09-16 17:00 ` Jon Smirl
2007-09-16 19:05 ` Jon Smirl
0 siblings, 2 replies; 15+ messages in thread
From: Jon Smirl @ 2007-09-15 15:55 UTC (permalink / raw)
To: Domen Puncer; +Cc: linuxppc-embedded
On 9/15/07, Domen Puncer <domen.puncer@telargo.com> wrote:
> On 15/09/07 00:28 -0400, Jon Smirl wrote:
> > On 9/14/07, Jon Smirl <jonsmirl@gmail.com> wrote:
> > > This patch doesn't seem to working quite right on my hardware (Phytec
> > > pcm030). At boot I get a long pause.
> >
> > It also doesn't compile if CONFIG_FEC_MPC52xx_MDIO is undefined.
>
> Right, darn.
> Try this one: http://coderock.org/tmp/fec-v3rc1/
0.776407] 0x00f40000-0x00f80000 : "oftree"
[ 0.782101] 0x00f80000-0x01000000 : "space"
[ 0.788100] TCP cubic registered
[ 0.791427] NET: Registered protocol family 1
[ 0.795904] NET: Registered protocol family 17
[ 1.305579] f0003000:00 not found
[ 1.308985] net eth0: phy_connect failed
[ 1.312961] net eth0: fec_init_phy failed
[ 1.317188] IP-Config: Failed to open eth0
[ 1.321362] IP-Config: No network devices available.
[ 1.326973] Looking up port of RPC 100003/3 on 192.168.1.4
>
> Does it work without phy-handle in device tree, but
> with this part being unconditional (fec.c):
> 709 // if (priv->has_phy)
> 710 rcntrl |= FEC_RCNTRL_MII_MODE;
>
> This effectively disables phy part of the driver,
> but still allows hardware to use PHY/MII.
Makes no difference
>
> I am puzzled by the symptoms you see.
>
>
> Domen
>
> >
> > --
> > Jon Smirl
> > jonsmirl@gmail.com
>
--
Jon Smirl
jonsmirl@gmail.com
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Domen's MPC5200 FEC cleanup patch.
2007-09-15 15:55 ` Jon Smirl
@ 2007-09-16 17:00 ` Jon Smirl
2007-09-16 17:05 ` Jon Smirl
2007-09-16 19:05 ` Jon Smirl
1 sibling, 1 reply; 15+ messages in thread
From: Jon Smirl @ 2007-09-16 17:00 UTC (permalink / raw)
To: Domen Puncer; +Cc: linuxppc-embedded
On 9/15/07, Jon Smirl <jonsmirl@gmail.com> wrote:
> On 9/15/07, Domen Puncer <domen.puncer@telargo.com> wrote:
> > On 15/09/07 00:28 -0400, Jon Smirl wrote:
> > > On 9/14/07, Jon Smirl <jonsmirl@gmail.com> wrote:
> > > > This patch doesn't seem to working quite right on my hardware (Phytec
> > > > pcm030). At boot I get a long pause.
> > >
> > > It also doesn't compile if CONFIG_FEC_MPC52xx_MDIO is undefined.
> >
> > Right, darn.
> > Try this one: http://coderock.org/tmp/fec-v3rc1/
>
> 0.776407] 0x00f40000-0x00f80000 : "oftree"
> [ 0.782101] 0x00f80000-0x01000000 : "space"
> [ 0.788100] TCP cubic registered
> [ 0.791427] NET: Registered protocol family 1
> [ 0.795904] NET: Registered protocol family 17
> [ 1.305579] f0003000:00 not found
> [ 1.308985] net eth0: phy_connect failed
> [ 1.312961] net eth0: fec_init_phy failed
> [ 1.317188] IP-Config: Failed to open eth0
> [ 1.321362] IP-Config: No network devices available.
> [ 1.326973] Looking up port of RPC 100003/3 on 192.168.1.4
This fixes the problem....
diff --git a/drivers/net/fec_mpc52xx/fec.c b/drivers/net/fec_mpc52xx/fec.c
index 922e9a8..c4442e0 100644
--- a/drivers/net/fec_mpc52xx/fec.c
+++ b/drivers/net/fec_mpc52xx/fec.c
@@ -1087,11 +1087,13 @@ static struct of_platform_driver mpc52xx_fec_driver = {
/* ======================================================================== */
/* Module */
/* ======================================================================== */
+extern int fec_mdio_init(void);
+void fec_mdio_exit(void);
static int __init
mpc52xx_fec_init(void)
{
-#ifdef FEC_MPC52xx_MDIO
+#ifdef CONFIG_FEC_MPC52xx_MDIO
int ret;
ret = fec_mdio_init();
if (ret) {
@@ -1106,7 +1108,7 @@ static void __exit
mpc52xx_fec_exit(void)
{
of_unregister_platform_driver(&mpc52xx_fec_driver);
-#ifdef FEC_MPC52xx_MDIO
+#ifdef CONFIG_FEC_MPC52xx_MDIO
fec_mdio_exit();
#endif
}
--
Jon Smirl
jonsmirl@gmail.com
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: Domen's MPC5200 FEC cleanup patch.
2007-09-16 17:00 ` Jon Smirl
@ 2007-09-16 17:05 ` Jon Smirl
2007-09-16 18:00 ` Jon Smirl
0 siblings, 1 reply; 15+ messages in thread
From: Jon Smirl @ 2007-09-16 17:05 UTC (permalink / raw)
To: Domen Puncer; +Cc: linuxppc-embedded
[ 1.309662] net eth0: attached phy 0 to driver Generic PHY
[ 2.316013] Sending DHCP requests .<6>PHY: f0003000:00 - Link is Up
- 100/Full
[ 4.392000] ., OK
[ 7.100005] IP-Config: Got DHCP answer from 192.168.1.200, my
address is 192.168.1.5
[ 7.108154] IP-Config: Complete:
[ 7.111247] device=eth0, addr=192.168.1.5,
mask=255.255.255.0, gw=192.168.1.200,
[ 7.119249] host=MPC, domain=home, nis-domain=(none),
[ 7.124811] bootserver=192.168.1.200, rootserver=192.168.1.4, rootpath=
DHCP wants to print "Sending DHCP requests .., OK"
But the interrupt from the link coming up printed "<6>PHY: f0003000:00
- Link is Up - 100/Full"
The <6> is visible since it wasn't on the beginning of a line.
--
Jon Smirl
jonsmirl@gmail.com
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Domen's MPC5200 FEC cleanup patch.
2007-09-16 17:05 ` Jon Smirl
@ 2007-09-16 18:00 ` Jon Smirl
2007-09-16 18:25 ` Jon Smirl
0 siblings, 1 reply; 15+ messages in thread
From: Jon Smirl @ 2007-09-16 18:00 UTC (permalink / raw)
To: Domen Puncer; +Cc: linuxppc-embedded
Another problem...
Ifconfig eth0 down
hangs the system.
I'll try debugging it.
--
Jon Smirl
jonsmirl@gmail.com
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Domen's MPC5200 FEC cleanup patch.
2007-09-16 18:00 ` Jon Smirl
@ 2007-09-16 18:25 ` Jon Smirl
2007-09-16 18:34 ` Robert Schwebel
2007-09-16 18:42 ` Jeff Mock
0 siblings, 2 replies; 15+ messages in thread
From: Jon Smirl @ 2007-09-16 18:25 UTC (permalink / raw)
To: Domen Puncer; +Cc: linuxppc-embedded
On 9/16/07, Jon Smirl <jonsmirl@gmail.com> wrote:
> Another problem...
>
> Ifconfig eth0 down
>
> hangs the system.
> I'll try debugging it.
The hang is something to do with lockd in NFS, it doesn't appear to
have anything to do with fec. I think I need to build more of NFS into
my kernel.
My DNS servers are not getting set up, but that's probably an issue
with the distro I'm using.
I did some big copy commands and fec seems to working ok.
Next I'll look at how the pcm030 supplies an Ethernet address. It has
an EEPROM on the board that holds it. Is this something that can be
read from of?
>
> --
> Jon Smirl
> jonsmirl@gmail.com
>
--
Jon Smirl
jonsmirl@gmail.com
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Domen's MPC5200 FEC cleanup patch.
2007-09-16 18:25 ` Jon Smirl
@ 2007-09-16 18:34 ` Robert Schwebel
2007-09-16 18:38 ` Jon Smirl
2007-09-16 18:42 ` Jeff Mock
1 sibling, 1 reply; 15+ messages in thread
From: Robert Schwebel @ 2007-09-16 18:34 UTC (permalink / raw)
To: Jon Smirl; +Cc: Domen Puncer, linuxppc-embedded
On Sun, Sep 16, 2007 at 02:25:09PM -0400, Jon Smirl wrote:
> Next I'll look at how the pcm030 supplies an Ethernet address. It has
> an EEPROM on the board that holds it. Is this something that can be
> read from of?
If you use our u-boot port, the mac addresses are being written by
u-boot and should already be present when linux comes in.
Robert
--
Pengutronix - Linux Solutions for Science and Industry
Entwicklungszentrum Nord http://www.pengutronix.de
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Domen's MPC5200 FEC cleanup patch.
2007-09-16 18:34 ` Robert Schwebel
@ 2007-09-16 18:38 ` Jon Smirl
2007-09-16 18:50 ` Robert Schwebel
0 siblings, 1 reply; 15+ messages in thread
From: Jon Smirl @ 2007-09-16 18:38 UTC (permalink / raw)
To: Robert Schwebel; +Cc: Domen Puncer, linuxppc-embedded
On 9/16/07, Robert Schwebel <r.schwebel@pengutronix.de> wrote:
> On Sun, Sep 16, 2007 at 02:25:09PM -0400, Jon Smirl wrote:
> > Next I'll look at how the pcm030 supplies an Ethernet address. It has
> > an EEPROM on the board that holds it. Is this something that can be
> > read from of?
>
> If you use our u-boot port, the mac addresses are being written by
> u-boot and should already be present when linux comes in.
Your right, it is already there.
Any idea why my DNS servers are getting set up from DHCP?
>
> Robert
> --
> Pengutronix - Linux Solutions for Science and Industry
> Entwicklungszentrum Nord http://www.pengutronix.de
>
--
Jon Smirl
jonsmirl@gmail.com
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Domen's MPC5200 FEC cleanup patch.
2007-09-16 18:38 ` Jon Smirl
@ 2007-09-16 18:50 ` Robert Schwebel
2007-09-16 18:54 ` Jon Smirl
0 siblings, 1 reply; 15+ messages in thread
From: Robert Schwebel @ 2007-09-16 18:50 UTC (permalink / raw)
To: Jon Smirl; +Cc: Domen Puncer, linuxppc-embedded
On Sun, Sep 16, 2007 at 02:38:55PM -0400, Jon Smirl wrote:
> Any idea why my DNS servers are getting set up from DHCP?
Well, check your DHCP server config :-)
Robert
--
Pengutronix - Linux Solutions for Science and Industry
Entwicklungszentrum Nord http://www.pengutronix.de
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Domen's MPC5200 FEC cleanup patch.
2007-09-16 18:50 ` Robert Schwebel
@ 2007-09-16 18:54 ` Jon Smirl
0 siblings, 0 replies; 15+ messages in thread
From: Jon Smirl @ 2007-09-16 18:54 UTC (permalink / raw)
To: Robert Schwebel; +Cc: Domen Puncer, linuxppc-embedded
On 9/16/07, Robert Schwebel <r.schwebel@pengutronix.de> wrote:
> On Sun, Sep 16, 2007 at 02:38:55PM -0400, Jon Smirl wrote:
> > Any idea why my DNS servers are getting set up from DHCP?
>
> Well, check your DHCP server config :-)
My x86/arm boxes are getting it ok from same server.
>
> Robert
> --
> Pengutronix - Linux Solutions for Science and Industry
> Entwicklungszentrum Nord http://www.pengutronix.de
>
--
Jon Smirl
jonsmirl@gmail.com
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Domen's MPC5200 FEC cleanup patch.
2007-09-16 18:25 ` Jon Smirl
2007-09-16 18:34 ` Robert Schwebel
@ 2007-09-16 18:42 ` Jeff Mock
1 sibling, 0 replies; 15+ messages in thread
From: Jeff Mock @ 2007-09-16 18:42 UTC (permalink / raw)
To: Jon Smirl; +Cc: Domen Puncer, linuxppc-embedded
Jon Smirl wrote:
> On 9/16/07, Jon Smirl <jonsmirl@gmail.com> wrote:
>> Another problem...
>>
>> Ifconfig eth0 down
>>
>> hangs the system.
>> I'll try debugging it.
>
> The hang is something to do with lockd in NFS, it doesn't appear to
> have anything to do with fec. I think I need to build more of NFS into
> my kernel.
>
I think the NFS hang has something to do with not having a copy of
portmap running. I've had this happen with other embedded systems, and
can usually work around it by using the "-o nolock" option when doing
the NFS mount.
jeff
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Domen's MPC5200 FEC cleanup patch.
2007-09-15 15:55 ` Jon Smirl
2007-09-16 17:00 ` Jon Smirl
@ 2007-09-16 19:05 ` Jon Smirl
2007-09-17 5:33 ` Domen Puncer
1 sibling, 1 reply; 15+ messages in thread
From: Jon Smirl @ 2007-09-16 19:05 UTC (permalink / raw)
To: Domen Puncer; +Cc: linuxppc-embedded
This adjustment to the error counting is in the Efika patches and not
in yours, should it be in yours too?
--- a/drivers/net/fec_mpc52xx/fec.c 2007-05-30 16:04:50.000000000 +0200
+++ b/drivers/net/fec_mpc52xx/fec.c 2007-05-30 16:09:02.000000000 +0200
@@ -411,7 +411,9 @@
stats->rx_bytes = in_be32(&fec->rmon_r_octets);
stats->rx_packets = in_be32(&fec->rmon_r_packets);
- stats->rx_errors = stats->rx_packets - in_be32(&fec->ieee_r_frame_ok);
+ stats->rx_errors = stats->rx_packets - (
+ in_be32(&fec->ieee_r_frame_ok) +
+ in_be32(&fec->rmon_r_mc_pkt));
stats->tx_bytes = in_be32(&fec->rmon_t_octets);
stats->tx_packets = in_be32(&fec->rmon_t_packets);
stats->tx_errors = stats->tx_packets - (
--
Jon Smirl
jonsmirl@gmail.com
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Domen's MPC5200 FEC cleanup patch.
2007-09-16 19:05 ` Jon Smirl
@ 2007-09-17 5:33 ` Domen Puncer
0 siblings, 0 replies; 15+ messages in thread
From: Domen Puncer @ 2007-09-17 5:33 UTC (permalink / raw)
To: Jon Smirl; +Cc: linuxppc-embedded
On 16/09/07 15:05 -0400, Jon Smirl wrote:
> This adjustment to the error counting is in the Efika patches and not
> in yours, should it be in yours too?
I know about this patch.
Error counting is reworked in newer anyway (mixing rmon and ieee
counters didn't look very nice to me).
Domen
>
> --- a/drivers/net/fec_mpc52xx/fec.c 2007-05-30 16:04:50.000000000 +0200
> +++ b/drivers/net/fec_mpc52xx/fec.c 2007-05-30 16:09:02.000000000 +0200
> @@ -411,7 +411,9 @@
>
> stats->rx_bytes = in_be32(&fec->rmon_r_octets);
> stats->rx_packets = in_be32(&fec->rmon_r_packets);
> - stats->rx_errors = stats->rx_packets - in_be32(&fec->ieee_r_frame_ok);
> + stats->rx_errors = stats->rx_packets - (
> + in_be32(&fec->ieee_r_frame_ok) +
> + in_be32(&fec->rmon_r_mc_pkt));
> stats->tx_bytes = in_be32(&fec->rmon_t_octets);
> stats->tx_packets = in_be32(&fec->rmon_t_packets);
> stats->tx_errors = stats->tx_packets - (
>
> --
> Jon Smirl
> jonsmirl@gmail.com
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2007-09-17 5:33 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-15 3:38 Domen's MPC5200 FEC cleanup patch Jon Smirl
2007-09-15 4:28 ` Jon Smirl
2007-09-15 12:22 ` Domen Puncer
2007-09-15 15:55 ` Jon Smirl
2007-09-16 17:00 ` Jon Smirl
2007-09-16 17:05 ` Jon Smirl
2007-09-16 18:00 ` Jon Smirl
2007-09-16 18:25 ` Jon Smirl
2007-09-16 18:34 ` Robert Schwebel
2007-09-16 18:38 ` Jon Smirl
2007-09-16 18:50 ` Robert Schwebel
2007-09-16 18:54 ` Jon Smirl
2007-09-16 18:42 ` Jeff Mock
2007-09-16 19:05 ` Jon Smirl
2007-09-17 5:33 ` Domen Puncer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).