From owner-cvs-src@FreeBSD.ORG  Tue Mar 20 21:27:51 2007
Return-Path: <owner-cvs-src@FreeBSD.ORG>
X-Original-To: cvs-src@FreeBSD.org
Delivered-To: cvs-src@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 73DEF16A405;
	Tue, 20 Mar 2007 21:27:51 +0000 (UTC) (envelope-from jdp@polstra.com)
Received: from rock.polstra.com (rock.polstra.com [64.119.0.113])
	by mx1.freebsd.org (Postfix) with ESMTP id 4455F13C4E5;
	Tue, 20 Mar 2007 21:27:51 +0000 (UTC) (envelope-from jdp@polstra.com)
Received: from [10.0.0.64] (adsl-sj-14-253.rockisland.net [64.119.14.253])
	(authenticated bits=0)
	by rock.polstra.com (8.13.8/8.13.8) with ESMTP id l2KLRnGd022391
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Tue, 20 Mar 2007 14:27:50 -0700 (PDT) (envelope-from jdp@polstra.com)
Message-ID: <460051D5.80305@polstra.com>
Date: Tue, 20 Mar 2007 14:27:49 -0700
From: John Polstra <jdp@polstra.com>
User-Agent: Thunderbird 1.5.0.10 (Macintosh/20070221)
MIME-Version: 1.0
To: Jung-uk Kim <jkim@FreeBSD.org>
References: <200703192317.l2JNHd59062213@repoman.freebsd.org>
	<460035F8.3080507@polstra.com>
	<200703201648.09419.jkim@FreeBSD.org>
In-Reply-To: <200703201648.09419.jkim@FreeBSD.org>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by
	milter-greylist-3.0 (rock.polstra.com [64.119.0.113]);
	Tue, 20 Mar 2007 14:27:50 -0700 (PDT)
Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject: Re: cvs commit: src/sys/dev/mii brgphy.c
X-BeenThere: cvs-src@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: CVS commit messages for the src tree <cvs-src.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/cvs-src>,
	<mailto:cvs-src-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/cvs-src>
List-Post: <mailto:cvs-src@freebsd.org>
List-Help: <mailto:cvs-src-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/cvs-src>,
	<mailto:cvs-src-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 20 Mar 2007 21:27:51 -0000

Jung-uk Kim wrote:
> On Tuesday 20 March 2007 03:28 pm, John Polstra wrote:
>> Jung-uk Kim wrote:
>>> jkim        2007-03-19 23:17:39 UTC
>>>
>>>   FreeBSD src repository
>>>
>>>   Modified files:
>>>     sys/dev/mii          brgphy.c
>>>   Log:
>>>   Revert couple of changes from 1.51 and 1.52.  Reading link
>>> status with BMSR is okay for most of the chipsets but BCM5701 PHY
>>> does not seem to like it.
>> I'm not sure what you mean by "does not seem to like it", but did
>> you try reading the BMSR twice?  The link status bit is a latching
>> bit.  If you read the register once and it shows no link status,
>> that only means that at some point since you previously read the
>> register, link was lost.  It says nothing about the current status
>> of link.  The only way to find out the current status of link is to
>> read the register twice. The first read clears the latch, and the
>> second read reports the current status.  This is not specific to
>> the Broadcom chips.  It is standard across all PHYs.
> 
> Believe me, I know that. ;-)  I was experimenting on brgphy.c some 
> time ago and discovered all of my Broadcom PHYs are not 'standard' 
> PHYs (in your definition), i.e., BMSR's link status bit is not 
> latching.

The Broadcom docs I have seen document the bit as latching.  Of course, 
the docs aren't necessarily correct. :-)

John