rspiocbq.iocb.un.ulpWord[4] = irsp->un.ulpWord[4]; rspiocbq.iocb.ulpStatus = irsp->ulpStatus; rspiocbq.iocb.ulpContext = irsp->ulpContext; rspiocbq.iocb.ulpIoTag = irsp->ulpIoTag; 
lpfc_sli_handle_fast_ring_event(struct lpfc_hba * phba,				struct lpfc_sli_ring * pring, uint32_t mask){ 	struct lpfc_pgp *pgp = &phba->slim2p->mbx.us.s2.port[pring->ringno];	IOCB_t *irsp = NULL;	struct lpfc_iocbq *cmdiocbq = NULL;	struct lpfc_iocbq rspiocbq;	uint32_t status;	uint32_t portRspPut, portRspMax;	int rc = 1;	lpfc_iocb_type type;	unsigned long iflag;	uint32_t rsp_cmpl = 0;	void __iomem  *to_slim;	spin_lock_irqsave(phba->host->host_lock, iflag);	pring->stats.iocb_event++;	/*	 * The next available response entry should never exceed the maximum	 * entries.  If it does, treat it as an adapter hardware error.	 */	portRspMax = pring->numRiocb;	portRspPut = le32_to_cpu(pgp->rspPutInx);	if (unlikely(portRspPut >= portRspMax)) {		/*		 * Ring <ringno> handler: portRspPut <portRspPut> is bigger then		 * rsp ring <portRspMax>		 */		lpfc_printf_log(phba, KERN_ERR, LOG_SLI,				"%d:0312 Ring %d handler: portRspPut %d "				"is bigger then rsp ring %d\n",				phba->brd_no, pring->ringno, portRspPut,				portRspMax);		phba->hba_state = LPFC_HBA_ERROR;		/* All error attention handlers are posted to worker thread */		phba->work_ha |= HA_ERATT;		phba->work_hs = HS_FFER3;		if (phba->work_wait)			wake_up(phba->work_wait);		spin_unlock_irqrestore(phba->host->host_lock, iflag);		return 1;	}	rmb();	while (pring->rspidx != portRspPut) {		irsp = (IOCB_t *) IOCB_ENTRY(pring->rspringaddr, pring->rspidx);		type = lpfc_sli_iocb_cmd_type(irsp->ulpCommand & CMD_IOCB_MASK);		pring->stats.iocb_rsp++;		rsp_cmpl++;		if (unlikely(irsp->ulpStatus)) {			/* Rsp ring <ringno> error: IOCB */			lpfc_printf_log(phba, KERN_WARNING, LOG_SLI,				"%d:0326 Rsp Ring %d error: IOCB Data: "				"x%x x%x x%x x%x x%x x%x x%x x%x\n",				phba->brd_no, pring->ringno,				irsp->un.ulpWord[0], irsp->un.ulpWord[1],				irsp->un.ulpWord[2], irsp->un.ulpWord[3],				irsp->un.ulpWord[4], irsp->un.ulpWord[5],				*(((uint32_t *) irsp) + 6),				*(((uint32_t *) irsp) + 7));		}		switch (type) {		case LPFC_ABORT_IOCB:		case LPFC_SOL_IOCB:			/*			 * Idle exchange closed via ABTS from port.  No iocb			 * resources need to be recovered.			 */			if (unlikely(irsp->ulpCommand == CMD_XRI_ABORTED_CX)) {				printk(KERN_INFO "%s: IOCB cmd 0x%x processed. "				       "Skipping completion\n", __FUNCTION__,				       irsp->ulpCommand);				break;			}			rspiocbq.iocb.un.ulpWord[4] = irsp->un.ulpWord[4];			rspiocbq.iocb.ulpStatus = irsp->ulpStatus;			rspiocbq.iocb.ulpContext = irsp->ulpContext;			rspiocbq.iocb.ulpIoTag = irsp->ulpIoTag;			cmdiocbq = lpfc_sli_txcmpl_ring_iotag_lookup(phba,								pring,								&rspiocbq);			if ((cmdiocbq) && (cmdiocbq->iocb_cmpl)) {				spin_unlock_irqrestore(				       phba->host->host_lock, iflag);				(cmdiocbq->iocb_cmpl)(phba, cmdiocbq,						      &rspiocbq);				spin_lock_irqsave(phba->host->host_lock,						  iflag);			}			break;		default:			if (irsp->ulpCommand == CMD_ADAPTER_MSG) {				char adaptermsg[LPFC_MAX_ADPTMSG];				memset(adaptermsg, 0, LPFC_MAX_ADPTMSG);				memcpy(&adaptermsg[0], (uint8_t *) irsp,				       MAX_MSG_DATA);				dev_warn(&((phba->pcidev)->dev), "lpfc%d: %s",					 phba->brd_no, adaptermsg);			} else {				/* Unknown IOCB command */				lpfc_printf_log(phba, KERN_ERR, LOG_SLI,					"%d:0321 Unknown IOCB command "					"Data: x%x, x%x x%x x%x x%x\n",					phba->brd_no, type, irsp->ulpCommand,					irsp->ulpStatus, irsp->ulpIoTag,					irsp->ulpContext);			}			break;		}		/*		 * The response IOCB has been processed.  Update the ring		 * pointer in SLIM.  If the port response put pointer has not		 * been updated, sync the pgp->rspPutInx and fetch the new port		 * response put pointer.		 */		if (++pring->rspidx >= portRspMax)			pring->rspidx = 0;		to_slim = phba->MBslimaddr +			(SLIMOFF + (pring->ringno * 2) + 1) * 4;		writeb(pring->rspidx, to_slim);		if (pring->rspidx == portRspPut)			portRspPut = le32_to_cpu(pgp->rspPutInx);	}	if ((rsp_cmpl > 0) && (mask & HA_R0RE_REQ)) {		pring->stats.iocb_rsp_full++;		status = ((CA_R0ATT | CA_R0RE_RSP) << (pring->ringno * 4));		writel(status, phba->CAregaddr);		readl(phba->CAregaddr);	}	if ((mask & HA_R0CE_RSP) && (pring->flag & LPFC_CALL_RING_AVAILABLE)) {		pring->flag &= ~LPFC_CALL_RING_AVAILABLE;		pring->stats.iocb_cmd_empty++;		/* Force update of the local copy of cmdGetInx */		pring->local_getidx = le32_to_cpu(pgp->cmdGetInx);		lpfc_sli_resume_iocb(phba, pring);		if ((pring->lpfc_sli_cmd_available))			(pring->lpfc_sli_cmd_available) (phba, pring);	}	spin_unlock_irqrestore(phba->host->host_lock, iflag);	return rc;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/87f6eaffd732bc20b5a02e9f36b86f67310d8129/lpfc_sli.c/clean/drivers/scsi/lpfc/lpfc_sli.c