From owner-freebsd-hackers Sun Apr 21 14:11: 2 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by hub.freebsd.org (Postfix) with ESMTP id D532037B400; Sun, 21 Apr 2002 14:10:57 -0700 (PDT) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.2/8.12.2) with ESMTP id g3LLAhHx053375; Sun, 21 Apr 2002 23:10:44 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) To: "Semen A. Ustimenko" Cc: freebsd-hackers@FreeBSD.ORG, Bill Paul Subject: Re: MIIBUS_MEDIAINIT method In-Reply-To: Your message of "Mon, 22 Apr 2002 02:13:12 +0700." <20020422020233.W611-100000@def.the.net> Date: Sun, 21 Apr 2002 23:10:43 +0200 Message-ID: <53374.1019423443@critter.freebsd.dk> From: Poul-Henning Kamp Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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