[PATCH] Remove if_watchdog use
John Baldwin
jhb at freebsd.org
Thu Nov 19 20:30:49 UTC 2009
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
More information about the freebsd-mips
mailing list