linux/drivers/s390/net
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>
History 2018-03-08 22:41:20 -08:00
..
ctcm_dbug.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ctcm_dbug.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ctcm_fsms.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ctcm_fsms.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ctcm_main.c s390/net: reduce inlining 2017-08-15 10:58:40 -07:00
ctcm_main.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ctcm_mpc.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ctcm_mpc.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ctcm_sysfs.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
fsm.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
fsm.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Kconfig s390: remove claw driver 2015-02-28 23:38:29 -05:00
lcs.c s390/net: reduce inlining 2017-08-15 10:58:40 -07:00
lcs.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
netiucv.c s390/net: reduce inlining 2017-08-15 10:58:40 -07:00
qeth_core.h s390/qeth: fix SETIP command handling 2018-03-08 22:41:18 -08:00
qeth_core_main.c s390/qeth: fix IPA command submission race 2018-03-08 22:41:20 -08:00
qeth_core_mpc.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
qeth_core_mpc.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
qeth_core_sys.c s390/net: reduce inlining 2017-08-15 10:58:40 -07:00
qeth_l2.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
qeth_l2_main.c s390/qeth: fix GSO throughput regression 2017-12-17 15:07:57 +01:00
qeth_l2_sys.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
qeth_l3.h s390/qeth: fix IP address lookup for L3 devices 2018-03-08 22:41:19 -08:00
qeth_l3_main.c s390/qeth: fix IP address lookup for L3 devices 2018-03-08 22:41:19 -08:00
qeth_l3_sys.c s390/qeth: update takeover IPs after configuration change 2018-01-02 20:31:08 +01:00
smsgiucv.c s390/iucv: do not use arrays as argument 2015-09-21 16:03:04 -07:00
smsgiucv.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
smsgiucv_app.c Driver core: driver_find() drops reference before returning 2012-01-24 16:00:34 -08:00