Commit 8568a4d2 authored by James Smart's avatar James Smart Committed by James Bottomley

[SCSI] lpfc 8.3.4: Various SLI3 fixes

Various SLI3 fixes

- Fix for firmware dump failure
- Fix inband remote management
Signed-off-by: default avatarJames Smart <James.Smart@emulex.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
parent a0c87cbd
...@@ -685,6 +685,7 @@ struct lpfc_hba { ...@@ -685,6 +685,7 @@ struct lpfc_hba {
struct pci_pool *lpfc_mbuf_pool; struct pci_pool *lpfc_mbuf_pool;
struct pci_pool *lpfc_hrb_pool; /* header receive buffer pool */ struct pci_pool *lpfc_hrb_pool; /* header receive buffer pool */
struct pci_pool *lpfc_drb_pool; /* data receive buffer pool */ struct pci_pool *lpfc_drb_pool; /* data receive buffer pool */
struct pci_pool *lpfc_hbq_pool; /* SLI3 hbq buffer pool */
struct lpfc_dma_pool lpfc_mbuf_safety_pool; struct lpfc_dma_pool lpfc_mbuf_safety_pool;
mempool_t *mbox_mem_pool; mempool_t *mbox_mem_pool;
......
...@@ -527,9 +527,6 @@ lpfc_config_port_post(struct lpfc_hba *phba) ...@@ -527,9 +527,6 @@ lpfc_config_port_post(struct lpfc_hba *phba)
/* Set up error attention (ERATT) polling timer */ /* Set up error attention (ERATT) polling timer */
mod_timer(&phba->eratt_poll, jiffies + HZ * LPFC_ERATT_POLL_INTERVAL); mod_timer(&phba->eratt_poll, jiffies + HZ * LPFC_ERATT_POLL_INTERVAL);
/* Check if the port is disabled */
lpfc_sli_read_serdes_param(phba);
if (phba->hba_flag & LINK_DISABLED) { if (phba->hba_flag & LINK_DISABLED) {
lpfc_printf_log(phba, lpfc_printf_log(phba,
KERN_ERR, LOG_INIT, KERN_ERR, LOG_INIT,
......
...@@ -110,17 +110,28 @@ lpfc_mem_alloc(struct lpfc_hba *phba, int align) ...@@ -110,17 +110,28 @@ lpfc_mem_alloc(struct lpfc_hba *phba, int align)
sizeof(struct lpfc_nodelist)); sizeof(struct lpfc_nodelist));
if (!phba->nlp_mem_pool) if (!phba->nlp_mem_pool)
goto fail_free_mbox_pool; goto fail_free_mbox_pool;
if (phba->sli_rev == LPFC_SLI_REV4) {
phba->lpfc_hrb_pool = pci_pool_create("lpfc_hrb_pool", phba->lpfc_hrb_pool = pci_pool_create("lpfc_hrb_pool",
phba->pcidev, phba->pcidev,
LPFC_HDR_BUF_SIZE, align, 0); LPFC_HDR_BUF_SIZE, align, 0);
if (!phba->lpfc_hrb_pool) if (!phba->lpfc_hrb_pool)
goto fail_free_nlp_mem_pool; goto fail_free_nlp_mem_pool;
phba->lpfc_drb_pool = pci_pool_create("lpfc_drb_pool", phba->lpfc_drb_pool = pci_pool_create("lpfc_drb_pool",
phba->pcidev, phba->pcidev,
LPFC_DATA_BUF_SIZE, align, 0); LPFC_DATA_BUF_SIZE, align, 0);
if (!phba->lpfc_drb_pool) if (!phba->lpfc_drb_pool)
goto fail_free_hbq_pool; goto fail_free_hrb_pool;
phba->lpfc_hbq_pool = NULL;
} else {
phba->lpfc_hbq_pool = pci_pool_create("lpfc_hbq_pool",
phba->pcidev, LPFC_BPL_SIZE, align, 0);
if (!phba->lpfc_hbq_pool)
goto fail_free_nlp_mem_pool;
phba->lpfc_hrb_pool = NULL;
phba->lpfc_drb_pool = NULL;
}
/* vpi zero is reserved for the physical port so add 1 to max */ /* vpi zero is reserved for the physical port so add 1 to max */
longs = ((phba->max_vpi + 1) + BITS_PER_LONG - 1) / BITS_PER_LONG; longs = ((phba->max_vpi + 1) + BITS_PER_LONG - 1) / BITS_PER_LONG;
phba->vpi_bmask = kzalloc(longs * sizeof(unsigned long), GFP_KERNEL); phba->vpi_bmask = kzalloc(longs * sizeof(unsigned long), GFP_KERNEL);
...@@ -132,7 +143,7 @@ lpfc_mem_alloc(struct lpfc_hba *phba, int align) ...@@ -132,7 +143,7 @@ lpfc_mem_alloc(struct lpfc_hba *phba, int align)
fail_free_dbq_pool: fail_free_dbq_pool:
pci_pool_destroy(phba->lpfc_drb_pool); pci_pool_destroy(phba->lpfc_drb_pool);
phba->lpfc_drb_pool = NULL; phba->lpfc_drb_pool = NULL;
fail_free_hbq_pool: fail_free_hrb_pool:
pci_pool_destroy(phba->lpfc_hrb_pool); pci_pool_destroy(phba->lpfc_hrb_pool);
phba->lpfc_hrb_pool = NULL; phba->lpfc_hrb_pool = NULL;
fail_free_nlp_mem_pool: fail_free_nlp_mem_pool:
...@@ -176,11 +187,17 @@ lpfc_mem_free(struct lpfc_hba *phba) ...@@ -176,11 +187,17 @@ lpfc_mem_free(struct lpfc_hba *phba)
/* Free HBQ pools */ /* Free HBQ pools */
lpfc_sli_hbqbuf_free_all(phba); lpfc_sli_hbqbuf_free_all(phba);
if (phba->lpfc_drb_pool)
pci_pool_destroy(phba->lpfc_drb_pool); pci_pool_destroy(phba->lpfc_drb_pool);
phba->lpfc_drb_pool = NULL; phba->lpfc_drb_pool = NULL;
if (phba->lpfc_hrb_pool)
pci_pool_destroy(phba->lpfc_hrb_pool); pci_pool_destroy(phba->lpfc_hrb_pool);
phba->lpfc_hrb_pool = NULL; phba->lpfc_hrb_pool = NULL;
if (phba->lpfc_hbq_pool)
pci_pool_destroy(phba->lpfc_hbq_pool);
phba->lpfc_hbq_pool = NULL;
/* Free NLP memory pool */ /* Free NLP memory pool */
mempool_destroy(phba->nlp_mem_pool); mempool_destroy(phba->nlp_mem_pool);
phba->nlp_mem_pool = NULL; phba->nlp_mem_pool = NULL;
...@@ -380,7 +397,7 @@ lpfc_els_hbq_alloc(struct lpfc_hba *phba) ...@@ -380,7 +397,7 @@ lpfc_els_hbq_alloc(struct lpfc_hba *phba)
if (!hbqbp) if (!hbqbp)
return NULL; return NULL;
hbqbp->dbuf.virt = pci_pool_alloc(phba->lpfc_hrb_pool, GFP_KERNEL, hbqbp->dbuf.virt = pci_pool_alloc(phba->lpfc_hbq_pool, GFP_KERNEL,
&hbqbp->dbuf.phys); &hbqbp->dbuf.phys);
if (!hbqbp->dbuf.virt) { if (!hbqbp->dbuf.virt) {
kfree(hbqbp); kfree(hbqbp);
...@@ -405,7 +422,7 @@ lpfc_els_hbq_alloc(struct lpfc_hba *phba) ...@@ -405,7 +422,7 @@ lpfc_els_hbq_alloc(struct lpfc_hba *phba)
void void
lpfc_els_hbq_free(struct lpfc_hba *phba, struct hbq_dmabuf *hbqbp) lpfc_els_hbq_free(struct lpfc_hba *phba, struct hbq_dmabuf *hbqbp)
{ {
pci_pool_free(phba->lpfc_hrb_pool, hbqbp->dbuf.virt, hbqbp->dbuf.phys); pci_pool_free(phba->lpfc_hbq_pool, hbqbp->dbuf.virt, hbqbp->dbuf.phys);
kfree(hbqbp); kfree(hbqbp);
return; return;
} }
......
...@@ -4702,13 +4702,13 @@ lpfc_sli_issue_mbox_s3(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmbox, ...@@ -4702,13 +4702,13 @@ lpfc_sli_issue_mbox_s3(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmbox,
spin_lock_irqsave(&phba->hbalock, drvr_flag); spin_lock_irqsave(&phba->hbalock, drvr_flag);
if (!pmbox) { if (!pmbox) {
phba->sli.sli_flag &= ~LPFC_SLI_MBOX_ACTIVE;
/* processing mbox queue from intr_handler */ /* processing mbox queue from intr_handler */
if (unlikely(psli->sli_flag & LPFC_SLI_ASYNC_MBX_BLK)) { if (unlikely(psli->sli_flag & LPFC_SLI_ASYNC_MBX_BLK)) {
spin_unlock_irqrestore(&phba->hbalock, drvr_flag); spin_unlock_irqrestore(&phba->hbalock, drvr_flag);
return MBX_SUCCESS; return MBX_SUCCESS;
} }
processing_queue = 1; processing_queue = 1;
phba->sli.sli_flag &= ~LPFC_SLI_MBOX_ACTIVE;
pmbox = lpfc_mbox_get(phba); pmbox = lpfc_mbox_get(phba);
if (!pmbox) { if (!pmbox) {
spin_unlock_irqrestore(&phba->hbalock, drvr_flag); spin_unlock_irqrestore(&phba->hbalock, drvr_flag);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment