]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitac2cf3886b8a25e80e9a4c3883422efc53676678
treee51119414e326bf89906463e4bfe941ae2e756bb
parentb9867b3dda81503143b405deec8a1e1c36d06689
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