summaryrefslogtreecommitdiffstats
path: root/drivers/net/ipa
diff options
context:
space:
mode:
authorAlex Elder <elder@linaro.org>2020-11-25 14:45:17 -0600
committerJakub Kicinski <kuba@kernel.org>2020-11-28 12:13:54 -0800
commit9f848198607f23626deddceb9da9307464031258 (patch)
tree2bbf76e79d58ab8e8848ccff80b93b056a0b417d /drivers/net/ipa
parent3567e23379046a1c7fa730c2af7f5f3e53ff0039 (diff)
net: ipa: reverse logic on escape buffer use
Starting with IPA v4.2 there is a GSI channel option to use an "escape buffer" instead of prefetch buffers. This should be used for all channels *except* the AP command TX channel. The logic that implements this has it backwards; fix this bug. Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ipa')
-rw-r--r--drivers/net/ipa/gsi.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/ipa/gsi.c b/drivers/net/ipa/gsi.c
index eb4c5d408a83..2cf10c9f0143 100644
--- a/drivers/net/ipa/gsi.c
+++ b/drivers/net/ipa/gsi.c
@@ -781,8 +781,10 @@ static void gsi_channel_program(struct gsi_channel *channel, bool doorbell)
if (gsi->version == IPA_VERSION_3_5_1 && doorbell)
val |= USE_DB_ENG_FMASK;
- /* Starting with IPA v4.0 the command channel uses the escape buffer */
- if (gsi->version != IPA_VERSION_3_5_1 && channel->command)
+ /* v4.0 introduces an escape buffer for prefetch. We use it
+ * on all but the AP command channel.
+ */
+ if (gsi->version != IPA_VERSION_3_5_1 && !channel->command)
val |= USE_ESCAPE_BUF_ONLY_FMASK;
iowrite32(val, gsi->virt + GSI_CH_C_QOS_OFFSET(channel_id));