summaryrefslogtreecommitdiffstats
path: root/drivers/net/ipa/gsi_trans.c
diff options
context:
space:
mode:
authorAlex Elder <elder@linaro.org>2022-06-15 11:59:25 -0500
committerJakub Kicinski <kuba@kernel.org>2022-06-16 20:44:03 -0700
commitdd5a046cbbedbe9198bc9070516313a5f6002b8c (patch)
treeb50f6a5ecb2460f36f5136884be94b17ce99e0f5 /drivers/net/ipa/gsi_trans.c
parent6c0d09d9374c025f503d33bcef5f656e3f1dd349 (diff)
downloadlinux-stable-dd5a046cbbedbe9198bc9070516313a5f6002b8c.tar.gz
linux-stable-dd5a046cbbedbe9198bc9070516313a5f6002b8c.tar.bz2
linux-stable-dd5a046cbbedbe9198bc9070516313a5f6002b8c.zip
net: ipa: don't assume one channel per event ring
In gsi_evt_ring_rx_update(), use gsi_event_trans() repeatedly to find the transaction associated with an event, rather than assuming consecutive events are associated with the same channel. This removes the only caller of gsi_trans_pool_next(), so get rid of it. Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ipa/gsi_trans.c')
-rw-r--r--drivers/net/ipa/gsi_trans.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/drivers/net/ipa/gsi_trans.c b/drivers/net/ipa/gsi_trans.c
index a110be72f70b..54a2400cb560 100644
--- a/drivers/net/ipa/gsi_trans.c
+++ b/drivers/net/ipa/gsi_trans.c
@@ -214,22 +214,6 @@ void *gsi_trans_pool_alloc_dma(struct gsi_trans_pool *pool, dma_addr_t *addr)
return pool->base + offset;
}
-/* Return the pool element that immediately follows the one given.
- * This only works done if elements are allocated one at a time.
- */
-void *gsi_trans_pool_next(struct gsi_trans_pool *pool, void *element)
-{
- void *end = pool->base + pool->count * pool->size;
-
- WARN_ON(element < pool->base);
- WARN_ON(element >= end);
- WARN_ON(pool->max_alloc != 1);
-
- element += pool->size;
-
- return element < end ? element : pool->base;
-}
-
/* Map a given ring entry index to the transaction associated with it */
static void gsi_channel_trans_map(struct gsi_channel *channel, u32 index,
struct gsi_trans *trans)