OSDN Git Service

net: ipa: HOLB register sometimes must be written twice
authorAlex Elder <elder@linaro.org>
Fri, 12 Nov 2021 22:22:09 +0000 (16:22 -0600)
committerDavid S. Miller <davem@davemloft.net>
Mon, 15 Nov 2021 13:25:45 +0000 (13:25 +0000)
Starting with IPA v4.5, the HOL_BLOCK_EN register must be written
twice when enabling head-of-line blocking avoidance.

Fixes: 84f9bd12d46db ("soc: qcom: ipa: IPA endpoints")
Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ipa/ipa_endpoint.c

index 5528d97..006da46 100644 (file)
@@ -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);
 }
 
 void ipa_endpoint_modem_hol_block_clear_all(struct ipa *ipa)