From owner-freebsd-mips@FreeBSD.ORG Thu Nov 19 20:30:49 2009 Return-Path: Delivered-To: mips@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B2E0D1065701 for ; Thu, 19 Nov 2009 20:30:49 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 8578C8FC17 for ; Thu, 19 Nov 2009 20:30:49 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 38A5446B53 for ; Thu, 19 Nov 2009 15:30:49 -0500 (EST) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 75E3B8A021 for ; Thu, 19 Nov 2009 15:30:48 -0500 (EST) From: John Baldwin To: mips@FreeBSD.org Date: Thu, 19 Nov 2009 15:30:39 -0500 User-Agent: KMail/1.9.7 References: <200911061508.22482.jhb@freebsd.org> In-Reply-To: <200911061508.22482.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200911191530.39924.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Thu, 19 Nov 2009 15:30:48 -0500 (EST) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: Subject: Re: [PATCH] Remove if_watchdog use X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Nov 2009 20:30:49 -0000 On Friday 06 November 2009 3:08:22 pm John Baldwin wrote: > I have a patchset that converts all the remaining users of if_watchdog to > using a private callout instead. In some cases the the driver already used a > private timer to drive a stats timer and I merely hooked into that timer. In > other cases a new callout needed to be added to the driver. Some drivers > even abused the if_watchdog interface to provide a stats timer that fired > every second. :) For a few drivers I also fixed other things such as busted > locking, order-of-operations issues in detach, or just completely busted > drivers (fea(4) and fpa(4) which share the pdq backend). Please test. > Barring any major screaming and shouting I plan to commit this in a week or > so and after that to work on removing the if_watchdog/if_timer stuff from the > network stack. > > The patch is at http://www.FreeBSD.org/~jhb/patches/cleanup.patch > > Driver details: > - admsw(4) > - This driver is a bit special in that it has no locking at all, not even > a poor attempt. :) It also appears to be for a specific MIPS board of > some sort. > - It has multiple ifnet's for multiple ports, but it only used if_timer and > if_watchdog from the first ifnet. For this driver I added a single > private timer to replace the if_timer use on the first ifnet. I marked > the callout MPSAFE, but the driver really needs to have locking added at > which point it could use callout_init_mtx(). Can someone please review the changes to this driver? Also, the driver could really use some love in the form of adding locking. -- John Baldwin