diff options
author | James Smart <james.smart@emulex.com> | 2011-05-24 11:44:12 -0400 |
---|---|---|
committer | James Bottomley <jbottomley@parallels.com> | 2011-05-26 23:49:38 -0400 |
commit | 6d368e532168cb621731b3936945cd910cb25bd0 (patch) | |
tree | 6d49d2dea91c6637ab4cf38b61ec3a0eecc0bdfb /drivers/scsi/lpfc/lpfc_mem.c | |
parent | 52d5244096017bbd11164479116baceaede342b0 (diff) |
[SCSI] lpfc 8.3.24: Add resource extent support
This patch adds support for hardware that returns resource ids via
extents rather than contiguous ranges.
[jejb: checkpatch.pl fixes]
Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com>
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <jbottomley@parallels.com>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_mem.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_mem.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/drivers/scsi/lpfc/lpfc_mem.c b/drivers/scsi/lpfc/lpfc_mem.c index cbb48ee8b0bb..10d5b5e41499 100644 --- a/drivers/scsi/lpfc/lpfc_mem.c +++ b/drivers/scsi/lpfc/lpfc_mem.c | |||
@@ -62,7 +62,6 @@ int | |||
62 | lpfc_mem_alloc(struct lpfc_hba *phba, int align) | 62 | lpfc_mem_alloc(struct lpfc_hba *phba, int align) |
63 | { | 63 | { |
64 | struct lpfc_dma_pool *pool = &phba->lpfc_mbuf_safety_pool; | 64 | struct lpfc_dma_pool *pool = &phba->lpfc_mbuf_safety_pool; |
65 | int longs; | ||
66 | int i; | 65 | int i; |
67 | 66 | ||
68 | if (phba->sli_rev == LPFC_SLI_REV4) | 67 | if (phba->sli_rev == LPFC_SLI_REV4) |
@@ -138,17 +137,8 @@ lpfc_mem_alloc(struct lpfc_hba *phba, int align) | |||
138 | phba->lpfc_hrb_pool = NULL; | 137 | phba->lpfc_hrb_pool = NULL; |
139 | phba->lpfc_drb_pool = NULL; | 138 | phba->lpfc_drb_pool = NULL; |
140 | } | 139 | } |
141 | /* vpi zero is reserved for the physical port so add 1 to max */ | ||
142 | longs = ((phba->max_vpi + 1) + BITS_PER_LONG - 1) / BITS_PER_LONG; | ||
143 | phba->vpi_bmask = kzalloc(longs * sizeof(unsigned long), GFP_KERNEL); | ||
144 | if (!phba->vpi_bmask) | ||
145 | goto fail_free_dbq_pool; | ||
146 | 140 | ||
147 | return 0; | 141 | return 0; |
148 | |||
149 | fail_free_dbq_pool: | ||
150 | pci_pool_destroy(phba->lpfc_drb_pool); | ||
151 | phba->lpfc_drb_pool = NULL; | ||
152 | fail_free_hrb_pool: | 142 | fail_free_hrb_pool: |
153 | pci_pool_destroy(phba->lpfc_hrb_pool); | 143 | pci_pool_destroy(phba->lpfc_hrb_pool); |
154 | phba->lpfc_hrb_pool = NULL; | 144 | phba->lpfc_hrb_pool = NULL; |
@@ -191,9 +181,6 @@ lpfc_mem_free(struct lpfc_hba *phba) | |||
191 | int i; | 181 | int i; |
192 | struct lpfc_dma_pool *pool = &phba->lpfc_mbuf_safety_pool; | 182 | struct lpfc_dma_pool *pool = &phba->lpfc_mbuf_safety_pool; |
193 | 183 | ||
194 | /* Free VPI bitmask memory */ | ||
195 | kfree(phba->vpi_bmask); | ||
196 | |||
197 | /* Free HBQ pools */ | 184 | /* Free HBQ pools */ |
198 | lpfc_sli_hbqbuf_free_all(phba); | 185 | lpfc_sli_hbqbuf_free_all(phba); |
199 | if (phba->lpfc_drb_pool) | 186 | if (phba->lpfc_drb_pool) |