From owner-freebsd-sparc64@FreeBSD.ORG Thu Aug 4 18:16:57 2005 Return-Path: X-Original-To: sparc64@freebsd.org Delivered-To: freebsd-sparc64@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EB74616A41F for ; Thu, 4 Aug 2005 18:16:57 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from mv.twc.weather.com (mv.twc.weather.com [65.212.71.225]) by mx1.FreeBSD.org (Postfix) with ESMTP id 39DEA43D48 for ; Thu, 4 Aug 2005 18:16:57 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from [10.50.40.201] (Not Verified[65.202.103.25]) by mv.twc.weather.com with NetIQ MailMarshal (v6, 0, 3, 8) id ; Thu, 04 Aug 2005 14:31:36 -0400 From: John Baldwin To: Marius Strobl Date: Thu, 4 Aug 2005 14:17:22 -0400 User-Agent: KMail/1.8 References: <200508041253.18343.jhb@FreeBSD.org> <20050804200505.A67677@newtrinity.zeist.de> In-Reply-To: <20050804200505.A67677@newtrinity.zeist.de> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200508041417.23972.jhb@FreeBSD.org> Cc: sparc64@freebsd.org Subject: Re: Patch to fix locking nits in hme X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Aug 2005 18:16:58 -0000 On Thursday 04 August 2005 02:05 pm, Marius Strobl wrote: > On Thu, Aug 04, 2005 at 12:53:17PM -0400, John Baldwin wrote: > > I have a patch to fix several nits in the hme(4) driver's locking > > including: > > > > - Using the driver lock instead of Giant in a busdma callback. > > - Using callout_drain() in detach. > > - Locking access to the mii registers with the driver lock. > > - Clearing the RUNNING and OACTIVE flags in stop. > > - Re-enabling updating the media from hme_init_locked(). > > - Making the mutex non-recursive. > > - Fixing locking in ioctl. > > > > Patch is at http://www.freebsd.org/~jhb/patches/hme_locking.patch > > @@ -871,11 +859,7 @@ > #endif > > /* Set the current media. */ > - /* > - * HME_UNLOCK(sc); > - * mii_mediachg(sc->sc_mii); > - * HME_LOCK(sc); > - */ > + mii_mediachg(sc->sc_mii); > > Calling mii_mediachg() will trigger some unsolved problems with > the MIF configuration (most likely) which used to cause dhclient(8) > not working on Ultra 2 and result in no link at all on Netra T1. Ok. I had assumed it was commented out due to locking problems rather than that. I can comment it back out. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org