Skip to content

Commit

Permalink
net: ipa: only reset channel twice for IPA v3.5.1
Browse files Browse the repository at this point in the history
In gsi_channel_reset(), RX channels are subjected to two consecutive
CHANNEL_RESET commands.  This workaround should only be used for IPA
version 3.5.1, and for newer hardware "can lead to unwanted behavior."

Only issue the second CHANNEL_RESET command for legacy hardware.

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Alex Elder authored and David S. Miller committed May 7, 2020
1 parent f86a190 commit a3f2405
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/ipa/gsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -840,9 +840,9 @@ void gsi_channel_reset(struct gsi *gsi, u32 channel_id, bool legacy)

mutex_lock(&gsi->mutex);

/* Due to a hardware quirk we need to reset RX channels twice. */
gsi_channel_reset_command(channel);
if (!channel->toward_ipa)
/* Due to a hardware quirk we may need to reset RX channels twice. */
if (legacy && !channel->toward_ipa)
gsi_channel_reset_command(channel);

gsi_channel_program(channel, legacy);
Expand Down

0 comments on commit a3f2405

Please sign in to comment.