Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Apr 2002 23:10:43 +0200
From:      Poul-Henning Kamp <phk@critter.freebsd.dk>
To:        "Semen A. Ustimenko" <semenu@FreeBSD.ORG>
Cc:        freebsd-hackers@FreeBSD.ORG, Bill Paul <wpaul@FreeBSD.ORG>
Subject:   Re: MIIBUS_MEDIAINIT method 
Message-ID:  <53374.1019423443@critter.freebsd.dk>
In-Reply-To: Your message of "Mon, 22 Apr 2002 02:13:12 %2B0700." <20020422020233.W611-100000@def.the.net> 

next in thread | previous in thread | raw e-mail | index | archive | help
In message <20020422020233.W611-100000@def.the.net>, "Semen A. Ustimenko" write
s:
>Hi!
>
>I was just thinking about the purpose of this method... What is it?
>
>It used to be used by NIC drivers to add something like AUI beside MII
>provided media, correct?
>
>But it looks like every PHY's driver thinks it must call MEDIAINIT in its
>attach() routine. So, if there would be two PHY on MII (can this happen?),
>then the method will be called twice, and some NIC drivers (tx, xl, dc,
>maybe more) will not behave well.
>
>Isn't it reasonable to stop all PHY drivers from calling MEDIAINIT, and
>call it once per miibus instance in miibus_attach() or miibus_probe()
>instead?

I just had reason to mess around with a PHY GigE related problem
as well, and I can only say that the MII code might have sounded
like a good idea at the time but the implementation sucks as far
as I can tell.

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk@FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.

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?53374.1019423443>