Date: Mon, 1 Nov 2010 09:30:25 +0100 From: Hans Petter Selasky <hselasky@c2i.net> To: Weongyo Jeong <weongyo@freebsd.org> Cc: freebsd-usb@freebsd.org Subject: Re: [CFR 2-3/n] removes uther dependency of axe(4) Message-ID: <201011010930.26038.hselasky@c2i.net> In-Reply-To: <20101031224304.GB3918@weongyo> References: <20101031224304.GB3918@weongyo>
next in thread | previous in thread | raw e-mail | index | archive | help
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; > + Hi, 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? --HPS
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201011010930.26038.hselasky>