Skip to content

Commit

Permalink
net: ipa: support more versions for HOLB timer
Browse files Browse the repository at this point in the history
IPA version 3.5.1 represents the timer used in avoiding head-of-line
blocking with a simple tick count.  IPA v4.2 changes that, instead
splitting the timer field into two parts (base and scale) to
represent the ticks in the timer period.

IPA v4.0 and IPA v4.1 use the same method as IPA v3.5.1.  Change the
test in ipa_reg_init_hol_block_timer_val() so the result is correct
for those versions as well.

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Alex Elder authored and Jakub Kicinski committed Nov 18, 2020
1 parent 5f87d77 commit 6833a09
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/ipa/ipa_endpoint.c
Original file line number Diff line number Diff line change
Expand Up @@ -665,8 +665,8 @@ static u32 ipa_reg_init_hol_block_timer_val(struct ipa *ipa, u32 microseconds)
/* ...but we still need to fit into a 32-bit register */
WARN_ON(ticks > U32_MAX);

/* IPA v3.5.1 just records the tick count */
if (ipa->version == IPA_VERSION_3_5_1)
/* IPA v3.5.1 through v4.1 just record the tick count */
if (ipa->version < IPA_VERSION_4_2)
return (u32)ticks;

/* For IPA v4.2, the tick count is represented by base and
Expand Down

0 comments on commit 6833a09

Please sign in to comment.