kernels/linux-2.4.0/drivers/scsi/ips.c
/****************************************************************************/
/*                                                                          */
/* Routine Name: ips_cleanup_passthru                                       */
/*                                                                          */
/* Routine Description:                                                     */
/*                                                                          */
/*   Cleanup after a passthru command                                       */
/*                                                                          */
/****************************************************************************/


Routine Description.

Cleanup after a passthru command
Routine Description . Cleanup after a passthru command
static void
ips_cleanup_passthru(ips_ha_t *ha, ips_scb_t *scb) {
   ips_passthru_t *pt;
   METHOD_TRACE("ips_cleanup_passthru", 1);
   if ((!scb) || (!scb->scsi_cmd) || (!scb->scsi_cmd->request_buffer)) {
      DEBUG_VAR(1, "(%s%d) couldn't cleanup after passthru",
                ips_name, ha->host_num);
      return ;
   }
   pt = (ips_passthru_t *) scb->scsi_cmd->request_buffer;
   if (scb->scsi_cmd->cmnd[0] == IPS_IOCTL_COMMAND) {
      pt->BasicStatus = scb->basic_status;
      pt->ExtendedStatus = scb->extended_status;
   } else {
      pt->BasicStatus = scb->basic_status;
      pt->ExtendedStatus = scb->extended_status;
      up(scb->sem);
   }
}
static void ips_cleanup_passthru ( ips_ha_t * ha , ips_scb_t * scb ) { ips_passthru_t * pt ; METHOD_TRACE ( " " , 1 ) ; if ( ( ! scb ) || ( ! scb -> scsi_cmd ) || ( ! scb -> scsi_cmd -> request_buffer ) ) { DEBUG_VAR ( 1 , " " , ips_name , ha -> host_num ) ; return ; } pt = ( ips_passthru_t * ) scb -> scsi_cmd -> request_buffer ; if ( scb -> scsi_cmd -> cmnd [ 0 ] == IPS_IOCTL_COMMAND ) { pt -> BasicStatus = scb -> basic_status ; pt -> ExtendedStatus = scb -> extended_status ; } else { pt -> BasicStatus = scb -> basic_status ; pt -> ExtendedStatus = scb -> extended_status ; up ( scb -> sem ) ; } }
Routine Name: ips_cleanup_passthru
Routine Name : ips_cleanup_passthru
/* Copy data back to the user */ /* Copy data back to the user */