Commit dd8e34af authored by John Garry's avatar John Garry Committed by Christoph Hellwig
Browse files

nvme: fix endianness of command word prints in nvme_log_err_passthru()



The command word members of struct nvme_common_command are __le32 type,
so use helper le32_to_cpu() to read them properly.

Fixes: 9f079dda ("nvme: allow passthru cmd error logging")
Signed-off-by: default avatarJohn Garry <john.g.garry@oracle.com>
Reviewed-by: default avatarAlan Adamson <alan.adamson@oracle.com>
Reviewed-by: default avatarKeith Busch <kbusch@kernel.org>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent 80d7762e
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -381,12 +381,12 @@ static void nvme_log_err_passthru(struct request *req)
		nr->status & NVME_SC_MASK,	/* Status Code */
		nr->status & NVME_STATUS_MORE ? "MORE " : "",
		nr->status & NVME_STATUS_DNR  ? "DNR "  : "",
		nr->cmd->common.cdw10,
		nr->cmd->common.cdw11,
		nr->cmd->common.cdw12,
		nr->cmd->common.cdw13,
		nr->cmd->common.cdw14,
		nr->cmd->common.cdw15);
		le32_to_cpu(nr->cmd->common.cdw10),
		le32_to_cpu(nr->cmd->common.cdw11),
		le32_to_cpu(nr->cmd->common.cdw12),
		le32_to_cpu(nr->cmd->common.cdw13),
		le32_to_cpu(nr->cmd->common.cdw14),
		le32_to_cpu(nr->cmd->common.cdw15));
}

enum nvme_disposition {