Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

scsi: qla2xxx: edif: Fix I/O timeout due to over-subscription

The current edif code does not keep track of FW IOCB resources. This led
to IOCB queue full on error recovery (I/O timeout). Make use of the
existing code that tracks IOCB resources to prevent over-subscription.

Link: https://lore.kernel.org/r/20220608115849.16693-2-njavali@marvell.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Quinn Tran <qutran@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Quinn Tran and committed by
Martin K. Petersen
63ab6cb5 3fd3a52c

+7
+7
drivers/scsi/qla2xxx/qla_edif.c
··· 2951 2951 2952 2952 tot_dsds = nseg; 2953 2953 req_cnt = qla24xx_calc_iocbs(vha, tot_dsds); 2954 + 2955 + sp->iores.res_type = RESOURCE_INI; 2956 + sp->iores.iocb_cnt = req_cnt; 2957 + if (qla_get_iocbs(sp->qpair, &sp->iores)) 2958 + goto queuing_error; 2959 + 2954 2960 if (req->cnt < (req_cnt + 2)) { 2955 2961 cnt = IS_SHADOW_REG_CAPABLE(ha) ? *req->out_ptr : 2956 2962 rd_reg_dword(req->req_q_out); ··· 3148 3142 mempool_free(sp->u.scmd.ct6_ctx, ha->ctx_mempool); 3149 3143 sp->u.scmd.ct6_ctx = NULL; 3150 3144 } 3145 + qla_put_iocbs(sp->qpair, &sp->iores); 3151 3146 spin_unlock_irqrestore(lock, flags); 3152 3147 3153 3148 return QLA_FUNCTION_FAILED;