]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
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)
committerKhalid Elmously <khalid.elmously@canonical.com>
Fri, 14 Feb 2020 05:29:37 +0000 (00:29 -0500)
commitc452368e424d6f6d6b5ce95b112b04c415ff109d
treee0ee8c80cb287c3f5268c0c0569f80c341e0ddb2
parent129e5911d3d60aba7351df71d3e4dd247ec7bbe2
RDMA/srpt: Report the SCSI residual to the initiator

BugLink: https://bugs.launchpad.net/bugs/1861934
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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/infiniband/ulp/srpt/ib_srpt.c