summaryrefslogtreecommitdiff
path: root/drivers/net/ipa/gsi.h
diff options
context:
space:
mode:
authorAlex Elder <elder@linaro.org>2022-08-31 17:40:13 -0500
committerDavid S. Miller <davem@davemloft.net>2022-09-02 12:08:44 +0100
commit41e2a2c054b884abaa4e3c6de628ba32beccfc9b (patch)
treec1ccc0fdf6f5d77d46e89ea2f75684b97cfa2c60 /drivers/net/ipa/gsi.h
parent12382d11670e893f976ae19087fde2f83ed4813d (diff)
net: ipa: track allocated transactions with an ID
Transactions for a channel are now managed in an array, with a free transaction ID indicating which is the next one free. Add another transaction ID field to track the first element in the array that has been allocated. Advance it when a transaction is committed (because that is when that transaction leaves allocated state). Temporarily add warnings that verify that the first allocated transaction tracked by the ID matches the first element on the allocated list, both when allocating and committing a transaction. Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ipa/gsi.h')
-rw-r--r--drivers/net/ipa/gsi.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ipa/gsi.h b/drivers/net/ipa/gsi.h
index 4a88aec7e7d9..6bbbda6f27ea 100644
--- a/drivers/net/ipa/gsi.h
+++ b/drivers/net/ipa/gsi.h
@@ -84,6 +84,7 @@ struct gsi_trans_info {
atomic_t tre_avail; /* TREs available for allocation */
u16 free_id; /* first free trans in array */
+ u16 allocated_id; /* first allocated transaction */
struct gsi_trans *trans; /* transaction array */
struct gsi_trans **map; /* TRE -> transaction map */