kernels/linux-2.4.0/drivers/scsi/ips.c
/****************************************************************************/
/*                                                                          */
/* Routine Name: ips_select_queue_depth                                     */
/*                                                                          */
/* Routine Description:                                                     */
/*                                                                          */
/*   Select queue depths for the devices on the contoller                   */
/*                                                                          */
/****************************************************************************/


Routine Description.

Select queue depths for the devices on the contoller
Routine Description . Select queue depths for the devices on the contoller
static void
ips_select_queue_depth(struct Scsi_Host *host, Scsi_Device *scsi_devs) {
   Scsi_Device *device;
   ips_ha_t    *ha;
   int          count = 0;
   ha = IPS_HA(host);
   for (device = scsi_devs; device; device = device->next) {
     if (device->host == host) {
        if ((device->channel == 0) && (device->type == 0))
           count++;
     }
   }
   for (device = scsi_devs; device; device = device->next) {
      if (device->host == host) {
         if ((device->channel == 0) && (device->type == 0))
            device->queue_depth = ha->max_cmds / count - 1;
         else
            device->queue_depth = 2;
      }
   }
}
static void ips_select_queue_depth ( struct Scsi_Host * host , Scsi_Device * scsi_devs ) { Scsi_Device * device ; ips_ha_t * ha ; int count = 0 ; ha = IPS_HA ( host ) ; for ( device = scsi_devs ; device ; device = device -> next ) { if ( device -> host == host ) { if ( ( device -> channel == 0 ) && ( device -> type == 0 ) ) count ++ ; } } for ( device = scsi_devs ; device ; device = device -> next ) { if ( device -> host == host ) { if ( ( device -> channel == 0 ) && ( device -> type == 0 ) ) device -> queue_depth = ha -> max_cmds / count - 1 ; else device -> queue_depth = 2 ; } } }
Routine Name: ips_select_queue_depth
Routine Name : ips_select_queue_depth