miibus + USB = problem ?
Hans Petter Selasky
hselasky at c2i.net
Sat Aug 5 09:58:34 UTC 2006
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
More information about the freebsd-hackers
mailing list