mirror of https://gitee.com/openkylin/linux.git
scsi: ibmvfc: Use correlation token to tag commands
The vfcFrame correlation field is a 64bit handle that is intended to trace I/O operations through both the client stack and VIOS stack when the underlying physical FC adapter supports tagging. Tag vfcFrames with the associated ibmvfc_event pointer handle. Link: https://lore.kernel.org/r/20201117185031.129939-3-tyreld@linux.ibm.com Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
4e0716199a
commit
2aa0102c66
|
@ -1693,6 +1693,8 @@ static int ibmvfc_queuecommand_lck(struct scsi_cmnd *cmnd,
|
||||||
vfc_cmd->iu.pri_task_attr = IBMVFC_SIMPLE_TASK;
|
vfc_cmd->iu.pri_task_attr = IBMVFC_SIMPLE_TASK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
vfc_cmd->correlation = cpu_to_be64(evt);
|
||||||
|
|
||||||
if (likely(!(rc = ibmvfc_map_sg_data(cmnd, evt, vfc_cmd, vhost->dev))))
|
if (likely(!(rc = ibmvfc_map_sg_data(cmnd, evt, vfc_cmd, vhost->dev))))
|
||||||
return ibmvfc_send_event(evt, vhost, 0);
|
return ibmvfc_send_event(evt, vhost, 0);
|
||||||
|
|
||||||
|
@ -2370,6 +2372,8 @@ static int ibmvfc_abort_task_set(struct scsi_device *sdev)
|
||||||
tmf->iu.tmf_flags = IBMVFC_ABORT_TASK_SET;
|
tmf->iu.tmf_flags = IBMVFC_ABORT_TASK_SET;
|
||||||
evt->sync_iu = &rsp_iu;
|
evt->sync_iu = &rsp_iu;
|
||||||
|
|
||||||
|
tmf->correlation = cpu_to_be64(evt);
|
||||||
|
|
||||||
init_completion(&evt->comp);
|
init_completion(&evt->comp);
|
||||||
rsp_rc = ibmvfc_send_event(evt, vhost, default_timeout);
|
rsp_rc = ibmvfc_send_event(evt, vhost, default_timeout);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue