diff options
author | James Smart <James.Smart@Emulex.Com> | 2009-07-19 10:01:16 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2009-08-22 18:51:57 -0400 |
commit | 8568a4d2495ebcf5da38a2141c7633399143b1a5 (patch) | |
tree | ca36764ce8d8703339e408b93ccfd06ec165eefd /drivers/scsi/lpfc | |
parent | a0c87cbdb52467a16343b31251f2722643db603c (diff) |
[SCSI] lpfc 8.3.4: Various SLI3 fixes
Various SLI3 fixes
- Fix for firmware dump failure
- Fix inband remote management
Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/lpfc')
-rw-r--r-- | drivers/scsi/lpfc/lpfc.h | 1 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_init.c | 3 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_mem.c | 41 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_sli.c | 2 |
4 files changed, 31 insertions, 16 deletions
diff --git a/drivers/scsi/lpfc/lpfc.h b/drivers/scsi/lpfc/lpfc.h index 7b63fe530041..8b69a110a305 100644 --- a/drivers/scsi/lpfc/lpfc.h +++ b/drivers/scsi/lpfc/lpfc.h | |||
@@ -685,6 +685,7 @@ struct lpfc_hba { | |||
685 | struct pci_pool *lpfc_mbuf_pool; | 685 | struct pci_pool *lpfc_mbuf_pool; |
686 | struct pci_pool *lpfc_hrb_pool; /* header receive buffer pool */ | 686 | struct pci_pool *lpfc_hrb_pool; /* header receive buffer pool */ |
687 | struct pci_pool *lpfc_drb_pool; /* data receive buffer pool */ | 687 | struct pci_pool *lpfc_drb_pool; /* data receive buffer pool */ |
688 | struct pci_pool *lpfc_hbq_pool; /* SLI3 hbq buffer pool */ | ||
688 | struct lpfc_dma_pool lpfc_mbuf_safety_pool; | 689 | struct lpfc_dma_pool lpfc_mbuf_safety_pool; |
689 | 690 | ||
690 | mempool_t *mbox_mem_pool; | 691 | mempool_t *mbox_mem_pool; |
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index 900b5628ceb9..dc561e3c8b92 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c | |||
@@ -527,9 +527,6 @@ lpfc_config_port_post(struct lpfc_hba *phba) | |||
527 | /* Set up error attention (ERATT) polling timer */ | 527 | /* Set up error attention (ERATT) polling timer */ |
528 | mod_timer(&phba->eratt_poll, jiffies + HZ * LPFC_ERATT_POLL_INTERVAL); | 528 | mod_timer(&phba->eratt_poll, jiffies + HZ * LPFC_ERATT_POLL_INTERVAL); |
529 | 529 | ||
530 | /* Check if the port is disabled */ | ||
531 | lpfc_sli_read_serdes_param(phba); | ||
532 | |||
533 | if (phba->hba_flag & LINK_DISABLED) { | 530 | if (phba->hba_flag & LINK_DISABLED) { |
534 | lpfc_printf_log(phba, | 531 | lpfc_printf_log(phba, |
535 | KERN_ERR, LOG_INIT, | 532 | KERN_ERR, LOG_INIT, |
diff --git a/drivers/scsi/lpfc/lpfc_mem.c b/drivers/scsi/lpfc/lpfc_mem.c index e198c917c13e..a1b6db6016da 100644 --- a/drivers/scsi/lpfc/lpfc_mem.c +++ b/drivers/scsi/lpfc/lpfc_mem.c | |||
@@ -110,17 +110,28 @@ lpfc_mem_alloc(struct lpfc_hba *phba, int align) | |||
110 | sizeof(struct lpfc_nodelist)); | 110 | sizeof(struct lpfc_nodelist)); |
111 | if (!phba->nlp_mem_pool) | 111 | if (!phba->nlp_mem_pool) |
112 | goto fail_free_mbox_pool; | 112 | goto fail_free_mbox_pool; |
113 | phba->lpfc_hrb_pool = pci_pool_create("lpfc_hrb_pool", | 113 | |
114 | if (phba->sli_rev == LPFC_SLI_REV4) { | ||
115 | phba->lpfc_hrb_pool = pci_pool_create("lpfc_hrb_pool", | ||
114 | phba->pcidev, | 116 | phba->pcidev, |
115 | LPFC_HDR_BUF_SIZE, align, 0); | 117 | LPFC_HDR_BUF_SIZE, align, 0); |
116 | if (!phba->lpfc_hrb_pool) | 118 | if (!phba->lpfc_hrb_pool) |
117 | goto fail_free_nlp_mem_pool; | 119 | goto fail_free_nlp_mem_pool; |
118 | phba->lpfc_drb_pool = pci_pool_create("lpfc_drb_pool", | 120 | |
121 | phba->lpfc_drb_pool = pci_pool_create("lpfc_drb_pool", | ||
119 | phba->pcidev, | 122 | phba->pcidev, |
120 | LPFC_DATA_BUF_SIZE, align, 0); | 123 | LPFC_DATA_BUF_SIZE, align, 0); |
121 | if (!phba->lpfc_drb_pool) | 124 | if (!phba->lpfc_drb_pool) |
122 | goto fail_free_hbq_pool; | 125 | goto fail_free_hrb_pool; |
123 | 126 | phba->lpfc_hbq_pool = NULL; | |
127 | } else { | ||
128 | phba->lpfc_hbq_pool = pci_pool_create("lpfc_hbq_pool", | ||
129 | phba->pcidev, LPFC_BPL_SIZE, align, 0); | ||
130 | if (!phba->lpfc_hbq_pool) | ||
131 | goto fail_free_nlp_mem_pool; | ||
132 | phba->lpfc_hrb_pool = NULL; | ||
133 | phba->lpfc_drb_pool = NULL; | ||
134 | } | ||
124 | /* vpi zero is reserved for the physical port so add 1 to max */ | 135 | /* vpi zero is reserved for the physical port so add 1 to max */ |
125 | longs = ((phba->max_vpi + 1) + BITS_PER_LONG - 1) / BITS_PER_LONG; | 136 | longs = ((phba->max_vpi + 1) + BITS_PER_LONG - 1) / BITS_PER_LONG; |
126 | phba->vpi_bmask = kzalloc(longs * sizeof(unsigned long), GFP_KERNEL); | 137 | phba->vpi_bmask = kzalloc(longs * sizeof(unsigned long), GFP_KERNEL); |
@@ -132,7 +143,7 @@ lpfc_mem_alloc(struct lpfc_hba *phba, int align) | |||
132 | fail_free_dbq_pool: | 143 | fail_free_dbq_pool: |
133 | pci_pool_destroy(phba->lpfc_drb_pool); | 144 | pci_pool_destroy(phba->lpfc_drb_pool); |
134 | phba->lpfc_drb_pool = NULL; | 145 | phba->lpfc_drb_pool = NULL; |
135 | fail_free_hbq_pool: | 146 | fail_free_hrb_pool: |
136 | pci_pool_destroy(phba->lpfc_hrb_pool); | 147 | pci_pool_destroy(phba->lpfc_hrb_pool); |
137 | phba->lpfc_hrb_pool = NULL; | 148 | phba->lpfc_hrb_pool = NULL; |
138 | fail_free_nlp_mem_pool: | 149 | fail_free_nlp_mem_pool: |
@@ -176,11 +187,17 @@ lpfc_mem_free(struct lpfc_hba *phba) | |||
176 | 187 | ||
177 | /* Free HBQ pools */ | 188 | /* Free HBQ pools */ |
178 | lpfc_sli_hbqbuf_free_all(phba); | 189 | lpfc_sli_hbqbuf_free_all(phba); |
179 | pci_pool_destroy(phba->lpfc_drb_pool); | 190 | if (phba->lpfc_drb_pool) |
191 | pci_pool_destroy(phba->lpfc_drb_pool); | ||
180 | phba->lpfc_drb_pool = NULL; | 192 | phba->lpfc_drb_pool = NULL; |
181 | pci_pool_destroy(phba->lpfc_hrb_pool); | 193 | if (phba->lpfc_hrb_pool) |
194 | pci_pool_destroy(phba->lpfc_hrb_pool); | ||
182 | phba->lpfc_hrb_pool = NULL; | 195 | phba->lpfc_hrb_pool = NULL; |
183 | 196 | ||
197 | if (phba->lpfc_hbq_pool) | ||
198 | pci_pool_destroy(phba->lpfc_hbq_pool); | ||
199 | phba->lpfc_hbq_pool = NULL; | ||
200 | |||
184 | /* Free NLP memory pool */ | 201 | /* Free NLP memory pool */ |
185 | mempool_destroy(phba->nlp_mem_pool); | 202 | mempool_destroy(phba->nlp_mem_pool); |
186 | phba->nlp_mem_pool = NULL; | 203 | phba->nlp_mem_pool = NULL; |
@@ -380,7 +397,7 @@ lpfc_els_hbq_alloc(struct lpfc_hba *phba) | |||
380 | if (!hbqbp) | 397 | if (!hbqbp) |
381 | return NULL; | 398 | return NULL; |
382 | 399 | ||
383 | hbqbp->dbuf.virt = pci_pool_alloc(phba->lpfc_hrb_pool, GFP_KERNEL, | 400 | hbqbp->dbuf.virt = pci_pool_alloc(phba->lpfc_hbq_pool, GFP_KERNEL, |
384 | &hbqbp->dbuf.phys); | 401 | &hbqbp->dbuf.phys); |
385 | if (!hbqbp->dbuf.virt) { | 402 | if (!hbqbp->dbuf.virt) { |
386 | kfree(hbqbp); | 403 | kfree(hbqbp); |
@@ -405,7 +422,7 @@ lpfc_els_hbq_alloc(struct lpfc_hba *phba) | |||
405 | void | 422 | void |
406 | lpfc_els_hbq_free(struct lpfc_hba *phba, struct hbq_dmabuf *hbqbp) | 423 | lpfc_els_hbq_free(struct lpfc_hba *phba, struct hbq_dmabuf *hbqbp) |
407 | { | 424 | { |
408 | pci_pool_free(phba->lpfc_hrb_pool, hbqbp->dbuf.virt, hbqbp->dbuf.phys); | 425 | pci_pool_free(phba->lpfc_hbq_pool, hbqbp->dbuf.virt, hbqbp->dbuf.phys); |
409 | kfree(hbqbp); | 426 | kfree(hbqbp); |
410 | return; | 427 | return; |
411 | } | 428 | } |
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c index a3f85454368d..174a1b0d005d 100644 --- a/drivers/scsi/lpfc/lpfc_sli.c +++ b/drivers/scsi/lpfc/lpfc_sli.c | |||
@@ -4702,13 +4702,13 @@ lpfc_sli_issue_mbox_s3(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmbox, | |||
4702 | 4702 | ||
4703 | spin_lock_irqsave(&phba->hbalock, drvr_flag); | 4703 | spin_lock_irqsave(&phba->hbalock, drvr_flag); |
4704 | if (!pmbox) { | 4704 | if (!pmbox) { |
4705 | phba->sli.sli_flag &= ~LPFC_SLI_MBOX_ACTIVE; | ||
4705 | /* processing mbox queue from intr_handler */ | 4706 | /* processing mbox queue from intr_handler */ |
4706 | if (unlikely(psli->sli_flag & LPFC_SLI_ASYNC_MBX_BLK)) { | 4707 | if (unlikely(psli->sli_flag & LPFC_SLI_ASYNC_MBX_BLK)) { |
4707 | spin_unlock_irqrestore(&phba->hbalock, drvr_flag); | 4708 | spin_unlock_irqrestore(&phba->hbalock, drvr_flag); |
4708 | return MBX_SUCCESS; | 4709 | return MBX_SUCCESS; |
4709 | } | 4710 | } |
4710 | processing_queue = 1; | 4711 | processing_queue = 1; |
4711 | phba->sli.sli_flag &= ~LPFC_SLI_MBOX_ACTIVE; | ||
4712 | pmbox = lpfc_mbox_get(phba); | 4712 | pmbox = lpfc_mbox_get(phba); |
4713 | if (!pmbox) { | 4713 | if (!pmbox) { |
4714 | spin_unlock_irqrestore(&phba->hbalock, drvr_flag); | 4714 | spin_unlock_irqrestore(&phba->hbalock, drvr_flag); |