net: ipa: prevent concurrent replenish
authorAlex Elder <elder@linaro.org>
Wed, 12 Jan 2022 13:30:12 +0000 (07:30 -0600)
committerDavid S. Miller <davem@davemloft.net>
Wed, 12 Jan 2022 14:39:53 +0000 (14:39 +0000)
commit998c0bd2b3715244da7639cc4e6a2062cb79c3f4
treecfaa51320c91242f4f89a7fc31e26cef6b7f8ea0
parentc1aaa01dbf4cef95af3e04a5a43986c290e06ea3
net: ipa: prevent concurrent replenish

We have seen cases where an endpoint RX completion interrupt arrives
while replenishing for the endpoint is underway.  This causes another
instance of replenishing to begin as part of completing the receive
transaction.  If this occurs it can lead to transaction corruption.

Use a new flag to ensure only one replenish instance for an endpoint
executes at a time.

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
drivers/net/ipa/ipa_endpoint.h