]> git.baikalelectronics.ru Git - kernel.git/commit
IB/srp: Fix residual handling
authorBart Van Assche <bvanassche@acm.org>
Wed, 9 Jul 2014 13:57:51 +0000 (15:57 +0200)
committerRoland Dreier <roland@purestorage.com>
Fri, 1 Aug 2014 22:21:51 +0000 (15:21 -0700)
commit4adec51525fd42df7188397c46c7c1c3f9856009
tree4df5f32ed7c50dd14437b83cc25fb52dd5ba82ce
parentf819f450a0f410874d47afebcde074c558dae233
IB/srp: Fix residual handling

From Documentation/scsi/scsi_mid_low_api.txt: "resid - an LLD should
set this signed integer to the requested transfer length (i.e.
'request_bufflen') less the number of bytes that are actually
transferred."  This means that resid > 0 in case of an underrun and
also that resid < 0 in case of an overrun.  Modify the SRP initiator
code such that it matches this requirement.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Sagi Grimberg <sagig@mellanox.com>
Reviewed-by: David Dillow <dave@thedillows.org>
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/infiniband/ulp/srp/ib_srp.c