LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [patch 1/1] ppc: Possible bug fix for FCC driver
@ 2007-03-05 10:12 Cedric Pontois
  2007-03-06  2:23 ` Li Yang-r58472
  0 siblings, 1 reply; 5+ messages in thread
From: Cedric Pontois @ 2007-03-05 10:12 UTC (permalink / raw)
  To: dmalek, leoli; +Cc: linux-kernel

From: Cedric Pontois <cpontois@nortel.com>

We use a kernel 2.6.14 on PPC platform (MPC 8555). The FCC driver works
well with a 100Mbps link. But it doesn't with a 10Mbps link. To solve
it, I modified the GFMR register init: removed TCI bit and set CRC32 bit
instead of. 

       Developer's Certificate of Origin 1.1

        By making a contribution to this project, I certify that:

        (a) The contribution was created in whole or in part by me and I
            have the right to submit it under the open source license
            indicated in the file; or

        (b) The contribution is based upon previous work that, to the
best
            of my knowledge, is covered under an appropriate open source
            license and I have the right under that license to submit
that
            work with modifications, whether created in whole or in part
            by me, under the same open source license (unless I am
            permitted to submit under a different license), as indicated
            in the file; or

        (c) The contribution was provided directly to me by some other
            person who certified (a), (b) or (c) and I have not modified
            it.

	(d) I understand and agree that this project and the
contribution
	    are public and that a record of the contribution (including
all
	    personal information I submit with it, including my
sign-off) is
	    maintained indefinitely and may be redistributed consistent
with
	    this project or the open source license(s) involved.

	Signed-off-by: Cedric Pontois <cpontois@nortel.com>

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

diff -ruN pa-original/arch/ppc/8260_io/fcc_enet.c
pa-patched/arch/ppc/8260_io/fcc_enet.c
--- pa-original/arch/ppc/8260_io/fcc_enet.c	2007-03-02
14:57:07.000197000 +0100
+++ pa-patched/arch/ppc/8260_io/fcc_enet.c	2007-03-02
14:57:08.000038000 +0100
@@ -2232,7 +2232,7 @@
 
 	/* Set GFMR to enable Ethernet operating mode.
 	 */
-	fccp->fcc_gfmr = (FCC_GFMR_TCI | FCC_GFMR_MODE_ENET);
+	fccp->fcc_gfmr = (FCC_GFMR_TCRC_32 | FCC_GFMR_MODE_ENET);
 
 	/* Set sync/delimiters.
 	*/

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

"The author works for the Alcatel-Lucent group, who is solely
responsible for this email and its contents. All enquiries regarding
this email should be addressed to Alcatel-Lucent. Nortel has provided
the use of the nortel.com domain to Alcatel-Lucent in connection with
this email solely for the purpose of connectivity and Nortel has no
liability for the email or its contents.  Alcatel Lucent's web site is
http://www.alcatel-lucent.com"


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

* RE: [patch 1/1] ppc: Possible bug fix for FCC driver
  2007-03-05 10:12 [patch 1/1] ppc: Possible bug fix for FCC driver Cedric Pontois
@ 2007-03-06  2:23 ` Li Yang-r58472
  2007-03-06  9:42   ` Vitaly Bordug
  0 siblings, 1 reply; 5+ messages in thread
From: Li Yang-r58472 @ 2007-03-06  2:23 UTC (permalink / raw)
  To: Cedric Pontois, dmalek; +Cc: linux-kernel, linuxppc-embedded

Hi Cedric,

For ppc embedded related patches, please also cc:
linuxppc-embedded@ozlabs.org.

> We use a kernel 2.6.14 on PPC platform (MPC 8555). The FCC driver
works

To submit a kernel patch upstream, the patch should be against the
latest kernel version which is 2.6.21-rc now.
> well with a 100Mbps link. But it doesn't with a 10Mbps link. To solve
> it, I modified the GFMR register init: removed TCI bit and set CRC32
bit
> instead of.

I don't know how these bits caused the 10M link issue.  Do you have any
reasoning?

> 	Signed-off-by: Cedric Pontois <cpontois@nortel.com>
> 
>
------------------------------------------------------------------------
> -----
> 
> diff -ruN pa-original/arch/ppc/8260_io/fcc_enet.c
> pa-patched/arch/ppc/8260_io/fcc_enet.c
> --- pa-original/arch/ppc/8260_io/fcc_enet.c	2007-03-02
> 14:57:07.000197000 +0100
> +++ pa-patched/arch/ppc/8260_io/fcc_enet.c	2007-03-02
> 14:57:08.000038000 +0100
> @@ -2232,7 +2232,7 @@
> 
>  	/* Set GFMR to enable Ethernet operating mode.
>  	 */
> -	fccp->fcc_gfmr = (FCC_GFMR_TCI | FCC_GFMR_MODE_ENET);
> +	fccp->fcc_gfmr = (FCC_GFMR_TCRC_32 | FCC_GFMR_MODE_ENET);
> 
>  	/* Set sync/delimiters.
>  	*/
> 


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

* Re: [patch 1/1] ppc: Possible bug fix for FCC driver
  2007-03-06  2:23 ` Li Yang-r58472
