OpenCloudOS-Kernel/drivers/s390
Julian Wiedmann d22ffb5a71 s390/qeth: fix IPA command submission race
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>
2018-02-28 11:13:12 -05:00
..
block vfs: do bulk POLL* -> EPOLL* replacement 2018-02-11 14:34:03 -08:00
char vfs: do bulk POLL* -> EPOLL* replacement 2018-02-11 14:34:03 -08:00
cio s390/cio: fix kernel-doc usage 2018-02-05 07:34:52 +01:00
crypto treewide: Use DEVICE_ATTR_RO 2018-01-09 16:34:34 +01:00
net s390/qeth: fix IPA command submission race 2018-02-28 11:13:12 -05:00
scsi s390: add a few more SPDX identifiers 2017-12-05 07:51:09 +01:00
virtio virtio/s390: implement PM operations for virtio_ccw 2018-02-14 14:34:09 +02:00
Makefile s390: add a few more SPDX identifiers 2017-12-05 07:51:09 +01:00