qla2xxx-32gbit: Move the qla2x00_rel_sp() calls from *_free_dma() into *_sp_compl()

See also upstream commit 711a08d79f71 ("scsi: qla2xxx: Change abort wait_loop
from msleep to wait_event_timeout").



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8337 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2019-05-04 03:10:54 +00:00
parent 302850c3b1
commit 6c9dddf26f
2 changed files with 7 additions and 13 deletions

View File

@@ -4837,5 +4837,4 @@ struct sff_8247_a0 {
#include "qla_gbl.h"
#include "qla_dbg.h"
#include "qla_inline.h"
#endif

View File

@@ -702,7 +702,7 @@ qla2x00_sp_free_dma(void *ptr)
}
if (!ctx)
goto end;
return;
if (sp->flags & SRB_CRC_CTX_DSD_VALID) {
/* List assured to be having elements */
@@ -727,12 +727,6 @@ qla2x00_sp_free_dma(void *ptr)
ha->gbl_dsd_avail += ctx1->dsd_use_cnt;
mempool_free(ctx1, ha->ctx_mempool);
}
end:
if (sp->type != SRB_NVME_CMD && sp->type != SRB_NVME_LS) {
CMD_SP(cmd) = NULL;
qla2x00_rel_sp(sp);
}
}
void
@@ -749,9 +743,11 @@ qla2x00_sp_compl(void *ptr, int res)
sp->free(sp);
cmd->result = res;
CMD_SP(cmd) = NULL;
cmd->scsi_done(cmd);
if (comp)
complete(comp);
qla2x00_rel_sp(sp);
}
void
@@ -774,7 +770,7 @@ qla2xxx_qpair_sp_free_dma(void *ptr)
}
if (!ctx)
goto end;
return;
if (sp->flags & SRB_CRC_CTX_DSD_VALID) {
/* List assured to be having elements */
@@ -836,10 +832,6 @@ qla2xxx_qpair_sp_free_dma(void *ptr)
dma_pool_free(ha->dl_dma_pool, ctx, ctx0->crc_ctx_dma);
sp->flags &= ~SRB_CRC_CTX_DMA_VALID;
}
end:
CMD_SP(cmd) = NULL;
qla2xxx_rel_qpair_sp(sp->qpair, sp);
}
void
@@ -855,9 +847,12 @@ qla2xxx_qpair_sp_compl(void *ptr, int res)
atomic_dec(&sp->ref_count);
sp->free(sp);
cmd->result = res;
CMD_SP(cmd) = NULL;
cmd->scsi_done(cmd);
if (comp)
complete(comp);
qla2xxx_rel_qpair_sp(sp->qpair, sp);
}
#if defined(RHEL_MAJOR) && RHEL_MAJOR -0 == 6 && RHEL_MINOR -0 >= 2