]> git.baikalelectronics.ru Git - kernel.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)
committerNicholas Bellinger <nab@linux-iscsi.org>
Tue, 16 May 2017 03:20:03 +0000 (20:20 -0700)
commitea00073c593e3abf8307d8dd8d6c0d1bb2135d77
tree9e135b4387de6e238458b088d9313c4dae5a7d91
parentc0dc735d4df835b984544d0eb9782368aa3cf675
ibmvscsis: Fix the incorrect req_lim_delta

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 7e8c6892e847 ("ibmvscsis: Do not send aborted task response")
commit c0dc735d4df8 ("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>
Cc: <stable@vger.kernel.org> # v4.8+
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c