kernels/linux-2.4.0/drivers/scsi/ips.c
/****************************************************************************/
/*                                                                          */
/* Routine Name: ips_online                                                 */
/*                                                                          */
/* Routine Description:                                                     */
/*                                                                          */
/*   Determine if a logical drive is online                                 */
/*                                                                          */
/****************************************************************************/


Routine Description.

Determine if a logical drive is online
Routine Description . Determine if a logical drive is online
static int
ips_online(ips_ha_t *ha, ips_scb_t *scb) {
   METHOD_TRACE("ips_online", 1);
   if (scb->target_id >= IPS_MAX_LD)
      return (0);
   if ((scb->basic_status & IPS_GSC_STATUS_MASK) > 1) {
      memset(&ha->adapt->logical_drive_info, 0, sizeof(ha->adapt->logical_drive_info));
      return (0);
   }
   if (scb->target_id < ha->adapt->logical_drive_info.no_of_log_drive &&
       ha->adapt->logical_drive_info.drive_info[scb->target_id].state != IPS_LD_OFFLINE &&
       ha->adapt->logical_drive_info.drive_info[scb->target_id].state != IPS_LD_FREE &&
       ha->adapt->logical_drive_info.drive_info[scb->target_id].state != IPS_LD_CRS &&
       ha->adapt->logical_drive_info.drive_info[scb->target_id].state != IPS_LD_SYS)
      return (1);
   else
      return (0);
}
static int ips_online ( ips_ha_t * ha , ips_scb_t * scb ) { METHOD_TRACE ( " " , 1 ) ; if ( scb -> target_id >= IPS_MAX_LD ) return ( 0 ) ; if ( ( scb -> basic_status & IPS_GSC_STATUS_MASK ) > 1 ) { memset ( & ha -> adapt -> logical_drive_info , 0 , sizeof ( ha -> adapt -> logical_drive_info ) ) ; return ( 0 ) ; } if ( scb -> target_id < ha -> adapt -> logical_drive_info . no_of_log_drive && ha -> adapt -> logical_drive_info . drive_info [ scb -> target_id ] . state != IPS_LD_OFFLINE && ha -> adapt -> logical_drive_info . drive_info [ scb -> target_id ] . state != IPS_LD_FREE && ha -> adapt -> logical_drive_info . drive_info [ scb -> target_id ] . state != IPS_LD_CRS && ha -> adapt -> logical_drive_info . drive_info [ scb -> target_id ] . state != IPS_LD_SYS ) return ( 1 ) ; else return ( 0 ) ; }
Routine Name: ips_online
Routine Name : ips_online