8672bab7 | 02-Sep-2022 |
Alex Elder <elder@linaro.org> |
net: ipa: verify a few more IDs
The completed transaction list is used in gsi_channel_trans_complete() to return the next transaction in completed state.
Add some temporary checks to verify the tra
net: ipa: verify a few more IDs
The completed transaction list is used in gsi_channel_trans_complete() to return the next transaction in completed state.
Add some temporary checks to verify the transaction indicated by the completed ID matches the one first in this list.
Similarly, we use the pending and completed transaction lists when cancelling pending transactions in gsi_channel_trans_cancel_pending().
Add temporary checks there to verify the transactions indicated by IDs match those tracked by these lists.
Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
4601e755 | 02-Sep-2022 |
Alex Elder <elder@linaro.org> |
net: ipa: further simplify gsi_channel_trans_last()
Do a little more refactoring in gsi_channel_trans_last() to simplify it further. The resulting code should behave exactly as before.
Signed-off-
net: ipa: further simplify gsi_channel_trans_last()
Do a little more refactoring in gsi_channel_trans_last() to simplify it further. The resulting code should behave exactly as before.
Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
e68d1d15 | 02-Sep-2022 |
Alex Elder <elder@linaro.org> |
net: ipa: simplify gsi_channel_trans_last()
Using a little logic we can simplify gsi_channel_trans_last().
The first condition in that function looks like this: if (trans_info->allocated_id !=
net: ipa: simplify gsi_channel_trans_last()
Using a little logic we can simplify gsi_channel_trans_last().
The first condition in that function looks like this: if (trans_info->allocated_id != trans_info->free_id) And if that's false, we proceed to the next one: if (trans_info->committed_id != trans_info->allocated_id)
Failure of the first test implies: trans_info->allocated_id == trans_info->free_id And therefore, the second one can be rewritten this way: if (trans_info->committed_id != trans_info->free_id)
Substituting free_id for allocated_id and committed_id can also be done in the code blocks executed when these conditions yield true. The net result is that all three blocks for TX endpoints can be consolidated into just one.
The two blocks of code at the end of that function (used for both TX and RX channels) can be similarly consolidated into a single block.
Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
897c0ce6 | 02-Sep-2022 |
Alex Elder <elder@linaro.org> |
net: ipa: use IDs exclusively for last transaction
Always use transaction IDs when finding the "last" transaction to await when quiescing a channel. This basically extends what was done in the prev
net: ipa: use IDs exclusively for last transaction
Always use transaction IDs when finding the "last" transaction to await when quiescing a channel. This basically extends what was done in the previous patch to all other transaction state IDs.
As a result we are no longer updating any transaction lists inside gsi_channel_trans_last(), so there's no need to take the spinlock.
Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
c30623ea | 02-Sep-2022 |
Alex Elder <elder@linaro.org> |
net: ipa: use IDs for last allocated transaction
Use the allocated and free transaction IDs to determine whether the "last" transaction used for quiescing a channel is in allocated state. The last
net: ipa: use IDs for last allocated transaction
Use the allocated and free transaction IDs to determine whether the "last" transaction used for quiescing a channel is in allocated state. The last allocated transaction that has not been committed (if any) immediately precedes the first free transaction in the transaction array.
Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
fd3bd039 | 31-Aug-2022 |
Alex Elder <elder@linaro.org> |
net: ipa: track polled transactions with an ID
Add a transaction ID to track the first element in the transaction array that has been polled. Advance the ID when we are releasing a transaction.
Te
net: ipa: track polled transactions with an ID
Add a transaction ID to track the first element in the transaction array that has been polled. Advance the ID when we are releasing a transaction.
Temporarily add warnings that verify that the first polled transaction tracked by the ID matches the first element on the polled list, both when polling and freeing.
Remove the temporary warnings added by the previous commit.
Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
949cd0b5 | 31-Aug-2022 |
Alex Elder <elder@linaro.org> |
net: ipa: track completed transactions with an ID
Add a transaction ID field to track the first element in the transaction array that has completed but has not yet been polled.
Advance the ID when
net: ipa: track completed transactions with an ID
Add a transaction ID field to track the first element in the transaction array that has completed but has not yet been polled.
Advance the ID when we are processing a transaction in the NAPI polling loop (where completed transactions become polled).
Temporarily add warnings that verify that the first completed transaction tracked by the ID matches the first element on the completed list, both when pending and completing.
Remove the temporary warnings added by the previous commit.
Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
eeff7c14 | 31-Aug-2022 |
Alex Elder <elder@linaro.org> |
net: ipa: track pending transactions with an ID
Add a transaction ID field to track the first element in the transaction array that is pending (sent to hardware) but not yet complete. Advance the I
net: ipa: track pending transactions with an ID
Add a transaction ID field to track the first element in the transaction array that is pending (sent to hardware) but not yet complete. Advance the ID when a completion event for a channel indicates that transactions have completed.
Temporarily add warnings that verify that the first pending transaction tracked by the ID matches the first element on the pending list, both when pending and completing, as well as when resetting the channel.
Remove the temporary warnings added by the previous commit.
Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
fc95d958 | 31-Aug-2022 |
Alex Elder <elder@linaro.org> |
net: ipa: track committed transactions with an ID
Add a transaction ID field to track the first element in a channel's transaction array that has been committed, but not yet passed to the hardware.
net: ipa: track committed transactions with an ID
Add a transaction ID field to track the first element in a channel's transaction array that has been committed, but not yet passed to the hardware. Advance the ID when the hardware is notified via doorbell that TREs from a transaction are ready for consumption.
Temporarily add warnings that verify that the first committed transaction tracked by the ID matches the first element on the committed list, both when committing and pending (at doorbell).
Remove the temporary warnings added by the previous commit.
Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
41e2a2c0 | 31-Aug-2022 |
Alex Elder <elder@linaro.org> |
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 I
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>
show more ...
|
2c7b9b93 | 19-Jul-2022 |
Alex Elder <elder@linaro.org> |
net: ipa: move configuration data files into a subdirectory
Reduce the clutter in the main IPA source directory by creating a new "data" subdirectory, and locating all of the configuration data file
net: ipa: move configuration data files into a subdirectory
Reduce the clutter in the main IPA source directory by creating a new "data" subdirectory, and locating all of the configuration data files in there.
Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
ec2ea5e0 | 19-Jul-2022 |
Alex Elder <elder@linaro.org> |
net: ipa: list supported IPA versions in the Makefile
Create a variable in the Makefile listing the IPA versions supported by the driver. Use that to create the list of configuration data object fi
net: ipa: list supported IPA versions in the Makefile
Create a variable in the Makefile listing the IPA versions supported by the driver. Use that to create the list of configuration data object files used (rather than listing them all individually).
Add a SPDX license comment.
Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
616c4a83 | 19-Jul-2022 |
Alex Elder <elder@linaro.org> |
net: ipa: fix an outdated comment
Since commit 8797972afff3d ("net: ipa: remove command info pool"), we don't allocate "command info" entries for command channel transactions. Fix a comment that se
net: ipa: fix an outdated comment
Since commit 8797972afff3d ("net: ipa: remove command info pool"), we don't allocate "command info" entries for command channel transactions. Fix a comment that seems to suggest we still do. (Even before that commit, the comment was out of place.)
Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
3c91c86d | 19-Jul-2022 |
Alex Elder <elder@linaro.org> |
net: ipa: report when the driver has been removed
When the IPA driver has completed its initialization and setup stages, it emits a brief message to the log. Add a small message that reports when i
net: ipa: report when the driver has been removed
When the IPA driver has completed its initialization and setup stages, it emits a brief message to the log. Add a small message that reports when it has been removed.
Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
4d8996cb | 19-Jul-2022 |
Alex Elder <elder@linaro.org> |
net: ipa: skip some cleanup for unused transactions
In gsi_trans_free(), there's no point in ipa_gsi_trans_release() if a transaction is unused. No used TREs means no IPA layer resources to clean u
net: ipa: skip some cleanup for unused transactions
In gsi_trans_free(), there's no point in ipa_gsi_trans_release() if a transaction is unused. No used TREs means no IPA layer resources to clean up. So only call ipa_gsi_trans_release() if at least one TRE was used.
Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
49200658 | 19-Jul-2022 |
Alex Elder <elder@linaro.org> |
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 initializat
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>
show more ...
|
b63f507c | 19-Jul-2022 |
Alex Elder <elder@linaro.org> |
net: ipa: add a transaction committed list
We currently put a transaction on the pending list when it has been committed. But until the channel's doorbell rings, these transactions aren't actually
net: ipa: add a transaction committed list
We currently put a transaction on the pending list when it has been committed. But until the channel's doorbell rings, these transactions aren't actually "owned" by the hardware yet.
Add a new "committed" state (and list), to represent transactions that have been committed but not yet sent to hardware. Define "pending" to mean committed transactions that have been sent to hardware but have not yet completed.
Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|