add_to_done_queue(ha, sp); 
qla2x00_sp_compl(ha, sp); 
qla2x00_abort_isp(scsi_qla_host_t *ha){	unsigned long flags = 0;	uint16_t       cnt;	srb_t          *sp;	uint8_t        status = 0;	if (ha->flags.online) {		ha->flags.online = 0;		clear_bit(ISP_ABORT_NEEDED, &ha->dpc_flags);		qla2x00_stats.ispAbort++;		ha->total_isp_aborts++;  /* used by ioctl */		ha->sns_retry_cnt = 0;		qla_printk(KERN_INFO, ha,		    "Performing ISP error recovery - ha= %p.\n", ha);		qla2x00_reset_chip(ha);		atomic_set(&ha->loop_down_timer, LOOP_DOWN_TIME);		if (atomic_read(&ha->loop_state) != LOOP_DOWN) {			atomic_set(&ha->loop_state, LOOP_DOWN);			qla2x00_mark_all_devices_lost(ha);		} else {			if (!atomic_read(&ha->loop_down_timer))				atomic_set(&ha->loop_down_timer,				    LOOP_DOWN_TIME);		}		spin_lock_irqsave(&ha->hardware_lock, flags);		/* Requeue all commands in outstanding command list. */		for (cnt = 1; cnt < MAX_OUTSTANDING_COMMANDS; cnt++) {			sp = ha->outstanding_cmds[cnt];			if (sp) {				ha->outstanding_cmds[cnt] = NULL;				if (ha->actthreads)					ha->actthreads--;				sp->lun_queue->out_cnt--;				/*				 * Set the cmd host_byte status depending on				 * whether the scsi_error_handler is				 * active or not. 				 */				if (sp->flags & SRB_TAPE) {					sp->cmd->result = DID_NO_CONNECT << 16;				} else {					if (ha->host->eh_active != EH_ACTIVE)						sp->cmd->result =						    DID_BUS_BUSY << 16;					else						sp->cmd->result =						    DID_RESET << 16;				}				sp->flags = 0;				sp->cmd->host_scribble = (unsigned char *)NULL;				add_to_done_queue(ha, sp);			}		}		spin_unlock_irqrestore(&ha->hardware_lock, flags);		qla2x00_nvram_config(ha);		if (!qla2x00_restart_isp(ha)) {			clear_bit(RESET_MARKER_NEEDED, &ha->dpc_flags);			if (!atomic_read(&ha->loop_down_timer)) {				/*				 * Issue marker command only when we are going				 * to start the I/O .				 */				ha->marker_needed = 1;			}			ha->flags.online = 1;			/* Enable ISP interrupts. */			qla2x00_enable_intrs(ha);			/* v2.19.5b6 Return all commands */			qla2x00_abort_queues(ha, 1);			/* Restart queues that may have been stopped. */			qla2x00_restart_queues(ha, 1);			ha->isp_abort_cnt = 0; 			clear_bit(ISP_ABORT_RETRY, &ha->dpc_flags);		} else {	/* failed the ISP abort */			ha->flags.online = 1;			if (test_bit(ISP_ABORT_RETRY, &ha->dpc_flags)) {				if (ha->isp_abort_cnt == 0) { 					qla_printk(KERN_WARNING, ha,					    "ISP error recovery failed - "					    "board disabled\n");					/* 					 * The next call disables the board					 * completely.					 */					qla2x00_reset_adapter(ha);					qla2x00_abort_queues(ha, 0);					ha->flags.online = 0;					clear_bit(ISP_ABORT_RETRY,					    &ha->dpc_flags);					status = 0;				} else { /* schedule another ISP abort */					ha->isp_abort_cnt--;					DEBUG(printk("qla%ld: ISP abort - "					    "retry remainning %d\n",					    ha->host_no, ha->isp_abort_cnt);)					status = 1;				}			} else {				ha->isp_abort_cnt = MAX_RETRIES_OF_ISP_ABORT;				DEBUG(printk("qla2x00(%ld): ISP error recovery "				    "- retrying (%d) more times\n",				    ha->host_no, ha->isp_abort_cnt);)				set_bit(ISP_ABORT_RETRY, &ha->dpc_flags);				status = 1;			}		}		       	}	if (status) {		qla_printk(KERN_INFO, ha,			"qla2x00_abort_isp: **** FAILED ****\n");	} else {		DEBUG(printk(KERN_INFO				"qla2x00_abort_isp(%ld): exiting.\n",				ha->host_no);)	}	return(status);}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/f4f051ebb40e74ad0ba02d2cb3a6c16b0393472b/qla_init.c/clean/drivers/scsi/qla2xxx/qla_init.c