From owner-freebsd-hackers Mon Aug 3 04:44:07 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id EAA11243 for freebsd-hackers-outgoing; Mon, 3 Aug 1998 04:44:07 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from fgwmail.fujitsu.co.jp (fgwmail.fujitsu.co.jp [164.71.1.133]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id EAA11202 for ; Mon, 3 Aug 1998 04:44:01 -0700 (PDT) (envelope-from seki@sysrap.cs.fujitsu.co.jp) Received: from fdmnews.fujitsu.co.jp by fgwmail.fujitsu.co.jp (8.8.8+2.7Wbeta7/3.6W-MX980716-Fujitsu Gateway) id UAA09923; Mon, 3 Aug 1998 20:43:51 +0900 (JST) Received: from nile.sysrap.cs.fujitsu.co.jp by fdmnews.fujitsu.co.jp (8.8.8+2.7Wbeta7/3.6W-980716-Fujitsu Domain Master) id UAA29465; Mon, 3 Aug 1998 20:43:50 +0900 (JST) Received: from localhost (localhost [127.0.0.1]) by nile.sysrap.cs.fujitsu.co.jp (8.8.8/8.7.3) with ESMTP id UAA06827 for ; Mon, 3 Aug 1998 20:43:49 +0900 (JST) To: freebsd-hackers@FreeBSD.ORG Subject: Issues on if_media X-Mailer: Mew version 1.91 on Emacs 20.2 / Mule 3.0 (MOMIJINOGA) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <19980803204349A.seki@sysrap.cs.fujitsu.co.jp> Date: Mon, 03 Aug 1998 20:43:49 +0900 From: Masahiro Sekiguchi X-Dispatcher: imput version 971024 Lines: 42 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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