if ((SC->device->channel > 0) && (SC->device->id == ha->ha_id[SC->device->channel])) { 
if ((scmd_channel(SC) > 0) && (scmd_id(SC) == ha->ha_id[scmd_channel(SC)])) { 
ips_queue(Scsi_Cmnd * SC, void (*done) (Scsi_Cmnd *)){	ips_ha_t *ha;	ips_passthru_t *pt;	METHOD_TRACE("ips_queue", 1);	ha = (ips_ha_t *) SC->device->host->hostdata;	if (!ha)		return (1);	if (!ha->active)		return (DID_ERROR);	if (ips_is_passthru(SC)) {		if (ha->copp_waitlist.count == IPS_MAX_IOCTL_QUEUE) {			SC->result = DID_BUS_BUSY << 16;			done(SC);			return (0);		}	} else if (ha->scb_waitlist.count == IPS_MAX_QUEUE) {		SC->result = DID_BUS_BUSY << 16;		done(SC);		return (0);	}	SC->scsi_done = done;	DEBUG_VAR(2, "(%s%d): ips_queue: cmd 0x%X (%d %d %d)",		  ips_name,		  ha->host_num,		  SC->cmnd[0],		  SC->device->channel, SC->device->id, SC->device->lun);	/* Check for command to initiator IDs */	if ((SC->device->channel > 0)	    && (SC->device->id == ha->ha_id[SC->device->channel])) {		SC->result = DID_NO_CONNECT << 16;		done(SC);		return (0);	}	if (ips_is_passthru(SC)) {		ips_copp_wait_item_t *scratch;		/* A Reset IOCTL is only sent by the boot CD in extreme cases.           */		/* There can never be any system activity ( network or disk ), but check */		/* anyway just as a good practice.                                       */		pt = (ips_passthru_t *) SC->request_buffer;		if ((pt->CoppCP.cmd.reset.op_code == IPS_CMD_RESET_CHANNEL) &&		    (pt->CoppCP.cmd.reset.adapter_flag == 1)) {			if (ha->scb_activelist.count != 0) {				SC->result = DID_BUS_BUSY << 16;				done(SC);				return (0);			}			ha->ioctl_reset = 1;	/* This reset request is from an IOCTL */			ips_eh_reset(SC);			SC->result = DID_OK << 16;			SC->scsi_done(SC);			return (0);		}		/* allocate space for the scribble */		scratch = kmalloc(sizeof (ips_copp_wait_item_t), GFP_ATOMIC);		if (!scratch) {			SC->result = DID_ERROR << 16;			done(SC);			return (0);		}		scratch->scsi_cmd = SC;		scratch->next = NULL;		ips_putq_copp_tail(&ha->copp_waitlist, scratch);	} else {		ips_putq_wait_tail(&ha->scb_waitlist, SC);	}	ips_next(ha, IPS_INTR_IORL);	return (0);}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/422c0d61d591cbfb70f029e13505fb437e169d68/ips.c/buggy/drivers/scsi/ips.c