ib_srpt: Sync information unit memory only once

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5351 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2014-03-20 15:19:05 +00:00
parent bfae911b39
commit e61e0beae6

View File

@@ -1856,14 +1856,14 @@ srpt_handle_new_iu(struct srpt_rdma_ch *ch,
BUG_ON(!ch);
BUG_ON(!recv_ioctx);
if (unlikely(ch->state == CH_CONNECTING))
goto push;
ib_dma_sync_single_for_cpu(ch->sport->sdev->device,
recv_ioctx->ioctx.dma, srp_max_req_size,
DMA_FROM_DEVICE);
srp_cmd = recv_ioctx->ioctx.buf;
if (unlikely(ch->state == CH_CONNECTING))
goto push;
if (srp_cmd->opcode == SRP_CMD || srp_cmd->opcode == SRP_TSK_MGMT) {
send_ioctx = srpt_get_send_ioctx(ch);
if (unlikely(!send_ioctx))