Subject: kern/18762: MII PHY numbers do not map 1:1 to ifconfig(8) instance numbers
To: None <gnats-bugs@gnats.netbsd.org>
From: Erik E. Fair <fair@digital.clock.org>
List: netbsd-bugs
Date: 10/22/2002 00:06:27
>Number: 18762
>Category: kern
>Synopsis: MII PHY numbers do not map 1:1 to ifconfig(8) instance numbers
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Oct 22 00:07:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Erik E. Fair
>Release: NetBSD 1.6
>Organization:
International Organization of Internet Clock Watchers
>Environment:
>Description:
On an Ethernet's Media Independent Interface (MII) bus,
there can be up to 32 different physical interfaces (e.g.
10base-2, 10base-T, 100base-T, AUI, fiber, etc.). The PHYs
on MII are addressed using their number, and this number
is reported at autconfiguration attachment time during
system boot.
Unfortunately, NetBSD also assigns each attached PHY an
"instance" number in the order they're found, counting from
zero. This number is not reported, but can be inferred from
the kernel output during autoconfiguration. This number is
what ifconfig(8) requires as an argument if one wishes to
select a PHY explicitly, rather than by descriptive type
(e.g. 10base-T).
I think that instance numbers and PHY numbers should be
the same thing, i.e. they should map 1:1. This would simplify
our user interface for the (admittedly uncommon) multiple
PHY case, particularly when the PHYs on the MII do not
number themselves from zero. See PR 18590 for an example
of a system with such a configuration.
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: