linux-stable/drivers/s390
Julian Wiedmann c5f32462f0 s390/qeth: fix IPA command submission race
[ Upstream commit d22ffb5a71 ]

If multiple IPA commands are build & sent out concurrently,
fill_ipacmd_header() may assign a seqno value to a command that's
different from what send_control_data() later assigns to this command's
reply.
This is due to other commands passing through send_control_data(),
and incrementing card->seqno.ipa along the way.

So one IPA command has no reply that's waiting for its seqno, while some
other IPA command has multiple reply objects waiting for it.
Only one of those waiting replies wins, and the other(s) times out and
triggers a recovery via send_ipa_cmd().

Fix this by making sure that the same seqno value is assigned to
a command and its reply object.
Do so immediately before submitting the command & while holding the
irq_pending "lock", to produce nicely ascending seqnos.

As a side effect, *all* IPA commands now use a reply object that's
waiting for its actual seqno. Previously, early IPA commands that were
submitted while the card was still DOWN used the "catch-all" IDX seqno.

Signed-off-by: Julian Wiedmann <jwi@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-08 22:41:20 -08:00
..
block s390/dasd: fix wrongly assigned configuration data 2018-03-03 10:24:32 +01:00
char License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
cio s390: vfio-ccw: Do not attempt to free no-op, test and tic cda. 2017-12-10 13:40:38 +01:00
crypto s390/zcrypt: Fix wrong comparison leading to strange load balancing 2018-02-03 17:38:59 +01:00
net s390/qeth: fix IPA command submission race 2018-03-08 22:41:20 -08:00
scsi License cleanup: add SPDX license identifiers to some files 2017-11-02 10:04:46 -07:00
virtio Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux 2017-05-16 09:24:44 -07:00
Makefile virtio/s390: rename drivers/s390/kvm -> drivers/s390/virtio 2015-07-07 14:27:06 +03:00