From: Alex Elder <hidden> Date: 2021-11-12 22:22:18
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.
-Alex
Alex Elder (2):
net: ipa: HOLB register sometimes must be written twice
net: ipa: disable HOLB drop when updating timer
drivers/net/ipa/ipa_endpoint.c | 5 +++++
1 file changed, 5 insertions(+)
--
2.32.0
@@ -868,6 +868,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);}voidipa_endpoint_modem_hol_block_clear_all(structipa*ipa)
From: Alex Elder <hidden> Date: 2021-11-12 22:22:25
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: 84f9bd12d46db ("soc: qcom: ipa: IPA endpoints")
Signed-off-by: Alex Elder <redacted>
---
drivers/net/ipa/ipa_endpoint.c | 2 ++
1 file changed, 2 insertions(+)
@@ -853,6 +853,7 @@ static void ipa_endpoint_init_hol_block_timer(struct ipa_endpoint *endpoint,u32offset;u32val;+/* 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);
Hello:
This series was applied to netdev/net.git (master)
by David S. Miller [off-list ref]:
On Fri, 12 Nov 2021 16:22:08 -0600 you wrote:
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.
[...]