Skip to content

Commit 816316c

Browse files
Alex Elderdavem330
authored andcommitted
net: ipa: disable HOLB drop when updating timer
The head-of-line blocking timer should only be modified when head-of-line drop is disabled. One of the steps in recovering from a modem crash is to enable dropping of packets with timeout of 0 (immediate). We don't know how the modem configured its endpoints, so before we program the timer, we need to ensure HOL_BLOCK is disabled. Fixes: 84f9bd1 ("soc: qcom: ipa: IPA endpoints") Signed-off-by: Alex Elder <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 6e228d8 commit 816316c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/net/ipa/ipa_endpoint.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -853,6 +853,7 @@ static void ipa_endpoint_init_hol_block_timer(struct ipa_endpoint *endpoint,
853853
u32 offset;
854854
u32 val;
855855

856+
/* This should only be changed when HOL_BLOCK_EN is disabled */
856857
offset = IPA_REG_ENDP_INIT_HOL_BLOCK_TIMER_N_OFFSET(endpoint_id);
857858
val = hol_block_timer_val(ipa, microseconds);
858859
iowrite32(val, ipa->reg_virt + offset);
@@ -883,6 +884,7 @@ void ipa_endpoint_modem_hol_block_clear_all(struct ipa *ipa)
883884
if (endpoint->toward_ipa || endpoint->ee_id != GSI_EE_MODEM)
884885
continue;
885886

887+
ipa_endpoint_init_hol_block_enable(endpoint, false);
886888
ipa_endpoint_init_hol_block_timer(endpoint, 0);
887889
ipa_endpoint_init_hol_block_enable(endpoint, true);
888890
}

0 commit comments

Comments
 (0)