scsi: target: core: Do not overwrite CDB byte 1
authorBodo Stroesser <bstroesser@ts.fujitsu.com>
Mon, 14 Oct 2019 18:29:04 +0000 (20:29 +0200)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 18 Oct 2019 01:40:25 +0000 (21:40 -0400)
commit27e84243cb63601a10e366afe3e2d05bb03c1cb5
treee51119414e326bf89906463e4bfe941ae2e756bb
parent6a0990eaa768dfb7064f06777743acc6d392084b
scsi: target: core: Do not overwrite CDB byte 1

passthrough_parse_cdb() - used by TCMU and PSCSI - attepts to reset the LUN
field of SCSI-2 CDBs (bits 5,6,7 of byte 1).  The current code is wrong as
for newer commands not having the LUN field it overwrites relevant command
bits (e.g. for SECURITY PROTOCOL IN / OUT). We think this code was
unnecessary from the beginning or at least it is no longer useful. So we
remove it entirely.

Link: https://lore.kernel.org/r/12498eab-76fd-eaad-1316-c2827badb76a@ts.fujitsu.com
Signed-off-by: Bodo Stroesser <bstroesser@ts.fujitsu.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/target/target_core_device.c