EXTENDED COPY tests in libiscsi [1] show that TCM doesn't follow SPC4 when detects invalid parameters in a XCOPY command or IO errors. The replies from TCM contain wrong sense key or ASCQ for incorrect request. The series fixes the following tests from libiscsi: SCSI.ExtendedCopy.DescrType SCSI.ExtendedCopy.DescrLimits SCSI.ExtendedCopy.ParamHdr SCSI.ExtendedCopy.ValidSegDescr SCSI.ExtendedCopy.ValidTgtDescr 1. https://github.com/sahlberg/libiscsi Sergey Samoylenko (2): scsi: target: allows backend drivers to fail with specific sense codes scsi: target: fix sense key for invalid XCOPY request drivers/target/target_core_transport.c | 15 ++++++++++++--- drivers/target/target_core_xcopy.c | 26 +++++++++++++++----------- include/target/target_core_backend.h | 1 + include/target/target_core_base.h | 2 ++ 4 files changed, 30 insertions(+), 14 deletions(-) -- 2.25.1