[BACK]Return to scsipi_base.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / dev / scsipi

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/sys/dev/scsipi/scsipi_base.c between version 1.143 and 1.143.6.5

version 1.143, 2007/02/09 21:55:29 version 1.143.6.5, 2007/05/13 17:36:28
Line 104  scsipi_init(void)
Line 104  scsipi_init(void)
   
         /* Initialize the scsipi_xfer pool. */          /* Initialize the scsipi_xfer pool. */
         pool_init(&scsipi_xfer_pool, sizeof(struct scsipi_xfer), 0,          pool_init(&scsipi_xfer_pool, sizeof(struct scsipi_xfer), 0,
             0, 0, "scxspl", NULL);              0, 0, "scxspl", NULL, IPL_BIO);
         if (pool_prime(&scsipi_xfer_pool,          if (pool_prime(&scsipi_xfer_pool,
             PAGE_SIZE / sizeof(struct scsipi_xfer)) == ENOMEM) {              PAGE_SIZE / sizeof(struct scsipi_xfer)) == ENOMEM) {
                 printf("WARNING: not enough memory for scsipi_xfer_pool\n");                  printf("WARNING: not enough memory for scsipi_xfer_pool\n");
Line 119  scsipi_init(void)
Line 119  scsipi_init(void)
 int  int
 scsipi_channel_init(struct scsipi_channel *chan)  scsipi_channel_init(struct scsipi_channel *chan)
 {  {
           struct scsipi_adapter *adapt = chan->chan_adapter;
         int i;          int i;
   
         /* Initialize shared data. */          /* Initialize shared data. */
Line 134  scsipi_channel_init(struct scsipi_channe
Line 135  scsipi_channel_init(struct scsipi_channe
         /*          /*
          * Create the asynchronous completion thread.           * Create the asynchronous completion thread.
          */           */
         kthread_create(scsipi_create_completion_thread, chan);          if (kthread_create(PRI_NONE, 0, NULL, scsipi_completion_thread, chan,
               &chan->chan_thread, "%s", chan->chan_name)) {
                   printf("%s: unable to create completion thread for "
                       "channel %d\n", adapt->adapt_dev->dv_xname,
                       chan->chan_channel);
                   panic("scsipi_channel_init");
           }
   
         return (0);          return (0);
 }  }
   
Line 1874  scsipi_execute_xs(struct scsipi_xfer *xs
Line 1882  scsipi_execute_xs(struct scsipi_xfer *xs
                  * process must NOT be swapped out, as the device will                   * process must NOT be swapped out, as the device will
                  * be accessing the stack.                   * be accessing the stack.
                  */                   */
                 PHOLD(curlwp);                  uvm_lwp_hold(curlwp);
         }          }
   
         xs->xs_status &= ~XS_STS_DONE;          xs->xs_status &= ~XS_STS_DONE;
Line 2021  scsipi_execute_xs(struct scsipi_xfer *xs
Line 2029  scsipi_execute_xs(struct scsipi_xfer *xs
          */           */
  free_xs:   free_xs:
         if (xs->xs_control & XS_CTL_DATA_ONSTACK)          if (xs->xs_control & XS_CTL_DATA_ONSTACK)
                 PRELE(curlwp);                  uvm_lwp_rele(curlwp);
   
         s = splbio();          s = splbio();
         scsipi_put_xs(xs);          scsipi_put_xs(xs);
Line 2121  scsipi_completion_thread(void *arg)
Line 2129  scsipi_completion_thread(void *arg)
   
         kthread_exit(0);          kthread_exit(0);
 }  }
   
 /*  
  * scsipi_create_completion_thread:  
  *  
  *      Callback to actually create the completion thread.  
  */  
 void  
 scsipi_create_completion_thread(void *arg)  
 {  
         struct scsipi_channel *chan = arg;  
         struct scsipi_adapter *adapt = chan->chan_adapter;  
   
         if (kthread_create1(scsipi_completion_thread, chan,  
             &chan->chan_thread, "%s", chan->chan_name)) {  
                 printf("%s: unable to create completion thread for "  
                     "channel %d\n", adapt->adapt_dev->dv_xname,  
                     chan->chan_channel);  
                 panic("scsipi_create_completion_thread");  
         }  
 }  
   
 /*  /*
  * scsipi_thread_call_callback:   * scsipi_thread_call_callback:
  *   *

Legend:
Removed from v.1.143  
changed lines
  Added in v.1.143.6.5

CVSweb <webmaster@jp.NetBSD.org>