Subject: Re: how do I tell if I'm on the interrupt stack?
To: Manuel Bouyer <bouyer@antioche.eu.org>
From: Matthew Jacob <mjacob@feral.com>
List: tech-kern
Date: 09/16/2001 10:22:21
On Sat, 8 Sep 2001, Manuel Bouyer wrote:

> On Fri, Sep 07, 2001 at 09:52:13AM -0700, Jason R Thorpe wrote:
> > On Fri, Sep 07, 2001 at 08:41:18AM -0700, Matthew Jacob wrote:
> >
> >  > The fix for now probably would be to have scsipi_complete get reactivated
> >  > to run the callouts in process context.
> >
> > Yes, this is what should be done for timed-thaw.
>
> Unless I missed something scsipi_complete() is only called from the
> completion thread, or the adapter's interrupt context.

That's correct.

>
> Especially, in the BUSY case, the callout calls scsipi_periph_timed_thaw()
> which will call scsipi_periph_thaw(), which will wakeup the channel completion
> thread to requeue the xfer.

That's not quite what happens. scsipi_periph_timed_thaw calls scsipi_run_queue
directly. It needs to do what you describe instead. I'll send some patches
shortly.

-matt