]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitb5e3949dc673d149acc1ca60a273447db05b3f3b
tree129e6a5d7c3d77f7a427f9d25760f482bf4e361d
parent438c4ed162b96f94e89e5d7dc25e41c393e8ce0e
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