Skip to content

Commit ae32bd4

Browse files
committed
Merge branch 'net-ipa-fixes'
Alex Elder says: ==================== net: ipa: HOLB register write fixes This small series fixes two recently identified bugs related to the way two registers must be written. The registers define whether and when to drop packets if a head-of-line blocking condition is encountered. The "enable" (dropping packets) register must be written twice for newer versions of hardware. And the timer register must not be written while dropping is enabled. ==================== Signed-off-by: David S. Miller <[email protected]>
2 parents 10a2308 + 816316c commit ae32bd4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

drivers/net/ipa/ipa_endpoint.c

Lines changed: 5 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);
@@ -868,6 +869,9 @@ ipa_endpoint_init_hol_block_enable(struct ipa_endpoint *endpoint, bool enable)
868869
val = enable ? HOL_BLOCK_EN_FMASK : 0;
869870
offset = IPA_REG_ENDP_INIT_HOL_BLOCK_EN_N_OFFSET(endpoint_id);
870871
iowrite32(val, endpoint->ipa->reg_virt + offset);
872+
/* When enabling, the register must be written twice for IPA v4.5+ */
873+
if (enable && endpoint->ipa->version >= IPA_VERSION_4_5)
874+
iowrite32(val, endpoint->ipa->reg_virt + offset);
871875
}
872876

873877
void ipa_endpoint_modem_hol_block_clear_all(struct ipa *ipa)
@@ -880,6 +884,7 @@ void ipa_endpoint_modem_hol_block_clear_all(struct ipa *ipa)
880884
if (endpoint->toward_ipa || endpoint->ee_id != GSI_EE_MODEM)
881885
continue;
882886

887+
ipa_endpoint_init_hol_block_enable(endpoint, false);
883888
ipa_endpoint_init_hol_block_timer(endpoint, 0);
884889
ipa_endpoint_init_hol_block_enable(endpoint, true);
885890
}

0 commit comments

Comments
 (0)