ifmedia_xx() and mii_xx() ?

Thomas Doerfler Thomas.Doerfler at imd-systems.de
Mon Feb 9 20:21:08 UTC 2004


Hi Kate,

at least for my driver, the chip comes up in a default mode of 
the interface, which works fine in most applications, 
Therefore (and due to the limited time I had for testing), I 
disabled the if_media stuff. 

If your board needs these functions, you should implement 
them. 

By the way: did you check, whether a FreeBSD driver is 
available for the network interface you are using? Maybe it 
would make things MUCH easier to port an existing driver from 
FreeBSD to RTEMS. It took me about 2 days to get the if_exp 
driver working when porting it that way...

wkr,
	Thoams.


> Hi Greg and Thomas,
> 
> gregory.menke at gsfc.nasa.gov wrote:
> 
> > I ended up stripping out all the ifmedia stuff from the 3com driver,
> > which also had a bunch of media functions.
> >
> 
> Thanks for your response.
> Forgive me if I ask innocent question because this is the first
> time I work on an ethernet driver.   I do not have the datasheet
> of your ethernet board.  However, why you strip out the
> ifmedia and mii stuff ?   Is  it because the firmware of your
> board  take care of that ?
> 
> 
> Initially, I thought  I can strip them down as well because I
> thought MII media is a special kind of  connector (e.g. versa
> the 10/100base T connector) .  However, my driver is not
> working.  My datasheet said  "the 10/100 Mbit port could be
> function as an MII or RMI  interface."   Each port provides :
> 1)IEEE 802.3 compliant MAC layer function
> 2) IEEE  802.3u compliant MII interface.
> ........
> 
> I do not know if I am barking on a wrong tree by adding those
> related functions back.
> 
> 
> Thank once again,
> Kate
> 
> 
> > Gregm
> >
> > Thomas Doerfler writes:
> >  > Hi Kate,
> >  >
> >  > all the references to "ifmedia_xx" functions in
> >  > the if_fxp driver are inactive, because they are
> >  > embraced in a "#ifdef NOTUSED ... #endif" pair.
> >  > Maybe this is not the cleanest (and most obvious)
> >  > way to make code inactive, but it keeps most of
> >  > the original code in place. As you might have
> >  > seen, the if_fxp driver was ported rather quick-
> >  > and-dirty from the FreeBSD code base.
> >  >
> >  > wkr,
> >  >      Thomas Doerfler.
> >  >
> >  >
> >  > > Hi all,
> >  > >
> >  > >
> >  > > While porting the  NetBSD files: if_media.c and mii.c
> >  > > for my RTEMS software, I noticed that the
> >  > > rtems-4.6.0pre3/c/src/libchip/network/if_fxp.c file
> >  > > actually calls some of the functions, for example :
> >  > > ifmedia_init(), ifmedia_add(), mii_mediachg(),...
> >  > > ,etc..  Strangely, I could not find the source codes
> >  > > for thoses ifmedia_xx() and mii_xx() functions in
> >  > > the rtems-4.6.0pre3 release.  Please advise.
> >  > >
> >  > >
> >  > > Thanks,
> >  > > Kate
> >  >
> >  > --------------------------------------------
> >  > IMD Ingenieurbuero fuer Microcomputertechnik
> >  > Thomas Doerfler           Herbststrasse 8
> >  > D-82178 Puchheim          Germany
> >  > email:    Thomas.Doerfler at imd-systems.de
> >  > PGP public key available at: http://www.imd-
> >  > systems.de/pgp_keys.htm
> >  >
> >  >
> >  >

--------------------------------------------
IMD Ingenieurbuero fuer Microcomputertechnik
Thomas Doerfler           Herbststrasse 8
D-82178 Puchheim          Germany
email:    Thomas.Doerfler at imd-systems.de
PGP public key available at: http://www.imd-
systems.de/pgp_keys.htm




More information about the users mailing list