On Tue, 2011-12-13 at 14:55 -0800, Roland Dreier wrote: > From: Roland Dreier <roland@xxxxxxxxxxxxxxx> > > The target code was not setting the additional sense length field in the > sense data it returned, which meant that at least the Linux stack > ignored the ASC/ASCQ fields. For example, without this patch, on a > tcm_loop device: > > # sg_raw -v /dev/sda 2 0 0 0 0 0 > > gives > > cdb to send: 02 00 00 00 00 00 > SCSI Status: Check Condition > > Sense Information: > Fixed format, current; Sense key: Illegal Request > Raw sense data (in hex): > 70 00 05 00 00 00 00 00 > > while after the patch we correctly get the following (which matches what > a regular disk returns): > > cdb to send: 02 00 00 00 00 00 > SCSI Status: Check Condition > > Sense Information: > Fixed format, current; Sense key: Illegal Request > Additional sense: Invalid command operation code > Raw sense data (in hex): > 70 00 05 00 00 00 00 0a 00 00 00 00 20 00 00 00 > 00 00 > > Signed-off-by: Roland Dreier <roland@xxxxxxxxxxxxxxx> > --- > drivers/target/target_core_transport.c | 14 ++++++++++++++ > include/target/target_core_base.h | 1 + > 2 files changed, 15 insertions(+), 0 deletions(-) > Hi Roland, My apologies for the delayed response here. I've committed this bugfix into lio-core/master and pushing into target-pending/for-next shortly with a Cc to stable. Thanks, --nab -- 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