diff options
author | 2022-05-22 20:46:13 +0100 | |
---|---|---|
committer | 2022-05-22 20:46:13 +0100 | |
commit | 0598cec957abbdd47b8eb7dceb51d54ac465417d (patch) | |
tree | a894e4154d3532175bf34d93980d3579ecea3773 /drivers/net/ipa/gsi_trans.h | |
parent | qed: fix typos in comments (diff) | |
parent | net: ipa: use data space for command opcodes (diff) | |
download | linux-dev-0598cec957abbdd47b8eb7dceb51d54ac465417d.tar.xz linux-dev-0598cec957abbdd47b8eb7dceb51d54ac465417d.zip |
Merge branch 'ipa-next'
Alex Elder says:
====================
net: ipa: a few more small items
This series consists of three small sets of changes. Version 2 adds
a patch that avoids a warning that occurs when handling a modem
crash (I unfortunately didn't notice it earlier). All other patches
are the same--just rebased.
The first three patches allow a few endpoint features to be
specified. At this time, currently-defined endpoints retain the
same configuration, but when the monitor functionality is added in
the next cycle these options will be required.
The fourth patch simply removes an unused function, explaining also
why it would likely never be used.
The fifth patch is new. It counts the number of modem TX endpoints
and uses it to determine how many TREs a transaction needs when
when handling a modem crash. It is needed to avoid exceeding the
limited number of commands imposed by the last four patches.
And the last four patches refactor code related to IPA immediate
commands, eliminating an unused field and then simplifying and
removing some unneeded code.
====================
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.h | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/drivers/net/ipa/gsi_trans.h b/drivers/net/ipa/gsi_trans.h index af379b49299e..020c3b32de1d 100644 --- a/drivers/net/ipa/gsi_trans.h +++ b/drivers/net/ipa/gsi_trans.h @@ -22,6 +22,9 @@ struct gsi; struct gsi_trans; struct gsi_trans_pool; +/* Maximum number of TREs in an IPA immediate command transaction */ +#define IPA_COMMAND_TRANS_TRE_MAX 8 + /** * struct gsi_trans - a GSI transaction * @@ -34,8 +37,8 @@ struct gsi_trans_pool; * @used: Number of TREs *used* (could be less than tre_count) * @len: Total # of transfer bytes represented in sgl[] (set by core) * @data: Preserved but not touched by the core transaction code + * @cmd_opcode: Array of command opcodes (command channel only) * @sgl: An array of scatter/gather entries managed by core code - * @info: Array of command information structures (command channel) * @direction: DMA transfer direction (DMA_NONE for commands) * @refcount: Reference count used for destruction * @completion: Completed when the transaction completes @@ -57,9 +60,11 @@ struct gsi_trans { u8 used; /* # entries used in sgl[] */ u32 len; /* total # bytes across sgl[] */ - void *data; + union { + void *data; + u8 cmd_opcode[IPA_COMMAND_TRANS_TRE_MAX]; + }; struct scatterlist *sgl; - struct ipa_cmd_info *info; /* array of entries, or null */ enum dma_data_direction direction; refcount_t refcount; @@ -165,12 +170,10 @@ void gsi_trans_free(struct gsi_trans *trans); * @buf: Buffer pointer for command payload * @size: Number of bytes in buffer * @addr: DMA address for payload - * @direction: Direction of DMA transfer (or DMA_NONE if none required) * @opcode: IPA immediate command opcode */ void gsi_trans_cmd_add(struct gsi_trans *trans, void *buf, u32 size, - dma_addr_t addr, enum dma_data_direction direction, - enum ipa_cmd_opcode opcode); + dma_addr_t addr, enum ipa_cmd_opcode opcode); /** * gsi_trans_page_add() - Add a page transfer to a transaction @@ -206,15 +209,6 @@ void gsi_trans_commit(struct gsi_trans *trans, bool ring_db); void gsi_trans_commit_wait(struct gsi_trans *trans); /** - * gsi_trans_commit_wait_timeout() - Commit a GSI transaction and wait for - * it to complete, with timeout - * @trans: Transaction to commit - * @timeout: Timeout period (in milliseconds) - */ -int gsi_trans_commit_wait_timeout(struct gsi_trans *trans, - unsigned long timeout); - -/** * gsi_trans_read_byte() - Issue a single byte read TRE on a channel * @gsi: GSI pointer * @channel_id: Channel on which to read a byte |