Skip to content

Commit

Permalink
net: ipa: mode register is TX only
Browse files Browse the repository at this point in the history
The INIT_MODE endpoint configuration register is only valid for TX
endpoints.  Rather than writing a zero to that register for RX
endpoints, avoid writing the register at all.

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 Jul 1, 2020
1 parent 9b63f09 commit 00b9102
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/net/ipa/ipa_endpoint.c
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ static void ipa_endpoint_init_mode(struct ipa_endpoint *endpoint)
u32 offset = IPA_REG_ENDP_INIT_MODE_N_OFFSET(endpoint->endpoint_id);
u32 val;

if (endpoint->toward_ipa && endpoint->data->dma_mode) {
if (endpoint->data->dma_mode) {
enum ipa_endpoint_name name = endpoint->data->dma_endpoint;
u32 dma_endpoint_id;

Expand All @@ -552,7 +552,7 @@ static void ipa_endpoint_init_mode(struct ipa_endpoint *endpoint)
} else {
val = u32_encode_bits(IPA_BASIC, MODE_FMASK);
}
/* Other bitfields unspecified (and 0) */
/* All other bits unspecified (and 0) */

iowrite32(val, endpoint->ipa->reg_virt + offset);
}
Expand Down Expand Up @@ -1300,6 +1300,7 @@ static void ipa_endpoint_program(struct ipa_endpoint *endpoint)
ipa_endpoint_init_aggr(endpoint);
ipa_endpoint_init_deaggr(endpoint);
ipa_endpoint_init_seq(endpoint);
ipa_endpoint_init_mode(endpoint);
} else {
if (endpoint->ipa->version == IPA_VERSION_3_5_1)
(void)ipa_endpoint_program_suspend(endpoint, false);
Expand All @@ -1309,7 +1310,6 @@ static void ipa_endpoint_program(struct ipa_endpoint *endpoint)
}
ipa_endpoint_init_cfg(endpoint);
ipa_endpoint_init_hdr(endpoint);
ipa_endpoint_init_mode(endpoint);
ipa_endpoint_status(endpoint);
}

Expand Down

0 comments on commit 00b9102

Please sign in to comment.