Subject: Re: hme+nsphy and autonegotiation problem
To: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
From: Jason R Thorpe <thorpej@wasabisystems.com>
List: port-sparc64
Date: 01/18/2002 12:02:43
On Sat, Jan 19, 2002 at 04:52:36AM +0900, Izumi Tsutsui wrote:

 > PCI hme and nsphy on my Ultra5 sometimes fails autonegotiation
 > between switching hub during boot. The attached patch from OpenBSD
 > seems to fix the problem, but does anyone else see the similar problem
 > on U5 and PCI hme?

Uh.  This seems totally bogus.  The ANAR is set to the capabilities
from the BMSR in mii_phy_auto().

I guess the real problem is that the MII code only sets "autonegotiate" if
BMCR_AUTOEN is not already set.  Perhaps it should also check to see if
the current ANAR is different from the ANAR that would be sent if we re-
started autonegotiation?

In any case, "fixing" this in the PHY reset routine when the PHY itself
has no bugs to work-around is totally inappropriate.

 > OpenBSD's log message said:
 > http://www.openbsd.org/cgi-bin/cvsweb/src/sys/dev/mii/nsphy.c
 > Revision 1.3:
 >  :
 > o hme doesn't advertise everything it supports, so
 >   during reset, set the ANAR according to the supported media in BMSR.

-- 
        -- Jason R. Thorpe <thorpej@wasabisystems.com>