From 0d21ef4e239c755574cbf7a3cd377f8b71f0354c Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Fri, 25 Jun 2010 10:23:20 +0000 Subject: [PATCH] Fix for wrong endianness in scst_cmd_set_tgt_sn() call. Reported by Phil White git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1785 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- iscsi-scst/kernel/iscsi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/iscsi-scst/kernel/iscsi.c b/iscsi-scst/kernel/iscsi.c index e521b052c..7fe6e4cfb 100644 --- a/iscsi-scst/kernel/iscsi.c +++ b/iscsi-scst/kernel/iscsi.c @@ -1962,8 +1962,8 @@ static int scsi_cmnd_start(struct iscsi_cmnd *req) break; } - /* cmd_sn is already in CPU format converted in check_cmd_sn() */ - scst_cmd_set_tgt_sn(scst_cmd, req_hdr->cmd_sn); + /* check_cmd_sn() not called yet to convert cmd_sn in the CPU format */ + scst_cmd_set_tgt_sn(scst_cmd, be32_to_cpu(req_hdr->cmd_sn)); ahdr = (struct iscsi_ahs_hdr *)req->pdu.ahs; if (ahdr != NULL) {