Commit 809dadb1 authored by Hannes Reinecke's avatar Hannes Reinecke Committed by Martin K. Petersen
Browse files

scsi: esp_scsi: Do not set SCSI message byte

The message byte setting always devolves to COMMAND_COMPLETE so we can drop
setting the message byte in the SCSI result.

Link: https://lore.kernel.org/r/20210113090500.129644-30-hare@suse.de


Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarHannes Reinecke <hare@suse.de>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 6b50529e
Loading
Loading
Loading
Loading
+1 −4
Original line number Original line Diff line number Diff line
@@ -907,10 +907,8 @@ static void esp_cmd_is_done(struct esp *esp, struct esp_cmd_entry *ent,
	esp_free_lun_tag(ent, dev->hostdata);
	esp_free_lun_tag(ent, dev->hostdata);
	cmd->result = 0;
	cmd->result = 0;
	set_host_byte(cmd, host_byte);
	set_host_byte(cmd, host_byte);
	if (host_byte == DID_OK) {
	if (host_byte == DID_OK)
		set_msg_byte(cmd, ent->message);
		set_status_byte(cmd, ent->status);
		set_status_byte(cmd, ent->status);
	}


	if (ent->eh_done) {
	if (ent->eh_done) {
		complete(ent->eh_done);
		complete(ent->eh_done);
@@ -926,7 +924,6 @@ static void esp_cmd_is_done(struct esp *esp, struct esp_cmd_entry *ent,
		 */
		 */
		cmd->result = ((DRIVER_SENSE << 24) |
		cmd->result = ((DRIVER_SENSE << 24) |
			       (DID_OK << 16) |
			       (DID_OK << 16) |
			       (COMMAND_COMPLETE << 8) |
			       (SAM_STAT_CHECK_CONDITION << 0));
			       (SAM_STAT_CHECK_CONDITION << 0));


		ent->flags &= ~ESP_CMD_FLAG_AUTOSENSE;
		ent->flags &= ~ESP_CMD_FLAG_AUTOSENSE;