diff options
Diffstat (limited to 'drivers/net/ipa/gsi_private.h')
| -rw-r--r-- | drivers/net/ipa/gsi_private.h | 53 |
1 files changed, 33 insertions, 20 deletions
diff --git a/drivers/net/ipa/gsi_private.h b/drivers/net/ipa/gsi_private.h index b57d0198ebc1..968ab1e596e8 100644 --- a/drivers/net/ipa/gsi_private.h +++ b/drivers/net/ipa/gsi_private.h @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0 */ /* Copyright (c) 2015-2018, The Linux Foundation. All rights reserved. - * Copyright (C) 2018-2020 Linaro Ltd. + * Copyright (C) 2018-2024 Linaro Ltd. */ #ifndef _GSI_PRIVATE_H_ #define _GSI_PRIVATE_H_ @@ -10,24 +10,22 @@ #include <linux/types.h> -struct gsi_trans; -struct gsi_ring; +struct gsi; struct gsi_channel; +struct gsi_ring; +struct gsi_trans; -#define GSI_RING_ELEMENT_SIZE 16 /* bytes */ - -/* Return the entry that follows one provided in a transaction pool */ -void *gsi_trans_pool_next(struct gsi_trans_pool *pool, void *element); +#define GSI_RING_ELEMENT_SIZE 16 /* bytes; must be a power of 2 */ /** * gsi_trans_move_complete() - Mark a GSI transaction completed - * @trans: Transaction to commit + * @trans: Transaction whose state is to be updated */ void gsi_trans_move_complete(struct gsi_trans *trans); /** * gsi_trans_move_polled() - Mark a transaction polled - * @trans: Transaction to update + * @trans: Transaction whose state is to be updated */ void gsi_trans_move_polled(struct gsi_trans *trans); @@ -44,7 +42,7 @@ void gsi_trans_complete(struct gsi_trans *trans); * @channel: Channel associated with the transaction * @index: Index of the TRE having a transaction * - * @Return: The GSI transaction pointer associated with the TRE index + * Return: The GSI transaction pointer associated with the TRE index */ struct gsi_trans *gsi_channel_trans_mapped(struct gsi_channel *channel, u32 index); @@ -53,7 +51,7 @@ struct gsi_trans *gsi_channel_trans_mapped(struct gsi_channel *channel, * gsi_channel_trans_complete() - Return a channel's next completed transaction * @channel: Channel whose next transaction is to be returned * - * @Return: The next completed transaction, or NULL if nothing new + * Return: The next completed transaction, or NULL if nothing new */ struct gsi_trans *gsi_channel_trans_complete(struct gsi_channel *channel); @@ -76,7 +74,7 @@ void gsi_channel_trans_cancel_pending(struct gsi_channel *channel); * @gsi: GSI pointer * @channel_id: Channel number * - * @Return: 0 if successful, or -ENOMEM on allocation failure + * Return: 0 if successful, or -ENOMEM on allocation failure * * Creates and sets up information for managing transactions on a channel */ @@ -97,22 +95,37 @@ void gsi_channel_trans_exit(struct gsi_channel *channel); */ void gsi_channel_doorbell(struct gsi_channel *channel); +/* gsi_channel_update() - Update knowledge of channel hardware state + * @channel: Channel to be updated + * + * Consult hardware, change the state of any newly-completed transactions + * on a channel. + */ +void gsi_channel_update(struct gsi_channel *channel); + /** * gsi_ring_virt() - Return virtual address for a ring entry * @ring: Ring whose address is to be translated - * @addr: Index (slot number) of entry + * @index: Index (slot number) of entry */ void *gsi_ring_virt(struct gsi_ring *ring, u32 index); /** - * gsi_channel_tx_queued() - Report the number of bytes queued to hardware - * @channel: Channel whose bytes have been queued + * gsi_trans_tx_committed() - Record bytes committed for transmit + * @trans: TX endpoint transaction being committed + * + * Report that a TX transaction has been committed. It updates some + * statistics used to manage transmit rates. + */ +void gsi_trans_tx_committed(struct gsi_trans *trans); + +/** + * gsi_trans_tx_queued() - Report a queued TX channel transaction + * @trans: Transaction being passed to hardware * - * This arranges for the the number of transactions and bytes for - * transfer that have been queued to hardware to be reported. It - * passes this information up the network stack so it can be used to - * throttle transmissions. + * Report to the network stack that a TX transaction is being supplied + * to the hardware. */ -void gsi_channel_tx_queued(struct gsi_channel *channel); +void gsi_trans_tx_queued(struct gsi_trans *trans); #endif /* _GSI_PRIVATE_H_ */ |
