This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Settign ethernet speed and duplex


Laurie Gellatly wrote:
Nick,
You've never seen auto negotiation fail then like I have.
If auto negotiation works the way its suppose to then I agree, you're better
off leaving it like that.
Reality unfortunatly does not always follow the best laid plans of mice and
men.

Regardless of what you and I might think the customer would still like to
set speed and duplex manually so....
Back to the original question, how should this be provided for?

Thanks for your comments. ...Laurie:{)

Since this needs to be done in the ethernet driver, add some options for it in the CDL there. If you use the PHY package as well, there are functions you can call to manage this. At least that's what the design was for, but as Nick said, it's seldom [if ever] been necessary to force a PHY into a mode that it can't auto-negotiate into.



-----Original Message-----
From: ecos-discuss-owner@ecos.sourceware.org
[mailto:ecos-discuss-owner@ecos.sourceware.org]On Behalf Of Nick Garnett
Sent: Friday, 15 September 2006 7:19 PM
To: laurie.gellatly@netic.com
Cc: ecos-discuss@ecos.sourceware.org
Subject: Re: [ECOS] Settign ethernet speed and duplex


"Laurie Gellatly" <laurie.gellatly@netic.com> writes:


Hi All,
I'm writing a new ethernet chip driver.
The chip (with built in PHY) support setting of speed (10/100) and duplex.
That's pretty easy to do in the driver but I'm lost in how it should be
connected to the application code.
I thought it might be an ioctl key but can't find anything to help me.

So, my question is, what is the 'right way' for this to be implemented and
are there examples I can follow?

Generally applications don't get involved with this. The PHYs at each end of the the wire negotiate the best speed and duplicity at initialization and that's where it stays. Sometimes it is necessary to prod the PHY to make it negotiate, but most just do it automatically. Sometimes it is also necessary to query the PHY for the settings and transfer them to the MAC. For a combined MAC+PHY I would expect all of this to happen automatically.

I'm not sure why an application would need to change these
settings. You cannot change the duplex setting, since that depends on
the nature of the far end. If the PHYs have negotiated 10MB/s then
trying to raise it to 100MB/s will not work and I don't see any
advantage in reducing it from 100 to 10.


-- Nick Garnett eCos Kernel Architect http://www.ecoscentric.com The eCos and RedBoot experts


-- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss




--
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]