Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0e2e68a6 authored by Akshay Pandit's avatar Akshay Pandit
Browse files

msm: ipa: Endpoints of USB and PCI is reversed in order



Send the USB2(Low latency eptype) end point info first then
USB0(General eptype) end point.

Send the CV2x(Low latency eptype) end point info first then
LTE(General eptype) end point.

As per net manager request handle the get peripheral info
ioctl to send ep_info in reverse order.

Change-Id: I798b53ac41056d2229dbfca22b30e6f6625b8ee4
Acked-by: default avatarRishabh Garg <rishgarg@qti.qualcomm.com>
Signed-off-by: default avatarAkshay Pandit <pandit@codeaurora.org>
parent d8f2f14f
Loading
Loading
Loading
Loading
+15 −15
Original line number Diff line number Diff line
/* Copyright (c) 2012-2019, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2020, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -42,7 +42,6 @@
#include <asm/cacheflush.h>

#ifdef CONFIG_ARM64

/* Outer caches unsupported on ARM64 platforms */
#define outer_flush_range(x, y)
#define __cpuc_flush_dcache_area __flush_dcache_area
@@ -637,17 +636,16 @@ static void ipa3_get_usb_ep_info(
		pair_info[i].producer_pipe_num = -1;
		pair_info[i].ep_id = -1;
	}

	ep_index = ipa3_get_ep_mapping(IPA_CLIENT_USB_PROD);
	ep_index = ipa3_get_ep_mapping(IPA_CLIENT_USB2_PROD);

	if ((ep_index != -1) && ipa3_ctx->ep[ep_index].valid) {
		pair_info[ep_info->num_ep_pairs].consumer_pipe_num = ep_index;
		ep_index = ipa3_get_ep_mapping(IPA_CLIENT_USB_CONS);
		ep_index = ipa3_get_ep_mapping(IPA_CLIENT_USB2_CONS);
		if ((ep_index != -1) && (ipa3_ctx->ep[ep_index].valid)) {
			pair_info[ep_info->num_ep_pairs].producer_pipe_num =
				ep_index;
			pair_info[ep_info->num_ep_pairs].ep_id =
				IPA_USB0_EP_ID;
				IPA_USB1_EP_ID;

			IPADBG("ep_pair_info consumer_pipe_num %d",
				pair_info[ep_info->num_ep_pairs].
@@ -669,16 +667,17 @@ static void ipa3_get_usb_ep_info(
		}
	}

	ep_index = ipa3_get_ep_mapping(IPA_CLIENT_USB2_PROD);

	ep_index = ipa3_get_ep_mapping(IPA_CLIENT_USB_PROD);

	if ((ep_index != -1) && ipa3_ctx->ep[ep_index].valid) {
		pair_info[ep_info->num_ep_pairs].consumer_pipe_num = ep_index;
		ep_index = ipa3_get_ep_mapping(IPA_CLIENT_USB2_CONS);
		ep_index = ipa3_get_ep_mapping(IPA_CLIENT_USB_CONS);
		if ((ep_index != -1) && (ipa3_ctx->ep[ep_index].valid)) {
			pair_info[ep_info->num_ep_pairs].producer_pipe_num =
				ep_index;
			pair_info[ep_info->num_ep_pairs].ep_id =
				IPA_USB1_EP_ID;
				IPA_USB0_EP_ID;

			IPADBG("ep_pair_info consumer_pipe_num %d",
				pair_info[ep_info->num_ep_pairs].
@@ -699,6 +698,7 @@ static void ipa3_get_usb_ep_info(
				pair_info[ep_info->num_ep_pairs].ep_id);
		}
	}

}

static void ipa3_get_pcie_ep_info(
@@ -715,16 +715,16 @@ static void ipa3_get_pcie_ep_info(
		pair_info[i].ep_id = -1;
	}

	ep_index = ipa3_get_ep_mapping(IPA_CLIENT_MHI_PROD);
	ep_index = ipa3_get_ep_mapping(IPA_CLIENT_MHI2_PROD);

	if ((ep_index != -1) && ipa3_ctx->ep[ep_index].valid) {
		pair_info[ep_info->num_ep_pairs].consumer_pipe_num = ep_index;
		ep_index = ipa3_get_ep_mapping(IPA_CLIENT_MHI_CONS);
		ep_index = ipa3_get_ep_mapping(IPA_CLIENT_MHI2_CONS);
		if ((ep_index != -1) && (ipa3_ctx->ep[ep_index].valid)) {
			pair_info[ep_info->num_ep_pairs].producer_pipe_num =
				ep_index;
			pair_info[ep_info->num_ep_pairs].ep_id =
				IPA_PCIE0_EP_ID;
				IPA_PCIE1_EP_ID;

			IPADBG("ep_pair_info consumer_pipe_num %d",
				pair_info[ep_info->num_ep_pairs].
@@ -746,16 +746,16 @@ static void ipa3_get_pcie_ep_info(
		}
	}

	ep_index = ipa3_get_ep_mapping(IPA_CLIENT_MHI2_PROD);
	ep_index = ipa3_get_ep_mapping(IPA_CLIENT_MHI_PROD);

	if ((ep_index != -1) && ipa3_ctx->ep[ep_index].valid) {
		pair_info[ep_info->num_ep_pairs].consumer_pipe_num = ep_index;
		ep_index = ipa3_get_ep_mapping(IPA_CLIENT_MHI2_CONS);
		ep_index = ipa3_get_ep_mapping(IPA_CLIENT_MHI_CONS);
		if ((ep_index != -1) && (ipa3_ctx->ep[ep_index].valid)) {
			pair_info[ep_info->num_ep_pairs].producer_pipe_num =
				ep_index;
			pair_info[ep_info->num_ep_pairs].ep_id =
				IPA_PCIE1_EP_ID;
				IPA_PCIE0_EP_ID;

			IPADBG("ep_pair_info consumer_pipe_num %d",
				pair_info[ep_info->num_ep_pairs].