Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Nov 2009 15:30:39 -0500
From:      John Baldwin <jhb@freebsd.org>
To:        mips@FreeBSD.org
Subject:   Re: [PATCH] Remove if_watchdog use
Message-ID:  <200911191530.39924.jhb@freebsd.org>
In-Reply-To: <200911061508.22482.jhb@freebsd.org>
References:  <200911061508.22482.jhb@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200911191530.39924.jhb>