net: ipa: expand last transaction check
authorAlex Elder <elder@linaro.org>
Mon, 1 Feb 2021 17:28:50 +0000 (11:28 -0600)
committerJakub Kicinski <kuba@kernel.org>
Wed, 3 Feb 2021 01:42:36 +0000 (17:42 -0800)
commite63169208b25f1aaf3b6dc47a1df986d260efc3f
tree129e6a5d7c3d77f7a427f9d25760f482bf4e361d
parenta65c0288b355a8bb71f43cf9b4c33ada51e0ec26
net: ipa: expand last transaction check

Transactions to send data for a network device can be allocated at
any time up until the point the TX queue is stopped.  It is possible
for ipa_start_xmit() to be called in one context just before a
the transmit queue is stopped in another.

Update gsi_channel_trans_last() so that for TX channels the
allocated and pending transaction lists are checked--in addition
to the completed and polled lists--to determine the "last"
transaction.  This means any transaction that has been allocated
before the TX queue is stopped will be allowed to complete before
we conclude the channel is quiesced.

Rework the function a bit to use a list pointer and gotos.

Signed-off-by: Alex Elder <elder@linaro.org>
Acked-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ipa/gsi.c