Commit 0cd2f869 authored by Shuhei Matsumoto's avatar Shuhei Matsumoto Committed by Jim Harris
Browse files

iscsi: Remove resdiual count variables about unsupported bidirectional command



There is not any plan to support bidirectional command. To understand implementation
of residual count a little easier, remove residual count variables about unsupported
bidirectional command.

Change-Id: I1154e2e2708cc47c5bd4630ce9a91980f433fef8
Signed-off-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/417216


Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent c3b82474
Loading
Loading
Loading
Loading
+4 −13
Original line number Diff line number Diff line
@@ -3109,8 +3109,7 @@ void spdk_iscsi_task_response(struct spdk_iscsi_conn *conn,
	uint32_t transfer_len;
	size_t residual_len;
	size_t data_len;
	int o_bit, u_bit, O_bit, U_bit;
	int bidi_residual_len;
	int O_bit, U_bit;
	int rc;
	struct spdk_iscsi_task *primary;

@@ -3133,8 +3132,8 @@ void spdk_iscsi_task_response(struct spdk_iscsi_conn *conn,
		}
	}

	o_bit = u_bit = O_bit = U_bit = 0;
	bidi_residual_len = residual_len = 0;
	O_bit = U_bit = 0;
	residual_len = 0;
	data_len = primary->scsi.data_transferred;

	if ((transfer_len != 0) &&
@@ -3173,14 +3172,6 @@ void spdk_iscsi_task_response(struct spdk_iscsi_conn *conn,
	rsph->opcode = ISCSI_OP_SCSI_RSP;
	rsph->flags |= 0x80; /* bit 0 is default to 1 */

	if (o_bit) {
		rsph->flags |= ISCSI_SCSI_BIDI_OVERFLOW;
	}

	if (u_bit) {
		rsph->flags |= ISCSI_SCSI_BIDI_UNDERFLOW;
	}

	if (O_bit) {
		rsph->flags |= ISCSI_SCSI_OVERFLOW;
	}
@@ -3206,7 +3197,7 @@ void spdk_iscsi_task_response(struct spdk_iscsi_conn *conn,
	to_be32(&rsph->exp_cmd_sn, conn->sess->ExpCmdSN);
	to_be32(&rsph->max_cmd_sn, conn->sess->MaxCmdSN);

	to_be32(&rsph->bi_read_res_cnt, bidi_residual_len);
	to_be32(&rsph->bi_read_res_cnt, 0);
	to_be32(&rsph->res_cnt, residual_len);

	spdk_iscsi_conn_write_pdu(conn, rsp_pdu);