* Lite5200 full duplex support
@ 2005-02-15 23:48 Grant Likely
2005-02-16 20:46 ` Sylvain Munaut
0 siblings, 1 reply; 5+ messages in thread
From: Grant Likely @ 2005-02-15 23:48 UTC (permalink / raw)
To: Sylvain Munaut, linuxppc-embedded
I'm using Sylvain's http://bkbits.246tnt.com:14690/linux-2.5-mpc52xx
bk tree on a lite5200 evb. I noticed that the FEC driver is hard
coded to only support half duplex 10/100 auto-negotiation. Is that
intentional? Are there any known problems with running full duplex?
I modified the code to allow full duplex and I haven't observed any
problems yet. (w/ nfsroot and compiling apps on the target natively)
Cheers,
g.
BTW, here's what I changed:
drivers/net/fec_mpc52xx/fec_phy.c line 294 (phy_info_lxt971)
from:
{ mk_mii_write(MII_REG_ANAR, 0x0A1), NULL }, /* 10/100, HD */
to:
{ mk_mii_write(MII_REG_ANAR, 0x1E1), NULL }, /* 10/100, HD */
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: Lite5200 full duplex support 2005-02-15 23:48 Lite5200 full duplex support Grant Likely @ 2005-02-16 20:46 ` Sylvain Munaut [not found] ` <528646bc05021714135dcb1d01@mail.gmail.com> 0 siblings, 1 reply; 5+ messages in thread From: Sylvain Munaut @ 2005-02-16 20:46 UTC (permalink / raw) To: Grant Likely; +Cc: linuxppc-embedded Grant Likely wrote: >I'm using Sylvain's http://bkbits.246tnt.com:14690/linux-2.5-mpc52xx >bk tree on a lite5200 evb. I noticed that the FEC driver is hard >coded to only support half duplex 10/100 auto-negotiation. Is that >intentional? Are there any known problems with running full duplex? > >I modified the code to allow full duplex and I haven't observed any >problems yet. (w/ nfsroot and compiling apps on the target natively) > >Cheers, >g. > >BTW, here's what I changed: >drivers/net/fec_mpc52xx/fec_phy.c line 294 (phy_info_lxt971) >from: > { mk_mii_write(MII_REG_ANAR, 0x0A1), NULL }, /* 10/100, HD */ >to: > { mk_mii_write(MII_REG_ANAR, 0x1E1), NULL }, /* 10/100, HD */ > > > I'm not sure actually. I also wondered and forgot to ask the author. I guess I always tought there was a problem with it without checking. Good to know it's working. Thanks Sylvain ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <528646bc05021714135dcb1d01@mail.gmail.com>]
* Re: Lite5200 full duplex support [not found] ` <528646bc05021714135dcb1d01@mail.gmail.com> @ 2005-02-17 22:35 ` Grant Likely 2005-02-18 17:20 ` Dale Farnsworth 0 siblings, 1 reply; 5+ messages in thread From: Grant Likely @ 2005-02-17 22:35 UTC (permalink / raw) To: Sylvain Munaut, linuxppc-embedded On Thu, 17 Feb 2005 15:13:33 -0700, Grant Likely <glikely@gmail.com> wrote: > On Wed, 16 Feb 2005 21:46:09 +0100, Sylvain Munaut <tnt@246tnt.com> wrote: > > Grant Likely wrote: > > > > >BTW, here's what I changed: > > >drivers/net/fec_mpc52xx/fec_phy.c line 294 (phy_info_lxt971) > > >from: > > > { mk_mii_write(MII_REG_ANAR, 0x0A1), NULL }, /* 10/100, HD */ > > >to: > > > { mk_mii_write(MII_REG_ANAR, 0x1E1), NULL }, /* 10/100, HD */ > > > > > > > > > > > I'm not sure actually. I also wondered and forgot to ask the author. I guess > > I always tought there was a problem with it without checking. > > > I've played around with it a bit more and I have discovered one > problem. When in full duplex the carrier detect seems to bounce up > and down for every frame received off the wire. I've beaten the tar > out of it with netperf and it doesn't seem to be causeing any > instability (yet)... Still investigating. > Update: The error seems to be carrier sense loss during transmit. The FEC documentation states that carrier loss errors are counted, but the frame is not retransmitted and no interrupt is generated. The driver copies the value directly out of the counter register when reporting status. I do not know yet if it affects received frames... Cheers, g. > Cheers, > g. > ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Lite5200 full duplex support 2005-02-17 22:35 ` Grant Likely @ 2005-02-18 17:20 ` Dale Farnsworth 2005-02-18 19:28 ` cpclark 0 siblings, 1 reply; 5+ messages in thread From: Dale Farnsworth @ 2005-02-18 17:20 UTC (permalink / raw) To: Grant Likely, linuxppc-embedded On Thu, Feb 17, 2005 at 10:35:14PM +0000, Grant Likely wrote: > On Thu, 17 Feb 2005 15:13:33 -0700, Grant Likely <glikely@gmail.com> wrote: > > On Wed, 16 Feb 2005 21:46:09 +0100, Sylvain Munaut <tnt@246tnt.com> wrote: > > > Grant Likely wrote: > > > > > > >BTW, here's what I changed: > > > >drivers/net/fec_mpc52xx/fec_phy.c line 294 (phy_info_lxt971) > > > >from: > > > > { mk_mii_write(MII_REG_ANAR, 0x0A1), NULL }, /* 10/100, HD */ > > > >to: > > > > { mk_mii_write(MII_REG_ANAR, 0x1E1), NULL }, /* 10/100, HD */ > > > > > > > > > > > > > > > I'm not sure actually. I also wondered and forgot to ask the author. I guess > > > I always tought there was a problem with it without checking. > > > > > I've played around with it a bit more and I have discovered one > > problem. When in full duplex the carrier detect seems to bounce up > > and down for every frame received off the wire. I've beaten the tar > > out of it with netperf and it doesn't seem to be causeing any > > instability (yet)... Still investigating. > > > Update: The error seems to be carrier sense loss during transmit. The > FEC documentation states that carrier loss errors are counted, but the > frame is not retransmitted and no interrupt is generated. The driver > copies the value directly out of the counter register when reporting > status. > > I do not know yet if it affects received frames... I've used the Lite5200 ethernet in either full-duplex mode or half-duplex mode. However, the change quoted above is insufficient. You also need to change the call to fec_restart in fec.c to be something like: fec_restart(dev, 1); /* always use full duplex mode only */ There is currently no mechanism for the driver to detect if the PHY negotiated full or half duplex. There is no PHY interrupt and no routine has been coded to poll for PHY status. Therefore, the lite5200 can't automatically work with either full or half duplex. You have to select one or the other. I selected half duplex as the least common denominator. -Dale Farnsworth ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Lite5200 full duplex support 2005-02-18 17:20 ` Dale Farnsworth @ 2005-02-18 19:28 ` cpclark 0 siblings, 0 replies; 5+ messages in thread From: cpclark @ 2005-02-18 19:28 UTC (permalink / raw) To: Grant Likely; +Cc: linuxppc-embedded On Fri, 18 Feb 2005, Dale Farnsworth wrote: > There is currently no mechanism for the driver to detect if the PHY > negotiated full or half duplex. You may want to take a look at arch/ppc/5xxx_io/fec.[ch] in the denx.de linuxppc_2_4_devel CVS tree (particularly cvs revisions 1.4 and 1.10 of fec.c and revisions 1.5 and 1.6 of fec.h). Chris ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2005-02-18 21:55 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-15 23:48 Lite5200 full duplex support Grant Likely
2005-02-16 20:46 ` Sylvain Munaut
[not found] ` <528646bc05021714135dcb1d01@mail.gmail.com>
2005-02-17 22:35 ` Grant Likely
2005-02-18 17:20 ` Dale Farnsworth
2005-02-18 19:28 ` cpclark
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).