linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* mpc5200 fec error
@ 2009-05-18 17:36 Eric Millbrandt
  2009-05-19 20:36 ` Robert Schwebel
  0 siblings, 1 reply; 15+ messages in thread
From: Eric Millbrandt @ 2009-05-18 17:36 UTC (permalink / raw)
  To: linuxppc-dev

[-- Attachment #1: Type: text/plain, Size: 3592 bytes --]

Hello all,

 

I am testing a 2.6.29.3 (with preempt_rt patches) kernel on a phytec
pcm030 and am getting a kernel hang when testing the fec Ethernet
controller.  The error only occurs when running the preempt-patched
kernel, an unmodified kernel works fine.  Is anyone out there using
preempt_rt on an MPC5200 successfully?

 

Eric

 

root@rudolph-ui:/root> iperf -c linux-5200bdevl01 -P 2 -i 1 -p 5001 -f k
-t 600

------------------------------------------------------------

Client connecting to linux-5200bdevl01, TCP port 5001

TCP window size: 36.2 KByte (default)

------------------------------------------------------------

[  4] local 10.1.4.88 port 37872 connected with 10.1.5.234 port 5001

[  3] local 10.1.4.88 port 37871 connected with 10.1.5.234 port 5001

[ ID] Interval       Transfer     Bandwidth

[  3]  0.0- 1.0 sec  3824 KBytes  31326 Kbits/sec

[ ID] Interval       Transfer     Bandwidth

[  4]  0.0- 1.0 sec  3656 KBytes  29950 Kbits/sec

[SUM]  0.0- 1.0 sec  7480 KBytes  61276 Kbits/sec

[ ID] Interval       Transfer     Bandwidth

[  4]  1.0- 2.0 sec  3760 KBytes  30802 Kbits/sec

[ ID] Interval       Transfer     Bandwidth

[  3]  1.0- 2.0 sec  3752 KBytes  30736 Kbits/sec

[SUM]  1.0- 2.0 sec  7512 KBytes  61538 Kbits/sec

[ ID] Interval       Transfer     Bandwidth

[  4]  2.0- 3.0 sec  3728 KBytes  30540 Kbits/sec

[ ID] Interval       Transfer     Bandwidth

[  3]  2.0- 3.0 sec  3816 KBytes  31261 Kbits/sec

[SUM]  2.0- 3.0 sec  7544 KBytes  61800 Kbits/sec

[ ID] Interval       Transfer     Bandwidth

[  3]  3.0- 4.0 sec  3712 KBytes  30409 Kbits/sec

[ ID] Interval       Transfer     Bandwidth

[  4]  3.0- 4.0 sec  3824 KBytes  31326 Kbits/sec

[SUM]  3.0- 4.0 sec  7536 KBytes  61735 Kbits/sec

[ ID] Interval       Transfer     Bandwidth

[  3]  4.0- 5.0 sec  3968 KBytes  32506 Kbits/sec

[ ID] Interval       Transfer     Bandwidth

[  4]  4.0- 5.0 sec  3624 KBytes  29688 Kbits/sec

[SUM]  4.0- 5.0 sec  7592 KBytes  62194 Kbits/sec

[ 5761.999175] net eth0: transmit queue overrun

[ 5762.003591] net eth0: transmit queue overrun

[ 5762.007948] net eth0: transmit queue overrun

[ 5762.012302] net eth0: transmit queue overrun

[ 5762.016658] net eth0: transmit queue overrun

[ 5762.021013] net eth0: transmit queue overrun

[ 5762.025381] net eth0: transmit queue overrun

[ 5762.029735] net eth0: transmit queue overrun

[ 5762.034090] net eth0: transmit queue overrun

[ 5762.038445] net eth0: transmit queue overrun

[ 5767.000928] net eth0: transmit queue overrun

[ 5767.005278] net eth0: transmit queue overrun

[ 5767.009634] net eth0: transmit queue overrun

[ 5767.013990] net eth0: transmit queue overrun

[ 5767.018345] net eth0: transmit queue overrun

[ 5767.022701] net eth0: transmit queue overrun

...



_________________________________________________________________________________________

This e-mail and the information, including any attachments, it contains are intended to be a confidential communication only to the person or entity to whom it is addressed and may contain information that is privileged. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify the sender and destroy the original message.

Thank you.

Please consider the environment before printing this email.

[-- Attachment #2: Type: text/html, Size: 12384 bytes --]

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

* Re: mpc5200 fec error
  2009-05-18 17:36 mpc5200 fec error Eric Millbrandt
@ 2009-05-19 20:36 ` Robert Schwebel
  2009-05-19 20:57   ` Wolfram Sang
  0 siblings, 1 reply; 15+ messages in thread
From: Robert Schwebel @ 2009-05-19 20:36 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: linuxppc-dev, Eric Millbrandt

Wolfram, have you seen this mail? You recently tested -rt on 2.6.29,
right? Did you only test that on the customer hardware or also on the
phyCORE-MPC5200B?

rsc

On Mon, May 18, 2009 at 01:36:27PM -0400, Eric Millbrandt wrote:
> Hello all,
> 
>  
> 
> I am testing a 2.6.29.3 (with preempt_rt patches) kernel on a phytec pcm030 and
> am getting a kernel hang when testing the fec Ethernet controller.  The error
> only occurs when running the preempt-patched kernel, an unmodified kernel works
> fine.  Is anyone out there using preempt_rt on an MPC5200 successfully?
> 
>  
> 
> Eric
> 
>  
> 
> root@rudolph-ui:/root> iperf -c linux-5200bdevl01 -P 2 -i 1 -p 5001 -f k -t 600
> 
> ------------------------------------------------------------
> 
> Client connecting to linux-5200bdevl01, TCP port 5001
> 
> TCP window size: 36.2 KByte (default)
> 
> ------------------------------------------------------------
> 
> [  4] local 10.1.4.88 port 37872 connected with 10.1.5.234 port 5001
> 
> [  3] local 10.1.4.88 port 37871 connected with 10.1.5.234 port 5001
> 
> [ ID] Interval       Transfer     Bandwidth
> 
> [  3]  0.0- 1.0 sec  3824 KBytes  31326 Kbits/sec
> 
> [ ID] Interval       Transfer     Bandwidth
> 
> [  4]  0.0- 1.0 sec  3656 KBytes  29950 Kbits/sec
> 
> [SUM]  0.0- 1.0 sec  7480 KBytes  61276 Kbits/sec
> 
> [ ID] Interval       Transfer     Bandwidth
> 
> [  4]  1.0- 2.0 sec  3760 KBytes  30802 Kbits/sec
> 
> [ ID] Interval       Transfer     Bandwidth
> 
> [  3]  1.0- 2.0 sec  3752 KBytes  30736 Kbits/sec
> 
> [SUM]  1.0- 2.0 sec  7512 KBytes  61538 Kbits/sec
> 
> [ ID] Interval       Transfer     Bandwidth
> 
> [  4]  2.0- 3.0 sec  3728 KBytes  30540 Kbits/sec
> 
> [ ID] Interval       Transfer     Bandwidth
> 
> [  3]  2.0- 3.0 sec  3816 KBytes  31261 Kbits/sec
> 
> [SUM]  2.0- 3.0 sec  7544 KBytes  61800 Kbits/sec
> 
> [ ID] Interval       Transfer     Bandwidth
> 
> [  3]  3.0- 4.0 sec  3712 KBytes  30409 Kbits/sec
> 
> [ ID] Interval       Transfer     Bandwidth
> 
> [  4]  3.0- 4.0 sec  3824 KBytes  31326 Kbits/sec
> 
> [SUM]  3.0- 4.0 sec  7536 KBytes  61735 Kbits/sec
> 
> [ ID] Interval       Transfer     Bandwidth
> 
> [  3]  4.0- 5.0 sec  3968 KBytes  32506 Kbits/sec
> 
> [ ID] Interval       Transfer     Bandwidth
> 
> [  4]  4.0- 5.0 sec  3624 KBytes  29688 Kbits/sec
> 
> [SUM]  4.0- 5.0 sec  7592 KBytes  62194 Kbits/sec
> 
> [ 5761.999175] net eth0: transmit queue overrun
> 
> [ 5762.003591] net eth0: transmit queue overrun
> 
> [ 5762.007948] net eth0: transmit queue overrun
> 
> [ 5762.012302] net eth0: transmit queue overrun
> 
> [ 5762.016658] net eth0: transmit queue overrun
> 
> [ 5762.021013] net eth0: transmit queue overrun
> 
> [ 5762.025381] net eth0: transmit queue overrun
> 
> [ 5762.029735] net eth0: transmit queue overrun
> 
> [ 5762.034090] net eth0: transmit queue overrun
> 
> [ 5762.038445] net eth0: transmit queue overrun
> 
> [ 5767.000928] net eth0: transmit queue overrun
> 
> [ 5767.005278] net eth0: transmit queue overrun
> 
> [ 5767.009634] net eth0: transmit queue overrun
> 
> [ 5767.013990] net eth0: transmit queue overrun
> 
> [ 5767.018345] net eth0: transmit queue overrun
> 
> [ 5767.022701] net eth0: transmit queue overrun
> 
> ?.
> 
> 
> 
> _____________________________________________________________________________
> 
> This e-mail and the information, including any attachments, it contains are
> intended to be a confidential communication only to the person or entity to
> whom it is addressed and may contain information that is privileged. If the
> reader of this message is not the intended recipient, you are hereby notified
> that any dissemination, distribution or copying of this communication is
> strictly prohibited. If you have received this communication in error, please
> immediately notify the sender and destroy the original message.
> 
> Thank you.        
> 
> 
> 
> Please consider the environment before printing this email.
> 

> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

* Re: mpc5200 fec error
  2009-05-19 20:36 ` Robert Schwebel
