mirror of
https://github.com/torvalds/linux.git
synced 2026-10-14 11:54:03 +02:00
scsi: qla2xxx: Add support for QLA29XX in memory allocation
Enhance the qla2x00_mem_alloc function to include checks for QLA29XX adapters. This modification updates the conditions for memory allocation and cleanup, ensuring proper handling of the new adapter series alongside existing QLA27XX and QLA28XX checks. Signed-off-by: Nilesh Javali <njavali@marvell.com> Reviewed-by: Hannes Reinecke <hare@kernel.org> Link: https://patch.msgid.link/20260723050413.3897522-25-njavali@marvell.com Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
This commit is contained in:
parent
7e51b6d2d8
commit
71037e82d2
|
|
@ -4285,7 +4285,8 @@ qla2x00_mem_alloc(struct qla_hw_data *ha, uint16_t req_len, uint16_t rsp_len,
|
|||
if (!ha->srb_mempool)
|
||||
goto fail_free_gid_list;
|
||||
|
||||
if (IS_P3P_TYPE(ha) || IS_QLA27XX(ha) || (ql2xsecenable && IS_QLA28XX(ha))) {
|
||||
if (IS_P3P_TYPE(ha) || IS_QLA27XX(ha) ||
|
||||
(ql2xsecenable && (IS_QLA28XX(ha) || IS_QLA29XX(ha)))) {
|
||||
/* Allocate cache for CT6 Ctx. */
|
||||
if (!ctx_cachep) {
|
||||
ctx_cachep = kmem_cache_create("qla2xxx_ctx",
|
||||
|
|
@ -4319,7 +4320,8 @@ qla2x00_mem_alloc(struct qla_hw_data *ha, uint16_t req_len, uint16_t rsp_len,
|
|||
"init_cb=%p gid_list=%p, srb_mempool=%p s_dma_pool=%p.\n",
|
||||
ha->init_cb, ha->gid_list, ha->srb_mempool, ha->s_dma_pool);
|
||||
|
||||
if (IS_P3P_TYPE(ha) || ql2xenabledif || (IS_QLA28XX(ha) && ql2xsecenable)) {
|
||||
if (IS_P3P_TYPE(ha) || ql2xenabledif ||
|
||||
((IS_QLA28XX(ha) || IS_QLA29XX(ha)) && ql2xsecenable)) {
|
||||
ha->dl_dma_pool = dma_pool_create(name, &ha->pdev->dev,
|
||||
DSD_LIST_DMA_POOL_SIZE, 8, 0);
|
||||
if (!ha->dl_dma_pool) {
|
||||
|
|
@ -4681,12 +4683,12 @@ qla2x00_mem_alloc(struct qla_hw_data *ha, uint16_t req_len, uint16_t rsp_len,
|
|||
}
|
||||
|
||||
fail_dif_bundl_dma_pool:
|
||||
if (IS_QLA82XX(ha) || ql2xenabledif) {
|
||||
if (IS_QLA82XX(ha) || IS_QLA29XX(ha) || ql2xenabledif) {
|
||||
dma_pool_destroy(ha->fcp_cmnd_dma_pool);
|
||||
ha->fcp_cmnd_dma_pool = NULL;
|
||||
}
|
||||
fail_dl_dma_pool:
|
||||
if (IS_QLA82XX(ha) || ql2xenabledif) {
|
||||
if (IS_QLA82XX(ha) || IS_QLA29XX(ha) || ql2xenabledif) {
|
||||
dma_pool_destroy(ha->dl_dma_pool);
|
||||
ha->dl_dma_pool = NULL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user