[PATCH] If the list ID is not supported, return TCM_UNSUPPORTED_SCSI_OPCODE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Nic,

To pass the "SCSI.ReceiveCopyResults.CopyStatus" test case of libiscsi test suite:

./libiscsi/test-tool/iscsi-test-cu --test=SCSI.ReceiveCopyResults.CopyStatus --verbose --Verbose-scsi --dataloss 
iscsi://${IP}:3260/${IQN}/0

I propose a patch:

Signed-off-by: Jiang Yi <jiangyilism@xxxxxxxxx>
---
 drivers/target/target_core_xcopy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/target/target_core_xcopy.c b/drivers/target/target_core_xcopy.c
index cac5a20..8654b10 100644
--- a/drivers/target/target_core_xcopy.c
+++ b/drivers/target/target_core_xcopy.c
@@ -1091,7 +1091,7 @@ sense_reason_t target_do_receive_copy_results(struct se_cmd *se_cmd)
 	if (list_id != 0) {
 		pr_err("Receive Copy Results with non zero list identifier"
 		       " not supported\n");
-		return TCM_INVALID_CDB_FIELD;
+		return TCM_UNSUPPORTED_SCSI_OPCODE;
 	}
 
 	switch (sa) {
-- 
2.5.0

                                  by Jiang Yi

--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux