[ECOS] Settign ethernet speed and duplex

Nick Garnett nickg@ecoscentric.com
Fri Sep 15 09:18:00 GMT 2006


"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



More information about the Ecos-discuss mailing list