iscsi: replace magic numbers with SCSI constants

Change-Id: I9b33b038a019576d162c868e2021db1c6589b4f4
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/362061
Tested-by: <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
Daniel Verkamp 2017-05-18 15:03:45 -07:00
parent afbb5ceec2
commit 54cfee2e84

View File

@ -3285,12 +3285,12 @@ spdk_iscsi_op_task(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu *pdu)
return SPDK_SUCCESS;
case ISCSI_TASK_FUNC_CLEAR_TASK_SET:
task->scsi.response = 5; /* not supported. */
task->scsi.response = SPDK_SCSI_TASK_MGMT_RESP_REJECT_FUNC_NOT_SUPPORTED;
SPDK_NOTICELOG("CLEAR_TASK_SET (Unsupported)\n");
break;
case ISCSI_TASK_FUNC_CLEAR_ACA:
task->scsi.response = 5; /* not supported. */
task->scsi.response = SPDK_SCSI_TASK_MGMT_RESP_REJECT_FUNC_NOT_SUPPORTED;
SPDK_NOTICELOG("CLEAR_ACA (Unsupported)\n");
break;
@ -3310,7 +3310,7 @@ spdk_iscsi_op_task(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu *pdu)
if (rc < 0)
SPDK_ERRLOG("tgt_node reset failed\n");
#else
task->scsi.response = 5; /* not supported */
task->scsi.response = SPDK_SCSI_TASK_MGMT_RESP_REJECT_FUNC_NOT_SUPPORTED;
#endif
break;
@ -3326,18 +3326,18 @@ spdk_iscsi_op_task(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu *pdu)
conn->state = ISCSI_CONN_STATE_EXITING;
#else
task->scsi.response = 5; /* not supported */
task->scsi.response = SPDK_SCSI_TASK_MGMT_RESP_REJECT_FUNC_NOT_SUPPORTED;
#endif
break;
case ISCSI_TASK_FUNC_TASK_REASSIGN:
SPDK_NOTICELOG("TASK_REASSIGN (Unsupported)\n");
task->scsi.response = 5; /* not supported */
task->scsi.response = SPDK_SCSI_TASK_MGMT_RESP_REJECT_FUNC_NOT_SUPPORTED;
break;
default:
SPDK_ERRLOG("unsupported function %d\n", function);
task->scsi.response = 255; /* Function rejected. */
task->scsi.response = SPDK_SCSI_TASK_MGMT_RESP_REJECT;
break;
}