kernels/linux-2.4.0/drivers/scsi/ips.c
/****************************************************************************/
/*                                                                          */
/* Routine Name: ips_free_scb                                               */
/*                                                                          */
/* Routine Description:                                                     */
/*                                                                          */
/*   Return an unused CCB back to the free list                             */
/*                                                                          */
/* ASSUMED to be called from within a lock                                  */
/*                                                                          */
/****************************************************************************/


Routine Description.

Return an unused CCB back to the free list

ASSUMED to be called from within a lock
Routine Description . Return an unused CCB back to the free list ASSUMED to be called from within a lock
static void
ips_freescb(ips_ha_t *ha, ips_scb_t *scb) {
   u32          cpu_flags;
   METHOD_TRACE("ips_freescb", 1);
   if (IPS_COMMAND_ID(ha, scb) < (ha->max_cmds - 1)) {
      IPS_SCB_LOCK(cpu_flags);
      scb->q_next = ha->scb_freelist;
      ha->scb_freelist = scb;
      IPS_SCB_UNLOCK(cpu_flags);
   }
}
static void ips_freescb ( ips_ha_t * ha , ips_scb_t * scb ) { u32 cpu_flags ; METHOD_TRACE ( " " , 1 ) ; if ( IPS_COMMAND_ID ( ha , scb ) < ( ha -> max_cmds - 1 ) ) { IPS_SCB_LOCK ( cpu_flags ) ; scb -> q_next = ha -> scb_freelist ; ha -> scb_freelist = scb ; IPS_SCB_UNLOCK ( cpu_flags ) ; } }
Routine Name: ips_free_scb
Routine Name : ips_free_scb
/* check to make sure this is not our "special" scb */