]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ibmvscsis: Fix the incorrect req_lim_delta
authorBryant G. Ly <bryantly@linux.vnet.ibm.com>
Wed, 10 May 2017 19:35:47 +0000 (14:35 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 7 Jun 2017 10:10:09 +0000 (12:10 +0200)
commit8d975ebd0a928b7033ac343a1692b253700391c1
tree05e48644b40fb155d76ec6ec51347cc7ea26c35a
parente920be8367e2cbc52d26969450544f993a3e7a5d
ibmvscsis: Fix the incorrect req_lim_delta

commit 75dbf2d36f6b122ad3c1070fe4bf95f71bbff321 upstream.

The current code is not correctly calculating the req_lim_delta.

We want to make sure vscsi->credit is always incremented when
we do not send a response for the scsi op. Thus for the case where
there is a successfully aborted task we need to make sure the
vscsi->credit is incremented.

v2 - Moves the original location of the vscsi->credit increment
to a better spot. Since if we increment credit, the next command
we send back will have increased req_lim_delta. But we probably
shouldn't be doing that until the aborted cmd is actually released.
Otherwise the client will think that it can send a new command, and
we could find ourselves short of command elements. Not likely, but could
happen.

This patch depends on both:
commit 25e78531268e ("ibmvscsis: Do not send aborted task response")
commit 98883f1b5415 ("ibmvscsis: Clear left-over abort_cmd pointers")

Signed-off-by: Bryant G. Ly <bryantly@linux.vnet.ibm.com>
Reviewed-by: Michael Cyr <mikecyr@linux.vnet.ibm.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c