lpfc: fix discovery timeout during nameserver login
Fix discovery timeout during nameserver login Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: Dick Kennedy <dick.kennedy@emulex.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:

committed by
Christoph Hellwig

parent
4f871e1b27
commit
dafe8ceaa8
@@ -988,9 +988,12 @@ lpfc_hba_down_post_s4(struct lpfc_hba *phba)
|
||||
LIST_HEAD(aborts);
|
||||
unsigned long iflag = 0;
|
||||
struct lpfc_sglq *sglq_entry = NULL;
|
||||
struct lpfc_sli *psli = &phba->sli;
|
||||
struct lpfc_sli_ring *pring;
|
||||
|
||||
lpfc_hba_free_post_buf(phba);
|
||||
lpfc_hba_clean_txcmplq(phba);
|
||||
pring = &psli->ring[LPFC_ELS_RING];
|
||||
|
||||
/* At this point in time the HBA is either reset or DOA. Either
|
||||
* way, nothing should be on lpfc_abts_els_sgl_list, it needs to be
|
||||
@@ -1008,8 +1011,10 @@ lpfc_hba_down_post_s4(struct lpfc_hba *phba)
|
||||
&phba->sli4_hba.lpfc_abts_els_sgl_list, list)
|
||||
sglq_entry->state = SGL_FREED;
|
||||
|
||||
spin_lock(&pring->ring_lock);
|
||||
list_splice_init(&phba->sli4_hba.lpfc_abts_els_sgl_list,
|
||||
&phba->sli4_hba.lpfc_sgl_list);
|
||||
spin_unlock(&pring->ring_lock);
|
||||
spin_unlock(&phba->sli4_hba.abts_sgl_list_lock);
|
||||
/* abts_scsi_buf_list_lock required because worker thread uses this
|
||||
* list.
|
||||
@@ -3047,6 +3052,7 @@ lpfc_sli4_xri_sgl_update(struct lpfc_hba *phba)
|
||||
LIST_HEAD(els_sgl_list);
|
||||
LIST_HEAD(scsi_sgl_list);
|
||||
int rc;
|
||||
struct lpfc_sli_ring *pring = &phba->sli.ring[LPFC_ELS_RING];
|
||||
|
||||
/*
|
||||
* update on pci function's els xri-sgl list
|
||||
@@ -3087,7 +3093,9 @@ lpfc_sli4_xri_sgl_update(struct lpfc_hba *phba)
|
||||
list_add_tail(&sglq_entry->list, &els_sgl_list);
|
||||
}
|
||||
spin_lock_irq(&phba->hbalock);
|
||||
spin_lock(&pring->ring_lock);
|
||||
list_splice_init(&els_sgl_list, &phba->sli4_hba.lpfc_sgl_list);
|
||||
spin_unlock(&pring->ring_lock);
|
||||
spin_unlock_irq(&phba->hbalock);
|
||||
} else if (els_xri_cnt < phba->sli4_hba.els_xri_cnt) {
|
||||
/* els xri-sgl shrinked */
|
||||
@@ -3097,7 +3105,9 @@ lpfc_sli4_xri_sgl_update(struct lpfc_hba *phba)
|
||||
"%d to %d\n", phba->sli4_hba.els_xri_cnt,
|
||||
els_xri_cnt);
|
||||
spin_lock_irq(&phba->hbalock);
|
||||
spin_lock(&pring->ring_lock);
|
||||
list_splice_init(&phba->sli4_hba.lpfc_sgl_list, &els_sgl_list);
|
||||
spin_unlock(&pring->ring_lock);
|
||||
spin_unlock_irq(&phba->hbalock);
|
||||
/* release extra els sgls from list */
|
||||
for (i = 0; i < xri_cnt; i++) {
|
||||
@@ -3110,7 +3120,9 @@ lpfc_sli4_xri_sgl_update(struct lpfc_hba *phba)
|
||||
}
|
||||
}
|
||||
spin_lock_irq(&phba->hbalock);
|
||||
spin_lock(&pring->ring_lock);
|
||||
list_splice_init(&els_sgl_list, &phba->sli4_hba.lpfc_sgl_list);
|
||||
spin_unlock(&pring->ring_lock);
|
||||
spin_unlock_irq(&phba->hbalock);
|
||||
} else
|
||||
lpfc_printf_log(phba, KERN_INFO, LOG_SLI,
|
||||
@@ -5680,10 +5692,13 @@ static void
|
||||
lpfc_free_els_sgl_list(struct lpfc_hba *phba)
|
||||
{
|
||||
LIST_HEAD(sglq_list);
|
||||
struct lpfc_sli_ring *pring = &phba->sli.ring[LPFC_ELS_RING];
|
||||
|
||||
/* Retrieve all els sgls from driver list */
|
||||
spin_lock_irq(&phba->hbalock);
|
||||
spin_lock(&pring->ring_lock);
|
||||
list_splice_init(&phba->sli4_hba.lpfc_sgl_list, &sglq_list);
|
||||
spin_unlock(&pring->ring_lock);
|
||||
spin_unlock_irq(&phba->hbalock);
|
||||
|
||||
/* Now free the sgl list */
|
||||
|
Reference in New Issue
Block a user