public inbox for ecos-devel@sourceware.org
 help / color / mirror / Atom feed
* PowerPC Ethernet issue
@ 2009-06-05 15:32 Robert Morse
  2009-06-06 15:30 ` Edgar Grimberg
  0 siblings, 1 reply; 4+ messages in thread
From: Robert Morse @ 2009-06-05 15:32 UTC (permalink / raw)
  To: ecos-devel

Hi all,

	We are working on a PowerPC ppc405 (AMCC 405ep) based board.  We are
using the following drivers from ECOS v2.

A slight change to the hal/powerpc/.. directory to support our devices.
A change to devs/eth/powerpc/ppc405 directory to support dual ethernet.
Then a new devs/eth/phy to support the national DP8348C part.

	Looking at the data sheet for the 405EP processor, the MAC has a bit
that tells the ethernet channel if it is FULL or HALF duplex mode.  And
on initialization or any time a Ethernet Reset is required we do set it
to the correct Duplex.  My current issue is what happens if someone
unplugs changes the duplex and plugs back in.  I see nothing that will
update the duplex.  

	Looking at the situation, it seems like I would need to
enable/configure the interrupts for the PHYs.  and when a change of
duplex is detected cause a reset of the MAC.  Has anyone done anything
like this before.  Looking through the ethernet drivers and phy drivers
I do not see anyone doing this (I admit not all).

	Does my idea seem sound, or am I off in the woods somewhere.  I know
about this duplex issue from another design.  Where we had a commercial
rtos, that I found out they did not do this and caused a lot of issues,
I thought the device driver should of handled it, but they said it was
up to the application to control the bit.  So I do want to repeat the
same issue.

Thanks
    Robert





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

* Re: PowerPC Ethernet issue
  2009-06-05 15:32 PowerPC Ethernet issue Robert Morse
@ 2009-06-06 15:30 ` Edgar Grimberg
  2009-06-08 10:56   ` Robert Morse
  0 siblings, 1 reply; 4+ messages in thread
From: Edgar Grimberg @ 2009-06-06 15:30 UTC (permalink / raw)
  To: Robert Morse; +Cc: ecos-devel

Hi,

>
>        Looking at the situation, it seems like I would need to
> enable/configure the interrupts for the PHYs.  and when a change of
> duplex is detected cause a reset of the MAC.  Has anyone done anything
> like this before.  Looking through the ethernet drivers and phy drivers
> I do not see anyone doing this (I admit not all).
>

This looks like the only place to detect if the connection parameters
have changed (link, duplex, speed).

>        Does my idea seem sound, or am I off in the woods somewhere.  I know
> about this duplex issue from another design.  Where we had a commercial
> rtos, that I found out they did not do this and caused a lot of issues,
> I thought the device driver should of handled it, but they said it was
> up to the application to control the bit.  So I do want to repeat the
> same issue.

I have some code so show that, but it might not fit your device. The
idea is to stop and start the ethernet device in the PHY's DSR. In the
start function, if the ethernet is not already started, you can
renegotiate the connection parameters.
The code is at:

http://www.ecosforge.net/ecosforge/trunk/ecos_mpc8313/packages/devs/eth/powerpc/quicc2pro/current/src/tsec.c

search for:

tsec_eth_start
phy_dsr
phyAutoNegociate

Best regards,
Edgar

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

* Re: PowerPC Ethernet issue
  2009-06-06 15:30 ` Edgar Grimberg
@ 2009-06-08 10:56   ` Robert Morse
  2009-06-08 11:21     ` Edgar Grimberg
  0 siblings, 1 reply; 4+ messages in thread
From: Robert Morse @ 2009-06-08 10:56 UTC (permalink / raw)
  To: Edgar Grimberg; +Cc: ecos-devel

Thanks,
	That is what I thought I needed to do.

Robert
On Sat, 2009-06-06 at 17:30 +0200, Edgar Grimberg wrote:
> Hi,
> 
> >
> >        Looking at the situation, it seems like I would need to
> > enable/configure the interrupts for the PHYs.  and when a change of
> > duplex is detected cause a reset of the MAC.  Has anyone done anything
> > like this before.  Looking through the ethernet drivers and phy drivers
> > I do not see anyone doing this (I admit not all).
> >
> 
> This looks like the only place to detect if the connection parameters
> have changed (link, duplex, speed).
> 
> >        Does my idea seem sound, or am I off in the woods somewhere.  I know
> > about this duplex issue from another design.  Where we had a commercial
> > rtos, that I found out they did not do this and caused a lot of issues,
> > I thought the device driver should of handled it, but they said it was
> > up to the application to control the bit.  So I do want to repeat the
> > same issue.
> 
> I have some code so show that, but it might not fit your device. The
> idea is to stop and start the ethernet device in the PHY's DSR. In the
> start function, if the ethernet is not already started, you can
> renegotiate the connection parameters.
> The code is at:
> 
> http://www.ecosforge.net/ecosforge/trunk/ecos_mpc8313/packages/devs/eth/powerpc/quicc2pro/current/src/tsec.c
> 
> search for:
> 
> tsec_eth_start
> phy_dsr
> phyAutoNegociate
> 
> Best regards,
> Edgar

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

* Re: PowerPC Ethernet issue
  2009-06-08 10:56   ` Robert Morse
@ 2009-06-08 11:21     ` Edgar Grimberg
  0 siblings, 0 replies; 4+ messages in thread
From: Edgar Grimberg @ 2009-06-08 11:21 UTC (permalink / raw)
  To: Robert Morse; +Cc: ecos-devel

On Mon, Jun 8, 2009 at 12:52 PM, Robert Morse<rmorse@weldtechcorp.com> wrote:
> Thanks,
>        That is what I thought I needed to do.

On thing to be careful about:  tsec_eth_start (starting the ethernet
device) can and will be called many times, even if the device is
already started. You will want to auto-negotiate only if needed (the
device is stopped).

Regards,
Edgar

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

end of thread, other threads:[~2009-06-08 11:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-05 15:32 PowerPC Ethernet issue Robert Morse
2009-06-06 15:30 ` Edgar Grimberg
2009-06-08 10:56   ` Robert Morse
2009-06-08 11:21     ` Edgar Grimberg

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 read-only IMAP folder(s) and NNTP newsgroup(s).