aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_os.c
diff options
context:
space:
mode:
authorAndrew Vasquez <andrew.vasquez@qlogic.com>2009-03-24 12:08:01 -0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2009-04-03 10:22:46 -0400
commitb64b0e8fd964ce637794d4aaa772db1ae4298ea9 (patch)
tree676892927a4ec44afdb682ab30a58a30e1d50bfd /drivers/scsi/qla2xxx/qla_os.c
parentdda772e8e3b9832d3368f84df3a3b7ec7dfbd9f0 (diff)
[SCSI] qla2xxx: Pass in optional extended-initialization control block.
Recent ISPs use this data to configure FCF information. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_os.c')
-rw-r--r--drivers/scsi/qla2xxx/qla_os.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index 41ff7d69bd64..dad624e11717 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -2203,9 +2203,19 @@ qla2x00_mem_alloc(struct qla_hw_data *ha, uint16_t req_len, uint16_t rsp_len,
2203 } else 2203 } else
2204 ha->npiv_info = NULL; 2204 ha->npiv_info = NULL;
2205 2205
2206 /* Get consistent memory allocated for EX-INIT-CB. */
2207 if (IS_QLA81XX(ha)) {
2208 ha->ex_init_cb = dma_pool_alloc(ha->s_dma_pool, GFP_KERNEL,
2209 &ha->ex_init_cb_dma);
2210 if (!ha->ex_init_cb)
2211 goto fail_ex_init_cb;
2212 }
2213
2206 INIT_LIST_HEAD(&ha->vp_list); 2214 INIT_LIST_HEAD(&ha->vp_list);
2207 return 1; 2215 return 1;
2208 2216
2217fail_ex_init_cb:
2218 kfree(ha->npiv_info);
2209fail_npiv_info: 2219fail_npiv_info:
2210 dma_free_coherent(&ha->pdev->dev, ((*rsp)->length + 1) * 2220 dma_free_coherent(&ha->pdev->dev, ((*rsp)->length + 1) *
2211 sizeof(response_t), (*rsp)->ring, (*rsp)->dma); 2221 sizeof(response_t), (*rsp)->ring, (*rsp)->dma);
@@ -2291,15 +2301,16 @@ qla2x00_mem_free(struct qla_hw_data *ha)
2291 if (ha->ms_iocb) 2301 if (ha->ms_iocb)
2292 dma_pool_free(ha->s_dma_pool, ha->ms_iocb, ha->ms_iocb_dma); 2302 dma_pool_free(ha->s_dma_pool, ha->ms_iocb, ha->ms_iocb_dma);
2293 2303
2304 if (ha->ex_init_cb)
2305 dma_pool_free(ha->s_dma_pool, ha->ex_init_cb, ha->ex_init_cb_dma);
2306
2294 if (ha->s_dma_pool) 2307 if (ha->s_dma_pool)
2295 dma_pool_destroy(ha->s_dma_pool); 2308 dma_pool_destroy(ha->s_dma_pool);
2296 2309
2297
2298 if (ha->gid_list) 2310 if (ha->gid_list)
2299 dma_free_coherent(&ha->pdev->dev, GID_LIST_SIZE, ha->gid_list, 2311 dma_free_coherent(&ha->pdev->dev, GID_LIST_SIZE, ha->gid_list,
2300 ha->gid_list_dma); 2312 ha->gid_list_dma);
2301 2313
2302
2303 if (ha->init_cb) 2314 if (ha->init_cb)
2304 dma_free_coherent(&ha->pdev->dev, ha->init_cb_size, 2315 dma_free_coherent(&ha->pdev->dev, ha->init_cb_size,
2305 ha->init_cb, ha->init_cb_dma); 2316 ha->init_cb, ha->init_cb_dma);
@@ -2318,6 +2329,8 @@ qla2x00_mem_free(struct qla_hw_data *ha)
2318 ha->ms_iocb_dma = 0; 2329 ha->ms_iocb_dma = 0;
2319 ha->init_cb = NULL; 2330 ha->init_cb = NULL;
2320 ha->init_cb_dma = 0; 2331 ha->init_cb_dma = 0;
2332 ha->ex_init_cb = NULL;
2333 ha->ex_init_cb_dma = 0;
2321 2334
2322 ha->s_dma_pool = NULL; 2335 ha->s_dma_pool = NULL;
2323 2336