OSDN Git Service

RDMA/srpt: Report the SCSI residual to the initiator
authorBart Van Assche <bvanassche@acm.org>
Tue, 5 Nov 2019 21:46:32 +0000 (13:46 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 Jan 2020 18:47:03 +0000 (19:47 +0100)
commit6a02b3d19e914f23f76ffd8fe8cdb25f8e80d434
treea26d42d5893c858274c02a69c3d158a8b5e9875d
parentd872c9fcea1c3f674b7016d407cf7d0999c8754d
RDMA/srpt: Report the SCSI residual to the initiator

commit e88982ad1bb12db699de96fbc07096359ef6176c upstream.

The code added by this patch is similar to the code that already exists in
ibmvscsis_determine_resid(). This patch has been tested by running the
following command:

strace sg_raw -r 1k /dev/sdb 12 00 00 00 60 00 -o inquiry.bin |&
    grep resid=

Link: https://lore.kernel.org/r/20191105214632.183302-1-bvanassche@acm.org
Fixes: a42d985bd5b2 ("ib_srpt: Initial SRP Target merge for v3.3-rc1")
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Acked-by: Honggang Li <honli@redhat.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/infiniband/ulp/srpt/ib_srpt.c