summaryrefslogtreecommitdiffstats
path: root/drivers/net/ipa/gsi_trans.h
diff options
context:
space:
mode:
authorAlex Elder <elder@linaro.org>2022-02-03 11:09:24 -0600
committerDavid S. Miller <davem@davemloft.net>2022-02-04 10:16:08 +0000
commit5fc7f9ba2e510fe725f0fff6ddfe824f7184da03 (patch)
tree05e915a95ff8af560faa4844e382b7e41653fbbb /drivers/net/ipa/gsi_trans.h
parentd0ac30e74ea096d2e2fd4e6ebce1113b8b8e8ada (diff)
downloadlinux-stable-5fc7f9ba2e510fe725f0fff6ddfe824f7184da03.tar.gz
linux-stable-5fc7f9ba2e510fe725f0fff6ddfe824f7184da03.tar.bz2
linux-stable-5fc7f9ba2e510fe725f0fff6ddfe824f7184da03.zip
net: ipa: introduce gsi_channel_trans_idle()
Create a new function that returns true if all transactions for a channel are available for use. Use it in ipa_endpoint_replenish_enable() to see whether to start replenishing, and in ipa_endpoint_replenish() to determine whether it's necessary after a failure to schedule delayed work to ensure a future replenish attempt occurs. Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ipa/gsi_trans.h')
-rw-r--r--drivers/net/ipa/gsi_trans.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/ipa/gsi_trans.h b/drivers/net/ipa/gsi_trans.h
index 17fd1822d8a9..af379b49299e 100644
--- a/drivers/net/ipa/gsi_trans.h
+++ b/drivers/net/ipa/gsi_trans.h
@@ -130,6 +130,16 @@ void *gsi_trans_pool_alloc_dma(struct gsi_trans_pool *pool, dma_addr_t *addr);
void gsi_trans_pool_exit_dma(struct device *dev, struct gsi_trans_pool *pool);
/**
+ * gsi_channel_trans_idle() - Return whether no transactions are allocated
+ * @gsi: GSI pointer
+ * @channel_id: Channel the transaction is associated with
+ *
+ * Return: True if no transactions are allocated, false otherwise
+ *
+ */
+bool gsi_channel_trans_idle(struct gsi *gsi, u32 channel_id);
+
+/**
* gsi_channel_trans_alloc() - Allocate a GSI transaction on a channel
* @gsi: GSI pointer
* @channel_id: Channel the transaction is associated with