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 <davem@davemloft.net>
This commit is contained in:
commit
ae32bd420b
@ -853,6 +853,7 @@ static void ipa_endpoint_init_hol_block_timer(struct ipa_endpoint *endpoint,
|
||||
u32 offset;
|
||||
u32 val;
|
||||
|
||||
/* This should only be changed when HOL_BLOCK_EN is disabled */
|
||||
offset = IPA_REG_ENDP_INIT_HOL_BLOCK_TIMER_N_OFFSET(endpoint_id);
|
||||
val = hol_block_timer_val(ipa, microseconds);
|
||||
iowrite32(val, ipa->reg_virt + offset);
|
||||
@ -868,6 +869,9 @@ ipa_endpoint_init_hol_block_enable(struct ipa_endpoint *endpoint, bool enable)
|
||||
val = enable ? HOL_BLOCK_EN_FMASK : 0;
|
||||
offset = IPA_REG_ENDP_INIT_HOL_BLOCK_EN_N_OFFSET(endpoint_id);
|
||||
iowrite32(val, endpoint->ipa->reg_virt + offset);
|
||||
/* When enabling, the register must be written twice for IPA v4.5+ */
|
||||
if (enable && endpoint->ipa->version >= IPA_VERSION_4_5)
|
||||
iowrite32(val, endpoint->ipa->reg_virt + offset);
|
||||
}
|
||||
|
||||
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)
|
||||
if (endpoint->toward_ipa || endpoint->ee_id != GSI_EE_MODEM)
|
||||
continue;
|
||||
|
||||
ipa_endpoint_init_hol_block_enable(endpoint, false);
|
||||
ipa_endpoint_init_hol_block_timer(endpoint, 0);
|
||||
ipa_endpoint_init_hol_block_enable(endpoint, true);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user