struct list_head *lpfc_iocb_list = &phba->lpfc_iocb_list; 
__lpfc_abort_handler(struct scsi_cmnd *cmnd){	struct lpfc_hba *phba =			(struct lpfc_hba *)cmnd->device->host->hostdata[0];	struct lpfc_sli_ring *pring = &phba->sli.ring[phba->sli.fcp_ring];	struct lpfc_iocbq *iocb, *next_iocb;	struct lpfc_iocbq *abtsiocb = NULL;	struct lpfc_scsi_buf *lpfc_cmd;	struct list_head *lpfc_iocb_list = &phba->lpfc_iocb_list;	IOCB_t *cmd, *icmd;	unsigned long snum;	unsigned int id, lun;	unsigned int loop_count = 0;	int ret = IOCB_SUCCESS;	/*	 * If the host_scribble data area is NULL, then the driver has already	 * completed this command, but the midlayer did not see the completion	 * before the eh fired.  Just return SUCCESS.	 */	lpfc_cmd = (struct lpfc_scsi_buf *)cmnd->host_scribble;	if (!lpfc_cmd)		return SUCCESS;	/* save these now since lpfc_cmd can be freed */	id   = lpfc_cmd->pCmd->device->id;	lun  = lpfc_cmd->pCmd->device->lun;	snum = lpfc_cmd->pCmd->serial_number;	list_for_each_entry_safe(iocb, next_iocb, &pring->txq, list) {		cmd = &iocb->iocb;		if (iocb->context1 != lpfc_cmd)			continue;		list_del_init(&iocb->list);		pring->txq_cnt--;		if (!iocb->iocb_cmpl)			lpfc_sli_release_iocbq(phba, iocb);		else {			cmd->ulpStatus = IOSTAT_LOCAL_REJECT;			cmd->un.ulpWord[4] = IOERR_SLI_ABORTED;			lpfc_scsi_cmd_iocb_cmpl_aborted(phba, iocb, iocb);		}		goto out;	}	list_remove_head(lpfc_iocb_list, abtsiocb, struct lpfc_iocbq, list);	if (abtsiocb == NULL)		return FAILED;	/*	 * The scsi command was not in the txq.  Check the txcmplq and if it is	 * found, send an abort to the FW.	 */	list_for_each_entry_safe(iocb, next_iocb, &pring->txcmplq, list) {		if (iocb->context1 != lpfc_cmd)			continue;		iocb->iocb_cmpl = lpfc_scsi_cmd_iocb_cmpl_aborted;		cmd = &iocb->iocb;		icmd = &abtsiocb->iocb;		icmd->un.acxri.abortType = ABORT_TYPE_ABTS;		icmd->un.acxri.abortContextTag = cmd->ulpContext;		icmd->un.acxri.abortIoTag = cmd->ulpIoTag;		icmd->ulpLe = 1;		icmd->ulpClass = cmd->ulpClass;		if (phba->hba_state >= LPFC_LINK_UP)			icmd->ulpCommand = CMD_ABORT_XRI_CN;		else			icmd->ulpCommand = CMD_CLOSE_XRI_CN;		abtsiocb->iocb_cmpl = lpfc_sli_abort_fcp_cmpl;		if (lpfc_sli_issue_iocb(phba, pring, abtsiocb, 0) ==								IOCB_ERROR) {			lpfc_sli_release_iocbq(phba, abtsiocb);			ret = IOCB_ERROR;			break;		}		/* Wait for abort to complete */		while (cmnd->host_scribble)		{			spin_unlock_irq(phba->host->host_lock);			set_current_state(TASK_UNINTERRUPTIBLE);			schedule_timeout(LPFC_ABORT_WAIT*HZ);			spin_lock_irq(phba->host->host_lock);			if (++loop_count			    > (2 * phba->cfg_nodev_tmo)/LPFC_ABORT_WAIT)				break;		}		if(cmnd->host_scribble) {			lpfc_printf_log(phba, KERN_ERR, LOG_FCP,					"%d:0748 abort handler timed "					"out waiting for abort to "					"complete. Data: "					"x%x x%x x%x x%lx\n",					phba->brd_no, ret, id, lun, snum);			cmnd->host_scribble = NULL;			iocb->iocb_cmpl = lpfc_scsi_cmd_iocb_cleanup;			ret = IOCB_ERROR;		}		break;	} out:	lpfc_printf_log(phba, KERN_WARNING, LOG_FCP,			"%d:0749 SCSI layer issued abort device "			"Data: x%x x%x x%x x%lx\n",			phba->brd_no, ret, id, lun, snum);	return ret == IOCB_SUCCESS ? SUCCESS : FAILED;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/0bd4ca25ad2ace4aa717c83dbd4ed21c53c953cb/lpfc_scsi.c/clean/drivers/scsi/lpfc/lpfc_scsi.c