Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 03 Aug 1998 20:43:49 +0900
From:      Masahiro Sekiguchi <seki@sysrap.cs.fujitsu.co.jp>
To:        freebsd-hackers@FreeBSD.ORG
Subject:   Issues on if_media
Message-ID:  <19980803204349A.seki@sysrap.cs.fujitsu.co.jp>

next in thread | raw e-mail | index | archive | help
I'm now working on adding if_media-based media selection into if_fe
driver.  The interface between Ehternet driver and if_media is,
however, unclear for me.  Could someone answer the following please?

(1) Most of the media supported by if_fe compatible cards are
    half-duplex.  Should I set the IFM_HDX bit when I register the
    supported media (with ifmedia_add)?

    My impression from if_media.h was "yes."  However, I found ifconfig
    doesn't work well if I do so.  Moreover, if_fxp, for example, does
    not set the bit for half-duplex media.

    If IFM_HDX should not be set for half-duplex media, for what
    purpose is this macro defined?

(2) What point is the appropriate timing to call ifmedia_add()?

    In the current if_fe design, all hardware/board specific
    differences are detected in fe_probe() routine.  So, I think it is
    best to call ifmedia_add() from fe_probe().  However, all driver
    supporting ifmedia calls it in attach() routines.

    Although I examined the if_media.c and found there is no problem
    calling the function from probe(), I'm not sure it is expected use
    of the interface, or just an accident.

(3) More generally, how I can know the "definition" of the interface
    of if_media?  I'm thinking about both on application interfaces
    (i.e., definition for SIOCGIFMEDIA/SIOCSIFMEDIA ioctl's) and on
    kernel interfaces (i.e., how to use ifmedia_add, ifmedia_set,
    etc.)

(4) The if_fe driver currently supports a board named AT1700FT, which
    supports 10baseFL (10Mbps optic-fiber Ethernet).  What value
    should I use for the Ehternet subtype for the media?

    Note that AT1700FT has two network connectors, one for 10baseFL
    and another for (usual) 10baseT, and it is possible to switch
    between those two with software-control...

    I think this is just a slip from the if_media.h and I should
    send-pr it...  Is it correct?

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19980803204349A.seki>