]> git.baikalelectronics.ru Git - kernel.git/commit
TARGET/sbc,loopback: Adjust command data length in case pi exists on the wire
authorSagi Grimberg <sagig@mellanox.com>
Wed, 11 Jun 2014 09:09:59 +0000 (12:09 +0300)
committerNicholas Bellinger <nab@linux-iscsi.org>
Wed, 11 Jun 2014 20:06:50 +0000 (13:06 -0700)
commit85c6c078e8d1ef7dd6c7d9712e47cb4373ae5ecc
tree8532312775b3245206db6a91f1d83621f55275df
parent7cee286b096f9e481102b77c3bde736df7b712b1
TARGET/sbc,loopback: Adjust command data length in case pi exists on the wire

In various areas of the code, it is assumed that
se_cmd->data_length describes pure data. In case
that protection information exists over the wire
(protect bits is are on) the target core re-calculates
the data length from the CDB and the backed device
block size (instead of each transport peeking in the cdb).

Modify loopback device to include protection information
in the transferred data length (like other scsi transports).

Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
Cc: stable@vger.kernel.org # 3.15+
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/loopback/tcm_loop.c
drivers/target/target_core_sbc.c