From owner-svn-src-user@FreeBSD.ORG  Mon Feb  2 03:36:12 2009
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5CF531065672;
	Mon,  2 Feb 2009 03:36:12 +0000 (UTC) (envelope-from imp@bsdimp.com)
Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85])
	by mx1.freebsd.org (Postfix) with ESMTP id 1CEFC8FC12;
	Mon,  2 Feb 2009 03:36:12 +0000 (UTC) (envelope-from imp@bsdimp.com)
Received: from localhost (localhost [127.0.0.1])
	by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id n123ZnDp098330;
	Sun, 1 Feb 2009 20:35:49 -0700 (MST) (envelope-from imp@bsdimp.com)
Date: Sun, 01 Feb 2009 20:36:18 -0700 (MST)
Message-Id: <20090201.203618.1640016624.imp@bsdimp.com>
To: thompsa@FreeBSD.org
From: "M. Warner Losh" <imp@bsdimp.com>
In-Reply-To: <20090201213749.GJ32503@citylink.fud.org.nz>
References: <200902010650.n116obU1045871@svn.freebsd.org>
	<20090201.142808.886478999.imp@bsdimp.com>
	<20090201213749.GJ32503@citylink.fud.org.nz>
X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Cc: src-committers@FreeBSD.org, svn-src-user@FreeBSD.org
Subject: Re: svn commit: r187978 - user/thompsa/usb/sys/dev/usb2/ethernet
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 02 Feb 2009 03:36:12 -0000

In message: <20090201213749.GJ32503@citylink.fud.org.nz>
            Andrew Thompson <thompsa@FreeBSD.org> writes:
: On Sun, Feb 01, 2009 at 02:28:08PM -0700, M. Warner Losh wrote:
: > In message: <200902010650.n116obU1045871@svn.freebsd.org>
: >             Andrew Thompson <thompsa@FreeBSD.org> writes:
: > : +	locked = mtx_owned(&sc->sc_mtx);
: > : +	if (!locked)
: > : +		AUE_LOCK(sc);
: > 
: > You do know this is racy, right?
: 
: Yea... It only get called unlocked during mii probe+attach so its fine.
: I havnt actaully checked if its ok to hold a mutex during
: mii_phy_probe() which would make this go away.

You hold GIANT when probe+attach, which means I think you can't
acquire any other locks...

Warner