[CFR 2-3/n] removes uther dependency of axe(4)
Hans Petter Selasky
hselasky at c2i.net
Mon Nov 1 08:29:16 UTC 2010
On Sunday 31 October 2010 23:43:04 Weongyo Jeong wrote:
> +static void
> +axe_watchdog(void *arg)
> + struct axe_softc *sc = arg;
> + struct ifnet *ifp = sc->sc_ifp;
> + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0)
> + return;
Please explain what is wrong with the existing code regarding code
synchronisation. Your patch is very big and is likely to introduce problems.
I oppose the introduction of SX-locks. Please explain why you think SX-locks
are better than the USB process taskqueue.
Are you absolutely sure that all the IOCTL's that are called are allowed to
block in the way you have programmed?
The checks in xxx_watchdog() are not good enough. axe_tick() will execute
synchronous USB functions, which sleep for many hundreds of microseconds. You
should add this check before the sleepout_reset() too, and is this code called
with any lock locked? I.E. Are you doing the clearing of IFF_DRV_RUNNING
atomic to testing this flag? Else the result can be random?
More information about the freebsd-usb