mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-21 04:31:26 +00:00
qla2x00t-32gbit: Move a chunk of code
Move two if-statements from where the 'patch' command dropped them to where these should be. See also r8296. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8298 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -882,6 +882,25 @@ qla2xxx_qpair_sp_free_dma(void *ptr)
|
||||
sp->flags &= ~SRB_DIF_BUNDL_DMA_VALID;
|
||||
}
|
||||
|
||||
if (sp->flags & SRB_FCP_CMND_DMA_VALID) {
|
||||
struct ct6_dsd *ctx1 = ctx;
|
||||
|
||||
dma_pool_free(ha->fcp_cmnd_dma_pool, ctx1->fcp_cmnd,
|
||||
ctx1->fcp_cmnd_dma);
|
||||
list_splice(&ctx1->dsd_list, &ha->gbl_dsd_list);
|
||||
ha->gbl_dsd_inuse -= ctx1->dsd_use_cnt;
|
||||
ha->gbl_dsd_avail += ctx1->dsd_use_cnt;
|
||||
mempool_free(ctx1, ha->ctx_mempool);
|
||||
sp->flags &= ~SRB_FCP_CMND_DMA_VALID;
|
||||
}
|
||||
|
||||
if (sp->flags & SRB_CRC_CTX_DMA_VALID) {
|
||||
struct crc_context *ctx0 = ctx;
|
||||
|
||||
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);
|
||||
@@ -1269,25 +1288,6 @@ qla2x00_wait_for_hba_ready(scsi_qla_host_t *vha)
|
||||
break;
|
||||
msleep(1000);
|
||||
}
|
||||
|
||||
if (sp->flags & SRB_FCP_CMND_DMA_VALID) {
|
||||
struct ct6_dsd *ctx1 = ctx;
|
||||
|
||||
dma_pool_free(ha->fcp_cmnd_dma_pool, ctx1->fcp_cmnd,
|
||||
ctx1->fcp_cmnd_dma);
|
||||
list_splice(&ctx1->dsd_list, &ha->gbl_dsd_list);
|
||||
ha->gbl_dsd_inuse -= ctx1->dsd_use_cnt;
|
||||
ha->gbl_dsd_avail += ctx1->dsd_use_cnt;
|
||||
mempool_free(ctx1, ha->ctx_mempool);
|
||||
sp->flags &= ~SRB_FCP_CMND_DMA_VALID;
|
||||
}
|
||||
|
||||
if (sp->flags & SRB_CRC_CTX_DMA_VALID) {
|
||||
struct crc_context *ctx0 = ctx;
|
||||
|
||||
dma_pool_free(ha->dl_dma_pool, ctx, ctx0->crc_ctx_dma);
|
||||
sp->flags &= ~SRB_CRC_CTX_DMA_VALID;
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
|
||||
Reference in New Issue
Block a user