@ 2007-03-06  9:42   ` Vitaly Bordug
  2007-03-06 11:03     ` Cedric Pontois
  0 siblings, 1 reply; 5+ messages in thread
From: Vitaly Bordug @ 2007-03-06  9:42 UTC (permalink / raw)
  To: Li Yang-r58472; +Cc: Cedric Pontois, dmalek, linux-kernel, linuxppc-embedded

On Tue, 6 Mar 2007 10:23:43 +0800
Li Yang-r58472 wrote:

> Hi Cedric,
> 
> For ppc embedded related patches, please also cc:
> linuxppc-embedded@ozlabs.org.
> 
> > We use a kernel 2.6.14 on PPC platform (MPC 8555). The FCC driver
> works
> 
> To submit a kernel patch upstream, the patch should be against the
> latest kernel version which is 2.6.21-rc now.
> > well with a 100Mbps link. But it doesn't with a 10Mbps link. To
> > solve it, I modified the GFMR register init: removed TCI bit and
> > set CRC32
> bit
> > instead of.
> 
> I don't know how these bits caused the 10M link issue.  Do you have
> any reasoning?
> 
> > 	Signed-off-by: Cedric Pontois <cpontois@nortel.com>
> > 
> >
> ------------------------------------------------------------------------
> > -----
> > 
> > diff -ruN pa-original/arch/ppc/8260_io/fcc_enet.c
The fcc code in 8260_io has been obsoleted by fs_enet driver (drivers/net/fs_enet).
It is known to work with 85xx at least in recent kernels. If it does not for some reason,
please letus know.

Thanks,

-Vitaly

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

* RE: [patch 1/1] ppc: Possible bug fix for FCC driver
  2007-03-06  9:42   ` Vitaly Bordug
@ 2007-03-06 11:03     ` Cedric Pontois
  2007-03-06 21:45       ` Vitaly Bordug
  0 siblings, 1 reply; 5+ messages in thread
From: Cedric Pontois @ 2007-03-06 11:03 UTC (permalink / raw)
  To: Vitaly Bordug, Li Yang-r58472
  Cc: dmalek, linux-kernel, linuxppc-embedded, Rachid Koucha

Hi Vitaly,

The problem seems to be similar in recent kernels
(/drivers/net/fs_enet/mac-fcc.c). The transmit clock is inverted (TCI
bit set). The packets are well received, transmitted packets go out (tx
counter is ok), unfortunately as the clock is inverted (TCI) the data
are not correctly received by the other side. The FCC works in 100Mbps
(luck?) but doesn't in 10Mbps. I solved this problem by removing the TCI
bit set as described in the patch. Actually, this problem depends also
of the Ethernet phy used on board.

Cedric

-----Original Message-----
From: Vitaly Bordug [mailto:vbordug@ru.mvista.com] 
Sent: mardi 6 mars 2007 10:42
To: Li Yang-r58472
Cc: Pontois, Cedric UMTS (CEZ:8Z10); dmalek@jlc.net;
linux-kernel@vger.kernel.org; linuxppc-embedded@ozlabs.org
Subject: Re: [patch 1/1] ppc: Possible bug fix for FCC driver


On Tue, 6 Mar 2007 10:23:43 +0800
Li Yang-r58472 wrote:

> Hi Cedric,
> 
> For ppc embedded related patches, please also cc: 
> linuxppc-embedded@ozlabs.org.
> 
> > We use a kernel 2.6.14 on PPC platform (MPC 8555). The FCC driver
> works
> 
> To submit a kernel patch upstream, the patch should be against the 
> latest kernel version which is 2.6.21-rc now.
> > well with a 100Mbps link. But it doesn't with a 10Mbps link. To 
> > solve it, I modified the GFMR register init: removed TCI bit and set

> > CRC32
> bit
> > instead of.
> 
> I don't know how these bits caused the 10M link issue.  Do you have 
> any reasoning?
> 
> > 	Signed-off-by: Cedric Pontois <cpontois@nortel.com>
> > 
> >
> ----------------------------------------------------------------------
> --
> > -----
> > 
> > diff -ruN pa-original/arch/ppc/8260_io/fcc_enet.c
The fcc code in 8260_io has been obsoleted by fs_enet driver
(drivers/net/fs_enet). It is known to work with 85xx at least in recent
kernels. If it does not for some reason, please letus know.

Thanks,

-Vitaly

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

* Re: [patch 1/1] ppc: Possible bug fix for FCC driver
  2007-03-06 11:03     ` Cedric Pontois
