From eb5a54f8802fca0ca8a7a96734f7bd0764e26678 Mon Sep 17 00:00:00 2001 From: Alexander Motin Date: Sun, 25 Oct 2020 16:58:48 +0000 Subject: [PATCH] Fix incorrect constants of target tag action. ocs_scsi_recv_cmd() receives the flags after ocs_get_flags_fcp_cmd(), which translates them from FCP_TASK_ATTR_* to OCS_SCSI_CMD_*. As result non-SIMPLE requests turned into HEAD or ORDERED depending on direction. MFC after: 2 weeks --- sys/dev/ocs_fc/ocs_cam.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/ocs_fc/ocs_cam.c b/sys/dev/ocs_fc/ocs_cam.c index 70d15f760938..e098997025c9 100644 --- a/sys/dev/ocs_fc/ocs_cam.c +++ b/sys/dev/ocs_fc/ocs_cam.c @@ -576,9 +576,9 @@ int32_t ocs_scsi_recv_cmd(ocs_io_t *io, uint64_t lun, uint8_t *cdb, if (flags & OCS_SCSI_CMD_SIMPLE) atio->tag_action = MSG_SIMPLE_Q_TAG; - else if (flags & FCP_TASK_ATTR_HEAD_OF_QUEUE) + else if (flags & OCS_SCSI_CMD_HEAD_OF_QUEUE) atio->tag_action = MSG_HEAD_OF_Q_TAG; - else if (flags & FCP_TASK_ATTR_ORDERED) + else if (flags & OCS_SCSI_CMD_ORDERED) atio->tag_action = MSG_ORDERED_Q_TAG; else atio->tag_action = 0;