Subject: Re: if_pcn enhancement thoughts
To: None <tech-net@netbsd.org>
From: Miles Nordin <carton@Ivy.NET>
List: tech-net
Date: 05/04/2005 21:31:44
--pgp-sign-Multipart_Wed_May__4_21:31:34_2005-1
Content-Type: text/plain; charset=US-ASCII

>>>>> "is" == Ignatios Souvatzis <is@netbsd.org> writes:

    is> more than one external PHY, but still disabling the internal
    is> one if any externals are there, is easy (see below). Should I
    is> go this way, or remove the test completely?

there is an 'instance' architecture that lets you choose which of
multiple PHYs or SERDES or whatever to use.  Maybe use that?  

ezln:~$ ifconfig -m tlp0
tlp0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
        address: 00:00:f8:77:81:68
        media: Ethernet autoselect instance 1 (none)
        supported Ethernet media:
                media 10baseT
                media 10baseT mediaopt full-duplex
                media 10base2
                media 10base5
                media none instance 1
                media 10baseT instance 1
                media 10baseT mediaopt full-duplex instance 1
                media 100baseTX instance 1
                media 100baseTX mediaopt full-duplex instance 1
                media autoselect instance 1

I tried it on the internal NIC of an alpha Miata shown above and
quickly gave up, i forget why, and installed a PCI card, but at least
reading about 'instance' it sounds practical and sane.  I think the
driver writer can make whatever you want the default instance for a
media type, without disabling anything.  Unless the sysadmin goes
hunting around for how to specify 'instance' the card will ``just
work'' and use whatever PHY you thought was best for that media type.

Of course maybe you're saying you'd rather not use instance and
disable everything except the PHY that actually works well---I guess
that's also a reasonable approach, considering that my Miata's NIC,
for whatever reason I don't really care, didn't immediately work for
me.

'instance' is maybe tricky if you decide that 'media auto' needs to
cycle through PHYs using suspicious timeouts and some hand-waving
link-detection dance.  but that's probably a really bad idea when both
ends of a link are set to 'auto'.

--pgp-sign-Multipart_Wed_May__4_21:31:34_2005-1
Content-Type: application/pgp-signature
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (NetBSD)

iQCVAwUAQnl3gInCBbTaW/4dAQIdNwP+Pu4gKT9znxni31HdgjLr3MExDDj0eoRs
eqgxUFqeyGIgZih4GxEJD5yfdLRy/ZCH9MF+ZFwCXnqXROUZC8KoWAUZ3iqdXOsI
i/F8BBu8kTn8BswDaO7tOcAfUX6HrbyjTc2FnBqBd3SC5qlzUUXruT5DePMH2iyG
ZTQdKzb1Znc=
=mJwW
-----END PGP SIGNATURE-----

--pgp-sign-Multipart_Wed_May__4_21:31:34_2005-1--