@ 2007-03-06 21:45       ` Vitaly Bordug
  0 siblings, 0 replies; 5+ messages in thread
From: Vitaly Bordug @ 2007-03-06 21:45 UTC (permalink / raw)
  To: Cedric Pontois
  Cc: Li Yang-r58472, dmalek, linux-kernel, linuxppc-embedded, Rachid Koucha

On Tue, 6 Mar 2007 12:03:57 +0100
Cedric Pontois wrote:

> Hi Vitaly,
> 
> The problem seems to be similar in recent kernels
> (/drivers/net/fs_enet/mac-fcc.c). The transmit clock is inverted (TCI
> bit set). The packets are well received, transmitted packets go out
> (tx counter is ok), unfortunately as the clock is inverted (TCI) the
> data are not correctly received by the other side. The FCC works in
> 100Mbps (luck?) but doesn't in 10Mbps. I solved this problem by
> removing the TCI bit set as described in the patch. Actually, this
> problem depends also of the Ethernet phy used on board.
> 
IIRC it worked for us with Davicom PHY on 10 MBps on one of 8260-like...
 
Well I give it a try once more with the recent kernel, but anyway if you think 
you've located and fixed root cause, do (and test) a patch against recent kernel,
send it to me cc'ing netdev and linuxppc-embedded, and I'll push it along
if it is not breaking existing boards.

-Vitaly

> Cedric
> 
> -----Original Message-----
> From: Vitaly Bordug [mailto:vbordug@ru.mvista.com] 
> Sent: mardi 6 mars 2007 10:42
> To: Li Yang-r58472
> Cc: Pontois, Cedric UMTS (CEZ:8Z10); dmalek@jlc.net;
> linux-kernel@vger.kernel.org; linuxppc-embedded@ozlabs.org
> Subject: Re: [patch 1/1] ppc: Possible bug fix for FCC driver
> 
> 
> On Tue, 6 Mar 2007 10:23:43 +0800
> Li Yang-r58472 wrote:
> 
> > Hi Cedric,
> > 
> > For ppc embedded related patches, please also cc: 
> > linuxppc-embedded@ozlabs.org.
> > 
> > > We use a kernel 2.6.14 on PPC platform (MPC 8555). The FCC driver
> > works
> > 
> > To submit a kernel patch upstream, the patch should be against the 
> > latest kernel version which is 2.6.21-rc now.
> > > well with a 100Mbps link. But it doesn't with a 10Mbps link. To 
> > > solve it, I modified the GFMR register init: removed TCI bit and
> > > set
> 
> > > CRC32
> > bit
> > > instead of.
> > 
> > I don't know how these bits caused the 10M link issue.  Do you have 
> > any reasoning?
> > 
> > > 	Signed-off-by: Cedric Pontois <cpontois@nortel.com>
> > > 
> > >
> > ----------------------------------------------------------------------
> > --
> > > -----
> > > 
> > > diff -ruN pa-original/arch/ppc/8260_io/fcc_enet.c
> The fcc code in 8260_io has been obsoleted by fs_enet driver
> (drivers/net/fs_enet). It is known to work with 85xx at least in
> recent kernels. If it does not for some reason, please letus know.
> 
> Thanks,
> 
> -Vitaly

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

end of thread, other threads:[~2007-03-06 21:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-05 10:12 [patch 1/1] ppc: Possible bug fix for FCC driver Cedric Pontois
2007-03-06  2:23 ` Li Yang-r58472
2007-03-06  9:42   ` Vitaly Bordug
2007-03-06 11:03     ` Cedric Pontois
2007-03-06 21:45       ` Vitaly Bordug

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