]> git.baikalelectronics.ru Git - kernel.git/commit
s390/qeth: fix notification for pending buffers during teardown
authorJulian Wiedmann <jwi@linux.ibm.com>
Tue, 9 Mar 2021 16:52:21 +0000 (17:52 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 10 Mar 2021 00:14:54 +0000 (16:14 -0800)
commit91c9a87e83c05e8e0a8b19861aeeefe801dead78
treec2e5f24784164916d6bbace9556bfd57111a4882
parentf414eefc7367dcce7ccb9a99a7b601a9db3aa296
s390/qeth: fix notification for pending buffers during teardown

The cited commit reworked the state machine for pending TX buffers.
In qeth_iqd_tx_complete() it turned PENDING into a transient state, and
uses NEED_QAOB for buffers that get parked while waiting for their QAOB
completion.

But it missed to adjust the check in qeth_tx_complete_buf(). So if
qeth_tx_complete_pending_bufs() is called during teardown to drain
the parked TX buffers, we no longer raise a notification for af_iucv.

Instead of updating the checked state, just move this code into
qeth_tx_complete_pending_bufs() itself. This also gets rid of the
special-case in the common TX completion path.

Fixes: 6234f85ba6ae ("s390/qeth: fix af_iucv notification race")
Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/s390/net/qeth_core_main.c