(Adding MNC CC') On Wed, 2017-06-28 at 14:58 +0900, Damien Le Moal wrote: > If the user request handler completed the request with a CHECK CONDITION > status, tcmu_handle_completion() copies the command entry sense data > into the session request structure sense data. However, the sense data > length indicated by the field scsi_sense_length is not set and equal to > 0, resulting in the copy being a no-op and failure to propagate the > sense data back to the initiator. To fix this, properly set the session > command sense data length and also set the session command > SCF_TRANSPORT_TASK_SENSE flag to indicate that the command has valid > sense data. > > Signed-off-by: Damien Le Moal <damien.lemoal@xxxxxxx> > --- > drivers/target/target_core_user.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > Per MNC, skipping this patch in favor of tcmu_handle_completion() using the new transport_copy_sense_to_cmd() helper. https://www.spinics.net/lists/target-devel/msg15435.html