if (pring->fast_lookup) { kfree(pring->fast_lookup); pring->fast_lookup = NULL; }  
kfree(pring->fast_lookup); pring->fast_lookup = NULL; 
lpfc_sli_hba_down(struct lpfc_hba * phba){	struct lpfc_sli *psli;	struct lpfc_sli_ring *pring;	LPFC_MBOXQ_t *pmb;	struct lpfc_iocbq *iocb, *next_iocb;	IOCB_t *icmd = NULL;	int i;	unsigned long flags = 0;	psli = &phba->sli;	lpfc_hba_down_prep(phba);	spin_lock_irqsave(phba->host->host_lock, flags);	for (i = 0; i < psli->num_rings; i++) {		pring = &psli->ring[i];		pring->flag |= LPFC_DEFERRED_RING_EVENT;		/*		 * Error everything on the txq since these iocbs have not been		 * given to the FW yet.		 */		pring->txq_cnt = 0;		list_for_each_entry_safe(iocb, next_iocb, &pring->txq, list) {			list_del_init(&iocb->list);			if (iocb->iocb_cmpl) {				icmd = &iocb->iocb;				icmd->ulpStatus = IOSTAT_LOCAL_REJECT;				icmd->un.ulpWord[4] = IOERR_SLI_DOWN;				spin_unlock_irqrestore(phba->host->host_lock,						       flags);				(iocb->iocb_cmpl) (phba, iocb, iocb);				spin_lock_irqsave(phba->host->host_lock, flags);			} else				lpfc_sli_release_iocbq(phba, iocb);		}		INIT_LIST_HEAD(&(pring->txq));		if (pring->fast_lookup) {			kfree(pring->fast_lookup);			pring->fast_lookup = NULL;		}	}	spin_unlock_irqrestore(phba->host->host_lock, flags);	/* Return any active mbox cmds */	del_timer_sync(&psli->mbox_tmo);	spin_lock_irqsave(phba->host->host_lock, flags);	phba->work_hba_events &= ~WORKER_MBOX_TMO;	if (psli->mbox_active) {		pmb = psli->mbox_active;		pmb->mb.mbxStatus = MBX_NOT_FINISHED;		if (pmb->mbox_cmpl) {			spin_unlock_irqrestore(phba->host->host_lock, flags);			pmb->mbox_cmpl(phba,pmb);			spin_lock_irqsave(phba->host->host_lock, flags);		}	}	psli->sli_flag &= ~LPFC_SLI_MBOX_ACTIVE;	psli->mbox_active = NULL;	/* Return any pending mbox cmds */	while ((pmb = lpfc_mbox_get(phba)) != NULL) {		pmb->mb.mbxStatus = MBX_NOT_FINISHED;		if (pmb->mbox_cmpl) {			spin_unlock_irqrestore(phba->host->host_lock, flags);			pmb->mbox_cmpl(phba,pmb);			spin_lock_irqsave(phba->host->host_lock, flags);		}	}	INIT_LIST_HEAD(&psli->mboxq);	spin_unlock_irqrestore(phba->host->host_lock, flags);	/*	 * Provided the hba is not in an error state, reset it.  It is not	 * capable of IO anymore.	 */	if (phba->hba_state != LPFC_HBA_ERROR) {		phba->hba_state = LPFC_INIT_START;		lpfc_sli_brdreset(phba, 1);	}	return 1;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/c9475cb0c358ff0dd473544280d92482df491913/lpfc_sli.c/buggy/drivers/scsi/lpfc/lpfc_sli.c