Date: Sat, 5 Aug 2006 11:58:39 +0200 From: Hans Petter Selasky <hselasky@c2i.net> To: pyunyh@gmail.com Cc: freebsd-hackers@freebsd.org Subject: Re: miibus + USB = problem ? Message-ID: <200608051158.39850.hselasky@c2i.net> In-Reply-To: <20060804000939.GA53215@cdnetworks.co.kr> References: <200608021437.55500.hselasky@c2i.net> <200608031444.47566.hselasky@c2i.net> <20060804000939.GA53215@cdnetworks.co.kr>
next in thread | previous in thread | raw e-mail | index | archive | help
On Friday 04 August 2006 02:09, Pyun YongHyeon wrote: > On Thu, Aug 03, 2006 at 02:44:46PM +0200, Hans Petter Selasky wrote: > > On Thursday 03 August 2006 04:25, Pyun YongHyeon wrote: > > > On Wed, Aug 02, 2006 at 02:37:55PM +0200, Hans Petter Selasky wrote: > > I can't sure why you need to invoke kthread_exit(9) in aue_miibus_xxx. > If you want to kill the kernel thread in aue_miibus_xxx you can simply > send a termination message to kernel thread. Your kernel thread can > decide when it should terminate if it recevied a termination message. > Invoking mii_mediachg/mii_tick will end up with calling miibus_xxx to > to read/write PHY registers from MII layer. So I think you still need > to handle PHY read/write operations in aue_miibus_xxx. If the PHY > operation was failed due to removal of hardware it could simply return > fake value and send a message to terminate the kernel thread. Yes, I was thinking about the same. I changed the behaviour to return zero if the thread is gone, and delays are just short-circuited. That way the code will return to the main thread in a short time, hopefully, where I do a kthread_exit(0). --HPS
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200608051158.39850.hselasky>