Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 406f74c2 authored by Mike Christie's avatar Mike Christie Committed by Nicholas Bellinger
Browse files

tcmu: fix sense handling during completion



We were just copying the sense to the cmd sense_buffer and
did not implement a transport_complete or set the
SCF_TRANSPORT_TASK_SENSE, so the sense was ignored.

Signed-off-by: default avatarMike Christie <mchristi@redhat.com>
Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
parent c6d66aba
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -956,8 +956,7 @@ static void tcmu_handle_completion(struct tcmu_cmd *cmd, struct tcmu_cmd_entry *
			cmd->se_cmd);
			cmd->se_cmd);
		entry->rsp.scsi_status = SAM_STAT_CHECK_CONDITION;
		entry->rsp.scsi_status = SAM_STAT_CHECK_CONDITION;
	} else if (entry->rsp.scsi_status == SAM_STAT_CHECK_CONDITION) {
	} else if (entry->rsp.scsi_status == SAM_STAT_CHECK_CONDITION) {
		memcpy(se_cmd->sense_buffer, entry->rsp.sense_buffer,
		transport_copy_sense_to_cmd(se_cmd, entry->rsp.sense_buffer);
			       se_cmd->scsi_sense_length);
	} else if (se_cmd->se_cmd_flags & SCF_BIDI) {
	} else if (se_cmd->se_cmd_flags & SCF_BIDI) {
		/* Get Data-In buffer before clean up */
		/* Get Data-In buffer before clean up */
		gather_data_area(udev, cmd, true);
		gather_data_area(udev, cmd, true);