Subject: Re: Cardbus
To: Hayakawa Koichi <>
From: Lennart Augustsson <>
List: tech-kern
Date: 12/21/1999 09:40:19
Hayakawa Koichi wrote:

> Cardbus detach code should be written.  They do not exist
> now.

Indeed!  :)

>  > Indeed, you need to be careful with that.  For the USB code I keep a
>  > flag with the controller to tell what to do.
>  > An easier solution is probably to have a special delay routine that
>  > tests the `cold' flag to see if it should tsleep() or delay().
>  > This cannot be called from the interrupt routine, of course.  But that
>  > should never be necessary, there is timeout() for that purpose.
> I did it with tsleep() and delay(), same as what you
> suggested.  I supposed it can be called from the interrupt
> context, cannot it?  Using timeout is a bit complicated for
> the purpose.

No, you cannot call tsleep() from an interrupt routine.
But it should not be necessary.  The Cardbus interrupt routine should
only note what has happened and send this information to the
kernel thread handling the card slot.  This thread can the do all the real
action, including sleeping or whatever.


        -- Lennart