set_current_state(TASK_UNINTERRUPTIBLE); schedule_timeout(LPFC_ABORT_WAIT*HZ); 
schedule_timeout_uninterruptible(LPFC_ABORT_WAIT*HZ); 
__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;	struct lpfc_iocbq *abtsiocb;	struct lpfc_scsi_buf *lpfc_cmd;	IOCB_t *cmd, *icmd;	unsigned int loop_count = 0;	int ret = SUCCESS;	lpfc_cmd = (struct lpfc_scsi_buf *)cmnd->host_scribble;	BUG_ON(!lpfc_cmd);	/*	 * If pCmd field of the corresponding lpfc_scsi_buf structure	 * points to a different SCSI command, then the driver has	 * already completed this command, but the midlayer did not	 * see the completion before the eh fired.  Just return	 * SUCCESS.	 */	iocb = &lpfc_cmd->cur_iocbq;	if (lpfc_cmd->pCmd != cmnd)		goto out;	BUG_ON(iocb->context1 != lpfc_cmd);	abtsiocb = lpfc_sli_get_iocbq(phba);	if (abtsiocb == NULL) {		ret = FAILED;		goto out;	}	/*	 * The scsi command can not be in txq and it is in flight because the	 * pCmd is still pointig at the SCSI command we have to abort. There	 * is no need to search the txcmplq. Just send an abort to the FW.	 */	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 = FAILED;		goto out;	}	/* Wait for abort to complete */	while (lpfc_cmd->pCmd == cmnd)	{		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 (lpfc_cmd->pCmd == cmnd) {		ret = FAILED;		lpfc_printf_log(phba, KERN_ERR, LOG_FCP,				"%d:0748 abort handler timed out waiting for "				"abort to complete: ret %#x, ID %d, LUN %d, "				"snum %#lx\n",				phba->brd_no,  ret, cmnd->device->id,				cmnd->device->lun, cmnd->serial_number);	} out:	lpfc_printf_log(phba, KERN_WARNING, LOG_FCP,			"%d:0749 SCSI layer issued abort device: ret %#x, "			"ID %d, LUN %d, snum %#lx\n",			phba->brd_no, ret, cmnd->device->id,			cmnd->device->lun, cmnd->serial_number);	return ret;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/a9a3047dd8ae43ff24caae5ec733a93df129568e/lpfc_scsi.c/clean/drivers/scsi/lpfc/lpfc_scsi.c