@ 2009-05-19 20:57   ` Wolfram Sang
  2009-05-19 22:21     ` Eric Millbrandt
  0 siblings, 1 reply; 15+ messages in thread
From: Wolfram Sang @ 2009-05-19 20:57 UTC (permalink / raw)
  To: Robert Schwebel; +Cc: linuxppc-dev, Eric Millbrandt

[-- Attachment #1: Type: text/plain, Size: 641 bytes --]

On Tue, May 19, 2009 at 10:36:45PM +0200, Robert Schwebel wrote:
> Wolfram, have you seen this mail? You recently tested -rt on 2.6.29,
> right? Did you only test that on the customer hardware or also on the
> phyCORE-MPC5200B?

So far, I tried only on customer hardware, and that was 2.6.29.2-rt11. With
that setup, I could work with NFS flawlessly, no real stress-testing though.
Testing latest .3-rt is on my todo, will check the phyCOREs, too.

Regards,

   Wolfram

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

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

* RE: mpc5200 fec error
  2009-05-19 20:57   ` Wolfram Sang
@ 2009-05-19 22:21     ` Eric Millbrandt
  2009-05-19 23:36       ` Grant Likely
  0 siblings, 1 reply; 15+ messages in thread
From: Eric Millbrandt @ 2009-05-19 22:21 UTC (permalink / raw)
  To: Wolfram Sang, Robert Schwebel; +Cc: linuxppc-dev

-----Original Message-----
From: Wolfram Sang [mailto:w.sang@pengutronix.de]=20
Sent: Tuesday, May 19, 2009 16:57
To: Robert Schwebel
Cc: Eric Millbrandt; linuxppc-dev@ozlabs.org
Subject: Re: mpc5200 fec error

On Tue, May 19, 2009 at 10:36:45PM +0200, Robert Schwebel wrote:
> Wolfram, have you seen this mail? You recently tested -rt on 2.6.29,
> right? Did you only test that on the customer hardware or also on the
> phyCORE-MPC5200B?

So far, I tried only on customer hardware, and that was 2.6.29.2-rt11.
With
that setup, I could work with NFS flawlessly, no real stress-testing
though.
Testing latest .3-rt is on my todo, will check the phyCOREs, too.

Regards,

   Wolfram

--=20
Pengutronix e.K.                           | Wolfram Sang
|
Industrial Linux Solutions                 | http://www.pengutronix.de/
|

I am able to reproduce the error using 2.6.29.2-rt11.  I was able to
mitigate the problem by raising the priority of the transmit irq.
However when running an NFS server on the pcm030 under high cpu load I
now get

[  132.477503] net eth0: FEC_IEVENT_RFIFO_ERROR
[  132.892329] net eth0: FEC_IEVENT_RFIFO_ERROR
[  133.884109] net eth0: FEC_IEVENT_RFIFO_ERROR
[  134.876059] net eth0: FEC_IEVENT_RFIFO_ERROR

Raising the priority of the rx irq does not seem to fix this problem
though.


_________________________________________________________________________=
________________

This e-mail and the information, including any attachments, it contains =
are intended to be a confidential communication only to the person or =
entity to whom it is addressed and may contain information that is =
privileged. If the reader of this message is not the intended recipient, =
you are hereby notified that any dissemination, distribution or copying =
of this communication is strictly prohibited. If you have received this =
communication in error, please immediately notify the sender and destroy =
the original message.

Thank you.

Please consider the environment before printing this email.

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

* Re: mpc5200 fec error
  2009-05-19 22:21     ` Eric Millbrandt
@ 2009-05-19 23:36       ` Grant Likely
  2009-05-20  6:42         ` Wolfram Sang
  0 siblings, 1 reply; 15+ messages in thread
From: Grant Likely @ 2009-05-19 23:36 UTC (permalink / raw)
  To: Eric Millbrandt; +Cc: linuxppc-dev

On Tue, May 19, 2009 at 4:21 PM, Eric Millbrandt
<emillbrandt@dekaresearch.com> wrote:
> -----Original Message-----
> From: Wolfram Sang [mailto:w.sang@pengutronix.de]
> Sent: Tuesday, May 19, 2009 16:57
> To: Robert Schwebel
> Cc: Eric Millbrandt; linuxppc-dev@ozlabs.org
> Subject: Re: mpc5200 fec error
>
> On Tue, May 19, 2009 at 10:36:45PM +0200, Robert Schwebel wrote:
>> Wolfram, have you seen this mail? You recently tested -rt on 2.6.29,
>> right? Did you only test that on the customer hardware or also on the
>> phyCORE-MPC5200B?
>
> So far, I tried only on customer hardware, and that was 2.6.29.2-rt11.
> With
> that setup, I could work with NFS flawlessly, no real stress-testing
> though.
> Testing latest .3-rt is on my todo, will check the phyCOREs, too.
>
> Regards,
>
> =A0 Wolfram
>
> --
> Pengutronix e.K. =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 | Wo=
lfram Sang
> |
> Industrial Linux Solutions =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 | http://www.p=
engutronix.de/
> |
>
> I am able to reproduce the error using 2.6.29.2-rt11. =A0I was able to
> mitigate the problem by raising the priority of the transmit irq.
> However when running an NFS server on the pcm030 under high cpu load I
> now get
>
> [ =A0132.477503] net eth0: FEC_IEVENT_RFIFO_ERROR
> [ =A0132.892329] net eth0: FEC_IEVENT_RFIFO_ERROR
> [ =A0133.884109] net eth0: FEC_IEVENT_RFIFO_ERROR
> [ =A0134.876059] net eth0: FEC_IEVENT_RFIFO_ERROR
>
> Raising the priority of the rx irq does not seem to fix this problem
> though.

Hi Eric,

This error has been seen before in non-rt kernels.  I haven't had the
chance to track it down and kill it yet.  I believe there are locking
issues associated with it.

g.

>
>
> _________________________________________________________________________=
________________
>
> This e-mail and the information, including any attachments, it contains a=
re intended to be a confidential communication only to the person or entity=
 to whom it is addressed and may contain information that is privileged. If=
 the reader of this message is not the intended recipient, you are hereby n=
otified that any dissemination, distribution or copying of this communicati=
on is strictly prohibited. If you have received this communication in error=
, please immediately notify the sender and destroy the original message.
>
> Thank you.
>
> Please consider the environment before printing this email.
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
>



--=20
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.

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

* Re: mpc5200 fec error
  2009-05-19 23:36       ` Grant Likely
@ 2009-05-20  6:42         ` Wolfram Sang
  2009-05-20 13:42           ` Eric Millbrandt
  0 siblings, 1 reply; 15+ messages in thread
From: Wolfram Sang @ 2009-05-20  6:42 UTC (permalink / raw)
  To: Grant Likely; +Cc: linuxppc-dev, Eric Millbrandt

[-- Attachment #1: Type: text/plain, Size: 2339 bytes --]


> > I am able to reproduce the error using 2.6.29.2-rt11.  I was able to
> > mitigate the problem by raising the priority of the transmit irq.
> > However when running an NFS server on the pcm030 under high cpu load I
> > now get
> >
> > [  132.477503] net eth0: FEC_IEVENT_RFIFO_ERROR
> > [  132.892329] net eth0: FEC_IEVENT_RFIFO_ERROR
> > [  133.884109] net eth0: FEC_IEVENT_RFIFO_ERROR
> > [  134.876059] net eth0: FEC_IEVENT_RFIFO_ERROR
> >
> > Raising the priority of the rx irq does not seem to fix this problem
> > though.
> 
> Hi Eric,
> 
> This error has been seen before in non-rt kernels.  I haven't had the
> chance to track it down and kill it yet.  I believe there are locking
> issues associated with it.

Uuuh, I recall this message. Kept me busy for some time :(

You might try this patch which helped in our situation.

===========

Subject: Enable XLB pipelining for MPC5200B
From: Wolfram Sang <w.sang@pengutronix.de>

Enable pipelining as it helps getting rid of FEC problems.
Not intended for upstream, this must be dealt differently there.

This patch is disabled by default. The bootloader should enable this feature.
So, this patch is only intended to be used where the bootloader does it in a
wrong manner and can't be replaced.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Juergen Beisert <j.beisert@pengutronix.de>

---
 arch/powerpc/platforms/52xx/mpc52xx_common.c |    7 +++++++
 1 file changed, 7 insertions(+)

Index: arch/powerpc/platforms/52xx/mpc52xx_common.c
===================================================================
--- arch/powerpc/platforms/52xx/mpc52xx_common.c.orig
+++ arch/powerpc/platforms/52xx/mpc52xx_common.c
@@ -107,6 +107,13 @@ mpc5200_setup_xlb_arbiter(void)
 	 */
 	if ((mfspr(SPRN_SVR) & MPC5200_SVR_MASK) == MPC5200_SVR)
 		out_be32(&xlb->config, in_be32(&xlb->config) | MPC52xx_XLB_CFG_PLDIS);
+#if 0
+	/*
+	 * Enable pipelining, fixes FEC problems. The previous workaround is not
+	 * needed, as we have an MPC5200B (not A).
+	 */
+	out_be32(&xlb->config, in_be32(&xlb->config) & ~MPC52xx_XLB_CFG_PLDIS);
+#endif
 
 	iounmap(xlb);
 }

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

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

* RE: mpc5200 fec error
  2009-05-20  6:42         ` Wolfram Sang
@ 2009-05-20 13:42           ` Eric Millbrandt
  2009-05-20 15:14             ` Jon Smirl
  0 siblings, 1 reply; 15+ messages in thread
From: Eric Millbrandt @ 2009-05-20 13:42 UTC (permalink / raw)
  To: Wolfram Sang, Grant Likely; +Cc: linuxppc-dev

> > I am able to reproduce the error using 2.6.29.2-rt11.  I was able to
> > mitigate the problem by raising the priority of the transmit irq.
> > However when running an NFS server on the pcm030 under high cpu load =
I
> > now get
> >
> > [  132.477503] net eth0: FEC_IEVENT_RFIFO_ERROR
> > [  132.892329] net eth0: FEC_IEVENT_RFIFO_ERROR
> > [  133.884109] net eth0: FEC_IEVENT_RFIFO_ERROR
> > [  134.876059] net eth0: FEC_IEVENT_RFIFO_ERROR
> >
> > Raising the priority of the rx irq does not seem to fix this problem
> > though.
>=20
> Hi Eric,
>=20
> This error has been seen before in non-rt kernels.  I haven't had the
> chance to track it down and kill it yet.  I believe there are locking
> issues associated with it.

Uuuh, I recall this message. Kept me busy for some time :(

You might try this patch which helped in our situation.

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

Subject: Enable XLB pipelining for MPC5200B
From: Wolfram Sang <w.sang@pengutronix.de>

Enable pipelining as it helps getting rid of FEC problems.
Not intended for upstream, this must be dealt differently there.

This patch is disabled by default. The bootloader should enable this =
feature.
So, this patch is only intended to be used where the bootloader does it =
in a
wrong manner and can't be replaced.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Juergen Beisert <j.beisert@pengutronix.de>

---
 arch/powerpc/platforms/52xx/mpc52xx_common.c |    7 +++++++
 1 file changed, 7 insertions(+)

Index: arch/powerpc/platforms/52xx/mpc52xx_common.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- arch/powerpc/platforms/52xx/mpc52xx_common.c.orig
+++ arch/powerpc/platforms/52xx/mpc52xx_common.c
@@ -107,6 +107,13 @@ mpc5200_setup_xlb_arbiter(void)
 	 */
 	if ((mfspr(SPRN_SVR) & MPC5200_SVR_MASK) =3D=3D MPC5200_SVR)
 		out_be32(&xlb->config, in_be32(&xlb->config) | =
MPC52xx_XLB_CFG_PLDIS);
+#if 0
+	/*
+	 * Enable pipelining, fixes FEC problems. The previous workaround is =
not
+	 * needed, as we have an MPC5200B (not A).
+	 */
+	out_be32(&xlb->config, in_be32(&xlb->config) & =
~MPC52xx_XLB_CFG_PLDIS);
+#endif
=20
 	iounmap(xlb);
 }

--=20
Pengutronix e.K.                           | Wolfram Sang                =
|
Industrial Linux Solutions                 | http://www.pengutronix.de/  =
|

Wolfram,

Thanks, but no luck with this patch.  It was already setup correctly by =
U-Boot.

Eric


_________________________________________________________________________=
________________

This e-mail and the information, including any attachments, it contains =
are intended to be a confidential communication only to the person or =
entity to whom it is addressed and may contain information that is =
privileged. If the reader of this message is not the intended recipient, =
you are hereby notified that any dissemination, distribution or copying =
of this communication is strictly prohibited. If you have received this =
communication in error, please immediately notify the sender and destroy =
the original message.

Thank you.

Please consider the environment before printing this email.

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

* Re: mpc5200 fec error
  2009-05-20 13:42           ` Eric Millbrandt
@ 2009-05-20 15:14             ` Jon Smirl
  2009-05-20 15:28               ` Eric Millbrandt
  0 siblings, 1 reply; 15+ messages in thread
From: Jon Smirl @ 2009-05-20 15:14 UTC (permalink / raw)
  To: Eric Millbrandt; +Cc: linuxppc-dev

On Wed, May 20, 2009 at 9:42 AM, Eric Millbrandt
<emillbrandt@dekaresearch.com> wrote:
>> > I am able to reproduce the error using 2.6.29.2-rt11. =A0I was able to
>> > mitigate the problem by raising the priority of the transmit irq.
>> > However when running an NFS server on the pcm030 under high cpu load I
>> > now get
>> >
>> > [ =A0132.477503] net eth0: FEC_IEVENT_RFIFO_ERROR
>> > [ =A0132.892329] net eth0: FEC_IEVENT_RFIFO_ERROR
>> > [ =A0133.884109] net eth0: FEC_IEVENT_RFIFO_ERROR
>> > [ =A0134.876059] net eth0: FEC_IEVENT_RFIFO_ERROR
>> >
>> > Raising the priority of the rx irq does not seem to fix this problem
>> > though.
>>
>> Hi Eric,
>>
>> This error has been seen before in non-rt kernels. =A0I haven't had the
>> chance to track it down and kill it yet. =A0I believe there are locking
>> issues associated with it.
>
> Uuuh, I recall this message. Kept me busy for some time :(
>
> You might try this patch which helped in our situation.
>
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
>
> Subject: Enable XLB pipelining for MPC5200B
> From: Wolfram Sang <w.sang@pengutronix.de>
>
> Enable pipelining as it helps getting rid of FEC problems.
> Not intended for upstream, this must be dealt differently there.
>
> This patch is disabled by default. The bootloader should enable this feat=
ure.
> So, this patch is only intended to be used where the bootloader does it i=
n a
> wrong manner and can't be replaced.
>
> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
> Acked-by: Juergen Beisert <j.beisert@pengutronix.de>
>
> ---
> =A0arch/powerpc/platforms/52xx/mpc52xx_common.c | =A0 =A07 +++++++
> =A01 file changed, 7 insertions(+)
>
> Index: arch/powerpc/platforms/52xx/mpc52xx_common.c
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> --- arch/powerpc/platforms/52xx/mpc52xx_common.c.orig
> +++ arch/powerpc/platforms/52xx/mpc52xx_common.c
> @@ -107,6 +107,13 @@ mpc5200_setup_xlb_arbiter(void)
> =A0 =A0 =A0 =A0 */
> =A0 =A0 =A0 =A0if ((mfspr(SPRN_SVR) & MPC5200_SVR_MASK) =3D=3D MPC5200_SV=
R)
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0out_be32(&xlb->config, in_be32(&xlb->confi=
g) | MPC52xx_XLB_CFG_PLDIS);
> +#if 0
> + =A0 =A0 =A0 /*
> + =A0 =A0 =A0 =A0* Enable pipelining, fixes FEC problems. The previous wo=
rkaround is not
> + =A0 =A0 =A0 =A0* needed, as we have an MPC5200B (not A).
> + =A0 =A0 =A0 =A0*/
> + =A0 =A0 =A0 out_be32(&xlb->config, in_be32(&xlb->config) & ~MPC52xx_XLB=
_CFG_PLDIS);
> +#endif
>
> =A0 =A0 =A0 =A0iounmap(xlb);
> =A0}
>
> --
> Pengutronix e.K. =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 | Wo=
lfram Sang =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0|
> Industrial Linux Solutions =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 | http://www.p=
engutronix.de/ =A0|
>
> Wolfram,
>
> Thanks, but no luck with this patch. =A0It was already setup correctly by=
 U-Boot.


I don't see where this gets enabled in the u-boot source. Have you
added it locally?

These are the only two I see:
cpu/mpc5xxx/cpu_init.c:	*(vu_long *)(MPC5XXX_XLBARB + 0x40) |=3D (1 << 13);
cpu/mpc5xxx/cpu_init.c:	*(vu_long *)(MPC5XXX_XLBARB + 0x40) |=3D (1 << 15);


--=20
Jon Smirl
jonsmirl@gmail.com

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

* RE: mpc5200 fec error
  2009-05-20 15:14             ` Jon Smirl
@ 2009-05-20 15:28               ` Eric Millbrandt
  2009-05-20 15:29                 ` Jon Smirl
  0 siblings, 1 reply; 15+ messages in thread
From: Eric Millbrandt @ 2009-05-20 15:28 UTC (permalink / raw)
  To: Jon Smirl; +Cc: linuxppc-dev

-----Original Message-----
From: Jon Smirl [mailto:jonsmirl@gmail.com]=20
Sent: Wednesday, May 20, 2009 11:15
To: Eric Millbrandt
Cc: Wolfram Sang; Grant Likely; linuxppc-dev@ozlabs.org
Subject: Re: mpc5200 fec error

On Wed, May 20, 2009 at 9:42 AM, Eric Millbrandt
<emillbrandt@dekaresearch.com> wrote:
>> > I am able to reproduce the error using 2.6.29.2-rt11.  I was able =
to
>> > mitigate the problem by raising the priority of the transmit irq.
>> > However when running an NFS server on the pcm030 under high cpu =
load I
>> > now get
>> >
>> > [  132.477503] net eth0: FEC_IEVENT_RFIFO_ERROR
>> > [  132.892329] net eth0: FEC_IEVENT_RFIFO_ERROR
>> > [  133.884109] net eth0: FEC_IEVENT_RFIFO_ERROR
>> > [  134.876059] net eth0: FEC_IEVENT_RFIFO_ERROR
>> >
>> > Raising the priority of the rx irq does not seem to fix this =
problem
>> > though.
>>
>> Hi Eric,
>>
>> This error has been seen before in non-rt kernels.  I haven't had the
>> chance to track it down and kill it yet.  I believe there are locking
>> issues associated with it.
>
> Uuuh, I recall this message. Kept me busy for some time :(
>
> You might try this patch which helped in our situation.
>
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
>
> Subject: Enable XLB pipelining for MPC5200B
> From: Wolfram Sang <w.sang@pengutronix.de>
>
> Enable pipelining as it helps getting rid of FEC problems.
> Not intended for upstream, this must be dealt differently there.
>
> This patch is disabled by default. The bootloader should enable this =
feature.
> So, this patch is only intended to be used where the bootloader does =
it in a
> wrong manner and can't be replaced.
>
> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
> Acked-by: Juergen Beisert <j.beisert@pengutronix.de>
>
> ---
>  arch/powerpc/platforms/52xx/mpc52xx_common.c |    7 +++++++
>  1 file changed, 7 insertions(+)
>
> Index: arch/powerpc/platforms/52xx/mpc52xx_common.c
> =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> --- arch/powerpc/platforms/52xx/mpc52xx_common.c.orig
> +++ arch/powerpc/platforms/52xx/mpc52xx_common.c
> @@ -107,6 +107,13 @@ mpc5200_setup_xlb_arbiter(void)
>         */
>        if ((mfspr(SPRN_SVR) & MPC5200_SVR_MASK) =3D=3D MPC5200_SVR)
>                out_be32(&xlb->config, in_be32(&xlb->config) | =
MPC52xx_XLB_CFG_PLDIS);
> +#if 0
> +       /*
> +        * Enable pipelining, fixes FEC problems. The previous =
workaround is not
> +        * needed, as we have an MPC5200B (not A).
> +        */
> +       out_be32(&xlb->config, in_be32(&xlb->config) & =
~MPC52xx_XLB_CFG_PLDIS);
> +#endif
>
>        iounmap(xlb);
>  }
>
> --
> Pengutronix e.K.                           | Wolfram Sang              =
  |
> Industrial Linux Solutions                 | =
http://www.pengutronix.de/  |
>
> Wolfram,
>
> Thanks, but no luck with this patch.  It was already setup correctly =
by U-Boot.


I don't see where this gets enabled in the u-boot source. Have you
added it locally?

These are the only two I see:
cpu/mpc5xxx/cpu_init.c:	*(vu_long *)(MPC5XXX_XLBARB + 0x40) |=3D (1 << =
13);
cpu/mpc5xxx/cpu_init.c:	*(vu_long *)(MPC5XXX_XLBARB + 0x40) |=3D (1 << =
15);


--=20
Jon Smirl
jonsmirl@gmail.com

If you look a few more lines down you should see
# if defined(CFG_XLB_PIPELINING)
	/* Enable piplining */
	*(vu_long *)(MPC5XXX_XLBARB + 0x40) &=3D ~(1 << 31);
# endif

I obtained the u-boot sources directly from phytec, for my phyCore, so I =
am not sure if they added it.


_________________________________________________________________________=
________________

This e-mail and the information, including any attachments, it contains =
are intended to be a confidential communication only to the person or =
entity to whom it is addressed and may contain information that is =
privileged. If the reader of this message is not the intended recipient, =
you are hereby notified that any dissemination, distribution or copying =
of this communication is strictly prohibited. If you have received this =
communication in error, please immediately notify the sender and destroy =
the original message.

Thank you.

Please consider the environment before printing this email.

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

* Re: mpc5200 fec error
  2009-05-20 15:28               ` Eric Millbrandt
@ 2009-05-20 15:29                 ` Jon Smirl
  2009-05-20 16:41                   ` Eric Millbrandt
  0 siblings, 1 reply; 15+ messages in thread
From: Jon Smirl @ 2009-05-20 15:29 UTC (permalink / raw)
  To: Eric Millbrandt; +Cc: linuxppc-dev

On Wed, May 20, 2009 at 11:28 AM, Eric Millbrandt
<emillbrandt@dekaresearch.com> wrote:
> -----Original Message-----
> From: Jon Smirl [mailto:jonsmirl@gmail.com]
> Sent: Wednesday, May 20, 2009 11:15
> To: Eric Millbrandt
> Cc: Wolfram Sang; Grant Likely; linuxppc-dev@ozlabs.org
> Subject: Re: mpc5200 fec error
>
> On Wed, May 20, 2009 at 9:42 AM, Eric Millbrandt
> <emillbrandt@dekaresearch.com> wrote:
>>> > I am able to reproduce the error using 2.6.29.2-rt11. =A0I was able t=
o
>>> > mitigate the problem by raising the priority of the transmit irq.
>>> > However when running an NFS server on the pcm030 under high cpu load =
I
>>> > now get
>>> >
>>> > [ =A0132.477503] net eth0: FEC_IEVENT_RFIFO_ERROR
>>> > [ =A0132.892329] net eth0: FEC_IEVENT_RFIFO_ERROR
>>> > [ =A0133.884109] net eth0: FEC_IEVENT_RFIFO_ERROR
>>> > [ =A0134.876059] net eth0: FEC_IEVENT_RFIFO_ERROR
>>> >
>>> > Raising the priority of the rx irq does not seem to fix this problem
>>> > though.
>>>
>>> Hi Eric,
>>>
>>> This error has been seen before in non-rt kernels. =A0I haven't had the
>>> chance to track it down and kill it yet. =A0I believe there are locking
>>> issues associated with it.
>>
>> Uuuh, I recall this message. Kept me busy for some time :(
>>
>> You might try this patch which helped in our situation.
>>
>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
>>
>> Subject: Enable XLB pipelining for MPC5200B
>> From: Wolfram Sang <w.sang@pengutronix.de>
>>
>> Enable pipelining as it helps getting rid of FEC problems.
>> Not intended for upstream, this must be dealt differently there.
>>
>> This patch is disabled by default. The bootloader should enable this fea=
ture.
>> So, this patch is only intended to be used where the bootloader does it =
in a
>> wrong manner and can't be replaced.
>>
>> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
>> Acked-by: Juergen Beisert <j.beisert@pengutronix.de>
>>
>> ---
>> =A0arch/powerpc/platforms/52xx/mpc52xx_common.c | =A0 =A07 +++++++
>> =A01 file changed, 7 insertions(+)
>>
>> Index: arch/powerpc/platforms/52xx/mpc52xx_common.c
>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
>> --- arch/powerpc/platforms/52xx/mpc52xx_common.c.orig
>> +++ arch/powerpc/platforms/52xx/mpc52xx_common.c
>> @@ -107,6 +107,13 @@ mpc5200_setup_xlb_arbiter(void)
>> =A0 =A0 =A0 =A0 */
>> =A0 =A0 =A0 =A0if ((mfspr(SPRN_SVR) & MPC5200_SVR_MASK) =3D=3D MPC5200_S=
VR)
>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0out_be32(&xlb->config, in_be32(&xlb->conf=
ig) | MPC52xx_XLB_CFG_PLDIS);
>> +#if 0
>> + =A0 =A0 =A0 /*
>> + =A0 =A0 =A0 =A0* Enable pipelining, fixes FEC problems. The previous w=
orkaround is not
>> + =A0 =A0 =A0 =A0* needed, as we have an MPC5200B (not A).
>> + =A0 =A0 =A0 =A0*/
>> + =A0 =A0 =A0 out_be32(&xlb->config, in_be32(&xlb->config) & ~MPC52xx_XL=
B_CFG_PLDIS);
>> +#endif
>>
>> =A0 =A0 =A0 =A0iounmap(xlb);
>> =A0}
>>
>> --
>> Pengutronix e.K. =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 | W=
olfram Sang =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0|
>> Industrial Linux Solutions =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 | http://www.=
pengutronix.de/ =A0|
>>
>> Wolfram,
>>
>> Thanks, but no luck with this patch. =A0It was already setup correctly b=
y U-Boot.
>
>
> I don't see where this gets enabled in the u-boot source. Have you
> added it locally?
>
> These are the only two I see:
> cpu/mpc5xxx/cpu_init.c: *(vu_long *)(MPC5XXX_XLBARB + 0x40) |=3D (1 << 13=
);
> cpu/mpc5xxx/cpu_init.c: *(vu_long *)(MPC5XXX_XLBARB + 0x40) |=3D (1 << 15=
);
>
>
> --
> Jon Smirl
> jonsmirl@gmail.com
>
> If you look a few more lines down you should see
> # if defined(CFG_XLB_PIPELINING)
> =A0 =A0 =A0 =A0/* Enable piplining */
> =A0 =A0 =A0 =A0*(vu_long *)(MPC5XXX_XLBARB + 0x40) &=3D ~(1 << 31);
> # endif
>
> I obtained the u-boot sources directly from phytec, for my phyCore, so I =
am not sure if they added it.

It is ok in main u-boot source. I just missed the lower section.

--=20
Jon Smirl
jonsmirl@gmail.com

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

* RE: mpc5200 fec error
  2009-05-20 15:29                 ` Jon Smirl
@ 2009-05-20 16:41                   ` Eric Millbrandt
  2009-05-20 16:49                     ` Grant Likely
  0 siblings, 1 reply; 15+ messages in thread
From: Eric Millbrandt @ 2009-05-20 16:41 UTC (permalink / raw)
  To: Jon Smirl; +Cc: linuxppc-dev

> On Wed, May 20, 2009 at 9:42 AM, Eric Millbrandt
> <emillbrandt@dekaresearch.com> wrote:
>>> > I am able to reproduce the error using 2.6.29.2-rt11.  I was able =
to
>>> > mitigate the problem by raising the priority of the transmit irq.
>>> > However when running an NFS server on the pcm030 under high cpu =
load I
>>> > now get
>>> >
>>> > [  132.477503] net eth0: FEC_IEVENT_RFIFO_ERROR
>>> > [  132.892329] net eth0: FEC_IEVENT_RFIFO_ERROR
>>> > [  133.884109] net eth0: FEC_IEVENT_RFIFO_ERROR
>>> > [  134.876059] net eth0: FEC_IEVENT_RFIFO_ERROR
>>> >
>>> > Raising the priority of the rx irq does not seem to fix this =
problem
>>> > though.
>>>
>>> Hi Eric,
>>>
>>> This error has been seen before in non-rt kernels.  I haven't had =
the
>>> chance to track it down and kill it yet.  I believe there are =
locking
>>> issues associated with it.
>>
>> Uuuh, I recall this message. Kept me busy for some time :(
>>
>> You might try this patch which helped in our situation.
>>
>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
>>
>> Subject: Enable XLB pipelining for MPC5200B
>> From: Wolfram Sang <w.sang@pengutronix.de>
>>
>> Enable pipelining as it helps getting rid of FEC problems.
>> Not intended for upstream, this must be dealt differently there.
>>
>> This patch is disabled by default. The bootloader should enable this =
feature.
>> So, this patch is only intended to be used where the bootloader does =
it in a
>> wrong manner and can't be replaced.
>>
>> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
>> Acked-by: Juergen Beisert <j.beisert@pengutronix.de>
>>
>> ---
>>  arch/powerpc/platforms/52xx/mpc52xx_common.c |    7 +++++++
>>  1 file changed, 7 insertions(+)
>>
>> Index: arch/powerpc/platforms/52xx/mpc52xx_common.c
>> =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
>> --- arch/powerpc/platforms/52xx/mpc52xx_common.c.orig
>> +++ arch/powerpc/platforms/52xx/mpc52xx_common.c
>> @@ -107,6 +107,13 @@ mpc5200_setup_xlb_arbiter(void)
>>         */
>>        if ((mfspr(SPRN_SVR) & MPC5200_SVR_MASK) =3D=3D MPC5200_SVR)
>>                out_be32(&xlb->config, in_be32(&xlb->config) | =
MPC52xx_XLB_CFG_PLDIS);
>> +#if 0
>> +       /*
>> +        * Enable pipelining, fixes FEC problems. The previous =
workaround is not
>> +        * needed, as we have an MPC5200B (not A).
>> +        */
>> +       out_be32(&xlb->config, in_be32(&xlb->config) & =
~MPC52xx_XLB_CFG_PLDIS);
>> +#endif
>>
>>        iounmap(xlb);
>>  }
>>
>> --
>> Pengutronix e.K.                           | Wolfram Sang             =
   |
>> Industrial Linux Solutions                 | =
http://www.pengutronix.de/  |
>>
>> Wolfram,
>>
>> Thanks, but no luck with this patch.  It was already setup correctly =
by U-Boot.
>
>
> I don't see where this gets enabled in the u-boot source. Have you
> added it locally?
>
> These are the only two I see:
> cpu/mpc5xxx/cpu_init.c: *(vu_long *)(MPC5XXX_XLBARB + 0x40) |=3D (1 << =
13);
> cpu/mpc5xxx/cpu_init.c: *(vu_long *)(MPC5XXX_XLBARB + 0x40) |=3D (1 << =
15);
>
>
> --
> Jon Smirl
> jonsmirl@gmail.com
>
> If you look a few more lines down you should see
> # if defined(CFG_XLB_PIPELINING)
>        /* Enable piplining */
>        *(vu_long *)(MPC5XXX_XLBARB + 0x40) &=3D ~(1 << 31);
> # endif
>
> I obtained the u-boot sources directly from phytec, for my phyCore, so =
I am not sure if they added it.

It is ok in main u-boot source. I just missed the lower section.

--=20
Jon Smirl
jonsmirl@gmail.com

It looks like the phy is never getting reset properly after the =
FEC_IEVENT_RFIFO_ERROR.  I threw some printk's into the fec mdio driver

/drivers/net/fec_mpc52xx_phy.c
  25 static int mpc52xx_fec_mdio_transfer(struct mii_bus *bus, int =
phy_id,
  26                 int reg, u32 value)
  27 {
  28         struct mpc52xx_fec_mdio_priv *priv =3D bus->priv;
  29         struct mpc52xx_fec __iomem *fec;
  30         int tries =3D 100;
  31=20
  32         value |=3D (phy_id << FEC_MII_DATA_PA_SHIFT) & =
FEC_MII_DATA_PA_MSK;
  33         value |=3D (reg << FEC_MII_DATA_RA_SHIFT) & =
FEC_MII_DATA_RA_MSK;
  34=20
  35         fec =3D priv->regs;
  36         out_be32(&fec->ievent, FEC_IEVENT_MII);
  37         out_be32(&priv->regs->mii_data, value);
  38=20
  39         /* wait for it to finish, this takes about 23 us on =
lite5200b */
  40         while (!(in_be32(&fec->ievent) & FEC_IEVENT_MII) && =
--tries)
  41                 udelay(5);
  42=20
  43         if (!tries) {
  44                 printk("Unable to reset phy\n");
  45                 return -ETIMEDOUT;
  46         }
  47=20
  48         return value & FEC_MII_DATA_OP_RD ?
  49                 in_be32(&priv->regs->mii_data) & =
FEC_MII_DATA_DATAMSK : 0;
  50 }

and got this

[  127.085632] net eth0: FEC_IEVENT_RFIFO_ERROR
[  127.093401] Resetting FEC
[  127.096620] Unable to reset phy
[  127.322224] Unable to reset phy
[  128.321987] PHY: f0003000:00 - Link is Down
[  129.221034] net eth0: FEC_IEVENT_RFIFO_ERROR
[  129.228165] Resetting FEC
[  129.231384] Unable to reset phy
[  129.322286] Unable to reset phy
[  132.885863] net eth0: FEC_IEVENT_RFIFO_ERROR
[  132.893002] Resetting FEC
[  132.896176] Unable to reset phy
[  133.322202] Unable to reset phy
[  135.684793] net eth0: FEC_IEVENT_RFIFO_ERROR
[  135.691969] Resetting FEC
[  135.695192] Unable to reset phy
[  136.322530] Unable to reset phy
[  138.490805] net eth0: FEC_IEVENT_RFIFO_ERROR
[  138.497963] Resetting FEC
[  138.501135] Unable to reset phy
[  139.334200] Unable to reset phy

I guess I have to spend some quality time with the 5200 manual.


_________________________________________________________________________=
________________

This e-mail and the information, including any attachments, it contains =
are intended to be a confidential communication only to the person or =
entity to whom it is addressed and may contain information that is =
privileged. If the reader of this message is not the intended recipient, =
you are hereby notified that any dissemination, distribution or copying =
of this communication is strictly prohibited. If you have received this =
communication in error, please immediately notify the sender and destroy =
the original message.

Thank you.

Please consider the environment before printing this email.

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

* Re: mpc5200 fec error
  2009-05-20 16:41                   ` Eric Millbrandt
@ 2009-05-20 16:49                     ` Grant Likely
  2009-05-20 17:26                       ` Eric Millbrandt
  2009-05-20 17:57                       ` Wolfram Sang
  0 siblings, 2 replies; 15+ messages in thread
From: Grant Likely @ 2009-05-20 16:49 UTC (permalink / raw)
  To: Eric Millbrandt; +Cc: linuxppc-dev

On Wed, May 20, 2009 at 10:41 AM, Eric Millbrandt
<emillbrandt@dekaresearch.com> wrote:
> It looks like the phy is never getting reset properly after the FEC_IEVEN=
T_RFIFO_ERROR. =A0I threw some printk's into the fec mdio driver

Yes, that sounds familiar.  Most likely, the value of the MDIO bus
control register got clobbered and not reset when the FEC was reset.
Try adding this line to the beginning of mpc52xx_fec_mdio_transfer():

out_be32(&fec->mii_speed, 0x7e);

It's a dirty ugly hack, but it should help.  If that works, then I can
come up with a better solution.  Part of the problem is that the MDIO
handling in the current code really isn't very good.  I've got changes
queued up in -next which cleans it up quite a bit which should make it
easier to fix properly.

g.

>
> /drivers/net/fec_mpc52xx_phy.c
> =A025 static int mpc52xx_fec_mdio_transfer(struct mii_bus *bus, int phy_i=
d,
> =A026 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 int reg, u32 value)
> =A027 {
> =A028 =A0 =A0 =A0 =A0 struct mpc52xx_fec_mdio_priv *priv =3D bus->priv;
> =A029 =A0 =A0 =A0 =A0 struct mpc52xx_fec __iomem *fec;
> =A030 =A0 =A0 =A0 =A0 int tries =3D 100;
> =A031
> =A032 =A0 =A0 =A0 =A0 value |=3D (phy_id << FEC_MII_DATA_PA_SHIFT) & FEC_=
MII_DATA_PA_MSK;
> =A033 =A0 =A0 =A0 =A0 value |=3D (reg << FEC_MII_DATA_RA_SHIFT) & FEC_MII=
_DATA_RA_MSK;
> =A034
> =A035 =A0 =A0 =A0 =A0 fec =3D priv->regs;
> =A036 =A0 =A0 =A0 =A0 out_be32(&fec->ievent, FEC_IEVENT_MII);
> =A037 =A0 =A0 =A0 =A0 out_be32(&priv->regs->mii_data, value);
> =A038
> =A039 =A0 =A0 =A0 =A0 /* wait for it to finish, this takes about 23 us on=
 lite5200b */
> =A040 =A0 =A0 =A0 =A0 while (!(in_be32(&fec->ievent) & FEC_IEVENT_MII) &&=
 --tries)
> =A041 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 udelay(5);
> =A042
> =A043 =A0 =A0 =A0 =A0 if (!tries) {
> =A044 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 printk("Unable to reset phy\n");
> =A045 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 return -ETIMEDOUT;
> =A046 =A0 =A0 =A0 =A0 }
> =A047
> =A048 =A0 =A0 =A0 =A0 return value & FEC_MII_DATA_OP_RD ?
> =A049 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 in_be32(&priv->regs->mii_data) & FE=
C_MII_DATA_DATAMSK : 0;
> =A050 }
>
> and got this
>
> [ =A0127.085632] net eth0: FEC_IEVENT_RFIFO_ERROR
> [ =A0127.093401] Resetting FEC
> [ =A0127.096620] Unable to reset phy
> [ =A0127.322224] Unable to reset phy
> [ =A0128.321987] PHY: f0003000:00 - Link is Down
> [ =A0129.221034] net eth0: FEC_IEVENT_RFIFO_ERROR
> [ =A0129.228165] Resetting FEC
> [ =A0129.231384] Unable to reset phy
> [ =A0129.322286] Unable to reset phy
> [ =A0132.885863] net eth0: FEC_IEVENT_RFIFO_ERROR
> [ =A0132.893002] Resetting FEC
> [ =A0132.896176] Unable to reset phy
> [ =A0133.322202] Unable to reset phy
> [ =A0135.684793] net eth0: FEC_IEVENT_RFIFO_ERROR
> [ =A0135.691969] Resetting FEC
> [ =A0135.695192] Unable to reset phy
> [ =A0136.322530] Unable to reset phy
> [ =A0138.490805] net eth0: FEC_IEVENT_RFIFO_ERROR
> [ =A0138.497963] Resetting FEC
> [ =A0138.501135] Unable to reset phy
> [ =A0139.334200] Unable to reset phy
>
> I guess I have to spend some quality time with the 5200 manual.
>
>
> _________________________________________________________________________=
________________
>
> This e-mail and the information, including any attachments, it contains a=
re intended to be a confidential communication only to the person or entity=
 to whom it is addressed and may contain information that is privileged. If=
 the reader of this message is not the intended recipient, you are hereby n=
otified that any dissemination, distribution or copying of this communicati=
on is strictly prohibited. If you have received this communication in error=
, please immediately notify the sender and destroy the original message.
>
> Thank you.
>
> Please consider the environment before printing this email.
>



--=20
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.

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

* RE: mpc5200 fec error
  2009-05-20 16:49                     ` Grant Likely
@ 2009-05-20 17:26                       ` Eric Millbrandt
  2009-05-20 17:41                         ` Grant Likely
  2009-05-20 17:57                       ` Wolfram Sang
  1 sibling, 1 reply; 15+ messages in thread
From: Eric Millbrandt @ 2009-05-20 17:26 UTC (permalink / raw)
  To: Grant Likely; +Cc: linuxppc-dev

-----Original Message-----
From: Grant Likely [mailto:grant.likely@secretlab.ca]=20
Sent: Wednesday, May 20, 2009 12:49
To: Eric Millbrandt
Cc: Jon Smirl; Wolfram Sang; linuxppc-dev@ozlabs.org
Subject: Re: mpc5200 fec error

On Wed, May 20, 2009 at 10:41 AM, Eric Millbrandt
<emillbrandt@dekaresearch.com> wrote:
> It looks like the phy is never getting reset properly after the =
FEC_IEVENT_RFIFO_ERROR.  I threw some printk's into the fec mdio driver

Yes, that sounds familiar.  Most likely, the value of the MDIO bus
control register got clobbered and not reset when the FEC was reset.
Try adding this line to the beginning of mpc52xx_fec_mdio_transfer():

out_be32(&fec->mii_speed, 0x7e);

It's a dirty ugly hack, but it should help.  If that works, then I can
come up with a better solution.  Part of the problem is that the MDIO
handling in the current code really isn't very good.  I've got changes
queued up in -next which cleans it up quite a bit which should make it
easier to fix properly.

g.

That worked!  I'm still getting the fifo receive errors, but at least =
now the fec recovers.

[  127.761365] net eth0: FEC_IEVENT_RFIFO_ERROR=20
[  129.274341] PHY: f0003000:00 - Link is Down
[  130.274266] PHY: f0003000:00 - Link is Up - 100/Full
[  134.955324] net eth0: FEC_IEVENT_RFIFO_ERROR
[  136.273959] PHY: f0003000:00 - Link is Down
[  137.274090] PHY: f0003000:00 - Link is Up - 100/Full
[  140.521462] net eth0: FEC_IEVENT_RFIFO_ERROR
[  142.273955] PHY: f0003000:00 - Link is Down
[  143.273954] PHY: f0003000:00 - Link is Up - 100/Full
[  148.471582] net eth0: FEC_IEVENT_RFIFO_ERROR
[  150.273984] PHY: f0003000:00 - Link is Down
[  151.273901] PHY: f0003000:00 - Link is Up - 100/Full

Thanks Grant.


_________________________________________________________________________=
________________

This e-mail and the information, including any attachments, it contains =
are intended to be a confidential communication only to the person or =
entity to whom it is addressed and may contain information that is =
privileged. If the reader of this message is not the intended recipient, =
you are hereby notified that any dissemination, distribution or copying =
of this communication is strictly prohibited. If you have received this =
communication in error, please immediately notify the sender and destroy =
the original message.

Thank you.

Please consider the environment before printing this email.

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

* Re: mpc5200 fec error
  2009-05-20 17:26                       ` Eric Millbrandt
@ 2009-05-20 17:41                         ` Grant Likely
  0 siblings, 0 replies; 15+ messages in thread
From: Grant Likely @ 2009-05-20 17:41 UTC (permalink / raw)
  To: Eric Millbrandt; +Cc: linuxppc-dev

[ed: quoting repaired]
On Wed, May 20, 2009 at 11:26 AM, Eric Millbrandt
<emillbrandt@dekaresearch.com> wrote:
> Grant Likely wrote:
> > Yes, that sounds familiar. =A0Most likely, the value of the MDIO bus
> > control register got clobbered and not reset when the FEC was reset.
> > Try adding this line to the beginning of mpc52xx_fec_mdio_transfer():
> >
> > out_be32(&fec->mii_speed, 0x7e);
> >
> > It's a dirty ugly hack, but it should help. =A0If that works, then I ca=
n
> > come up with a better solution. =A0Part of the problem is that the MDIO
> > handling in the current code really isn't very good. =A0I've got change=
s
> > queued up in -next which cleans it up quite a bit which should make it
> > easier to fix properly.
>
> That worked! =A0I'm still getting the fifo receive errors, but at least n=
ow the fec recovers.

Okay, I'll see if I can work that into a cleaner patch.  In fact, I
should look into reworking it so that the PHY doesn't get reset on a
FIFO error.  It shouldn't need to be reset at all AFAIKT.  That way
even when FIFO errors occur, they should not cause an expensive
renegotiate time.

g.

--=20
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.

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

* Re: mpc5200 fec error
  2009-05-20 16:49                     ` Grant Likely
  2009-05-20 17:26                       ` Eric Millbrandt
@ 2009-05-20 17:57                       ` Wolfram Sang
  1 sibling, 0 replies; 15+ messages in thread
From: Wolfram Sang @ 2009-05-20 17:57 UTC (permalink / raw)
  To: Grant Likely; +Cc: linuxppc-dev, Eric Millbrandt

[-- Attachment #1: Type: text/plain, Size: 866 bytes --]

> Yes, that sounds familiar.  Most likely, the value of the MDIO bus
> control register got clobbered and not reset when the FEC was reset.

I recall that I wondered about the RFIFO-error case back then. The manual states

===

Receive FIFO Error - indicates error occurred within the RX FIFO. When
RFIFO_ERROR bit is set, ECNTRL.ETHER_EN is cleared, halting FEC frame
processing. When this occurs, software must ensure both the FIFO Controller and
BestComm are soft-reset.

===

It does not say that the whole FEC needs to be reset. (BTW doing a full FEC
reset in IRQ context caused OOPSes back then, have to dig up details, as it
doesn't seem to happen here...)

Regards,

   Wolfram

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

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

end of thread, other threads:[~2009-05-20 17:57 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-18 17:36 mpc5200 fec error Eric Millbrandt
2009-05-19 20:36 ` Robert Schwebel
2009-05-19 20:57   ` Wolfram Sang
2009-05-19 22:21     ` Eric Millbrandt
2009-05-19 23:36       ` Grant Likely
2009-05-20  6:42         ` Wolfram Sang
2009-05-20 13:42           ` Eric Millbrandt
2009-05-20 15:14             ` Jon Smirl
2009-05-20 15:28               ` Eric Millbrandt
2009-05-20 15:29                 ` Jon Smirl
2009-05-20 16:41                   ` Eric Millbrandt
2009-05-20 16:49                     ` Grant Likely
2009-05-20 17:26                       ` Eric Millbrandt
2009-05-20 17:41                         ` Grant Likely
2009-05-20 17:57                       ` Wolfram Sang

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).