Subject: Re: scsipi change
To: Matthew Jacob <mjacob@nas.nasa.gov>
From: Matthew Jacob <mjacob@feral.com>
List: tech-kern
Date: 09/26/2001 19:48:24
The problem here was the original code I checked in just had:
       /*
        * Tell the completion thread to kick the channel's queue here.
        */
       periph->periph_channel->chan_flags |= SCSIPI_CHAN_KICK;
       wakeup(&periph->periph_channel->chan_complete);

but needed instead to check to make sure the completion thread had
started:

       if ((periph->periph_channel->chan_flags & SCSIPI_CHAN_TACTIVE) == 0) {
               /*
                * Kick the channel's queue here.  Note, we're running in
                * interrupt context (softclock), so the adapter driver
                * had better not sleep.
                */
               scsipi_run_queue(periph->periph_channel);
       } else {
               /*
                * Tell the completion thread to kick the channel's queue here.
                */
               periph->periph_channel->chan_flags |= SCSIPI_CHAN_KICK;
               wakeup(&periph->periph_channel->chan_complete);
       }

If people would like to check the changes, the patch against -current can be
found at ftp://ftp.feral.com/pub/outgoing/scsipi_patches.gz. I'll hold off
checking the changes back in until I get some feedback.

I've tested with an AHA and a QLOGIC. If someone who has a PSIOP driven card
handy, I'd appreciate a check on it.

-matt