Commit 66eba767 authored by Alex Elder's avatar Alex Elder Committed by David S. Miller
Browse files

net: ipa: move version test inside ipa_endpoint_program_delay()



IPA version 4.2 has a hardware quirk that affects endpoint delay
mode, so it isn't used there.  Isolate the test that avoids using
delay mode for that version inside ipa_endpoint_program_delay(),
rather than making that check in the caller.

Signed-off-by: default avatarAlex Elder <elder@linaro.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 4e1a6911
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -318,6 +318,8 @@ ipa_endpoint_program_delay(struct ipa_endpoint *endpoint, bool enable)
{
	/* assert(endpoint->toward_ipa); */

	/* Delay mode doesn't work properly for IPA v4.2 */
	if (endpoint->ipa->version != IPA_VERSION_4_2)
		(void)ipa_endpoint_init_ctrl(endpoint, enable);
}

@@ -1294,7 +1296,6 @@ static void ipa_endpoint_reset(struct ipa_endpoint *endpoint)
static void ipa_endpoint_program(struct ipa_endpoint *endpoint)
{
	if (endpoint->toward_ipa) {
		if (endpoint->ipa->version != IPA_VERSION_4_2)
		ipa_endpoint_program_delay(endpoint, false);
		ipa_endpoint_init_hdr_ext(endpoint);
		ipa_endpoint_init_aggr(endpoint);