lq = GET_LU_Q(ha, id, lun); if (!sp || !fcport || !lq) 
if (!sp || !fcport) 
qla2xxx_eh_host_reset(struct scsi_cmnd *cmd){	scsi_qla_host_t *ha = to_qla_host(cmd->device->host);	os_tgt_t *tq = (os_tgt_t *) cmd->device->hostdata;	fc_port_t *fcport = tq->fcport;	os_lun_t *lq;	srb_t *sp;	int ret;	unsigned int id, lun;	unsigned long serial;	ret = FAILED;	id = cmd->device->id;	lun = cmd->device->lun;	serial = cmd->serial_number;	sp = (srb_t *) CMD_SP(cmd);	lq = GET_LU_Q(ha, id, lun);	if (!sp || !fcport || !lq)		return ret;	qla_printk(KERN_INFO, ha,	    "scsi(%ld:%d:%d): ADAPTER RESET ISSUED.\n", ha->host_no, id, lun);	spin_unlock_irq(ha->host->host_lock);	if (qla2x00_wait_for_hba_online(ha) != QLA_SUCCESS)		goto eh_host_reset_lock;	/*	 * Fixme-may be dpc thread is active and processing	 * loop_resync,so wait a while for it to 	 * be completed and then issue big hammer.Otherwise	 * it may cause I/O failure as big hammer marks the	 * devices as lost kicking of the port_down_timer	 * while dpc is stuck for the mailbox to complete.	 */	qla2x00_wait_for_loop_ready(ha);	set_bit(ABORT_ISP_ACTIVE, &ha->dpc_flags);	if (qla2x00_abort_isp(ha)) {		clear_bit(ABORT_ISP_ACTIVE, &ha->dpc_flags);		/* failed. schedule dpc to try */		set_bit(ISP_ABORT_NEEDED, &ha->dpc_flags);		if (qla2x00_wait_for_hba_online(ha) != QLA_SUCCESS)			goto eh_host_reset_lock;	} 	clear_bit(ABORT_ISP_ACTIVE, &ha->dpc_flags);	/* Waiting for our command in done_queue to be returned to OS.*/	if (qla2x00_eh_wait_for_pending_commands(ha))		ret = SUCCESS;eh_host_reset_lock:	spin_lock_irq(ha->host->host_lock);	qla_printk(KERN_INFO, ha, "%s: reset %s\n", __func__,	    (ret == FAILED) ? "failed" : "succeded");	return ret;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/bdf796210e01145fd77bbb3ae644d04f982b6c3b/qla_os.c/buggy/drivers/scsi/qla2xxx/qla_os.c