aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/net/ipa/gsi.h
diff options
context:
space:
mode:
authorAlex Elder <elder@linaro.org>2022-07-19 13:10:17 -0500
committerJakub Kicinski <kuba@kernel.org>2022-07-20 21:04:36 -0700
commit4920065888fa27edf1cb3f2d03c6d1c245e493bf (patch)
tree2b2efdd30457f30f8f43f527866eb85099a065f4 /drivers/net/ipa/gsi.h
parentnet: ipa: add a transaction committed list (diff)
downloadwireguard-linux-4920065888fa27edf1cb3f2d03c6d1c245e493bf.tar.xz
wireguard-linux-4920065888fa27edf1cb3f2d03c6d1c245e493bf.zip
net: ipa: rearrange transaction initialization
The transaction map is really associated with the transaction pool; move its definition earlier in the gsi_trans_info structure. Rearrange initialization in gsi_channel_trans_init() so it sets the tre_avail value first, then initializes the transaction pool, and finally allocating the transaction map. Update comments. Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ipa/gsi.h')
-rw-r--r--drivers/net/ipa/gsi.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ipa/gsi.h b/drivers/net/ipa/gsi.h
index 85fb03465713..23de5f67374c 100644
--- a/drivers/net/ipa/gsi.h
+++ b/drivers/net/ipa/gsi.h
@@ -83,9 +83,10 @@ struct gsi_trans_pool {
struct gsi_trans_info {
atomic_t tre_avail; /* TREs available for allocation */
struct gsi_trans_pool pool; /* transaction pool */
+ struct gsi_trans **map; /* TRE -> transaction map */
+
struct gsi_trans_pool sg_pool; /* scatterlist pool */
struct gsi_trans_pool cmd_pool; /* command payload DMA pool */
- struct gsi_trans **map; /* TRE -> transaction map */
spinlock_t spinlock; /* protects updates to the lists */
struct list_head alloc; /* allocated, not committed */