linux-uconsole/drivers/s390
Julian Wiedmann f3b580d322 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-11 16:19:47 +01:00
..
block s390/dasd: fix wrongly assigned configuration data 2018-03-03 10:19:43 +01:00
char s390/vmlogrdr: fix IUCV buffer allocation 2017-01-09 08:07:49 +01:00
cio s390/qdio: clear DSCI prior to scanning multiple input queues 2017-03-15 09:57:12 +08:00
crypto s390/zcrypt: Introduce CEX6 toleration 2017-03-30 09:35:20 +02:00
net s390/qeth: fix IPA command submission race 2018-03-11 16:19:47 +01:00
scsi scsi: zfcp: fix erp_action use-before-initialize in REC action trace 2017-11-02 09:40:49 +01:00
virtio virtio/s390: handle error values in irb 2015-12-17 10:37:33 +02:00
Makefile virtio/s390: rename drivers/s390/kvm -> drivers/s390/virtio 2015-07-07 14:27:06 +03:00