Loading drivers/platform/msm/ipa/ipa_clients/ipa_uc_offload.c +29 −29 Original line number Diff line number Diff line /* Copyright (c) 2015, 2016 The Linux Foundation. All rights reserved. /* Copyright (c) 2016-2017 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 Loading Loading @@ -131,23 +131,23 @@ static int ipa_uc_offload_ntn_reg_intf( IPA_UC_OFFLOAD_DBG("register interface for netdev %s\n", inp->netdev_name); memset(¶m, 0, sizeof(param)); param.name = IPA_RM_RESOURCE_ODU_ADAPT_PROD; param.name = IPA_RM_RESOURCE_ETHERNET_PROD; param.reg_params.user_data = ntn_ctx; param.reg_params.notify_cb = ipa_uc_offload_rm_notify; param.floor_voltage = IPA_VOLTAGE_SVS; ret = ipa_rm_create_resource(¶m); if (ret) { IPA_UC_OFFLOAD_ERR("fail to create ODU_ADAPT_PROD resource\n"); IPA_UC_OFFLOAD_ERR("fail to create ETHERNET_PROD resource\n"); return -EFAULT; } memset(¶m, 0, sizeof(param)); param.name = IPA_RM_RESOURCE_ODU_ADAPT_CONS; param.name = IPA_RM_RESOURCE_ETHERNET_CONS; param.request_resource = ipa_uc_ntn_cons_request; param.release_resource = ipa_uc_ntn_cons_release; ret = ipa_rm_create_resource(¶m); if (ret) { IPA_UC_OFFLOAD_ERR("fail to create ODU_ADAPT_CONS resource\n"); IPA_UC_OFFLOAD_ERR("fail to create ETHERNET_CONS resource\n"); goto fail_create_rm_cons; } Loading Loading @@ -177,13 +177,13 @@ static int ipa_uc_offload_ntn_reg_intf( memset(tx_prop, 0, sizeof(tx_prop)); tx_prop[0].ip = IPA_IP_v4; tx_prop[0].dst_pipe = IPA_CLIENT_ODU_TETH_CONS; tx_prop[0].dst_pipe = IPA_CLIENT_ETHERNET_CONS; tx_prop[0].hdr_l2_type = inp->hdr_info[0].hdr_type; memcpy(tx_prop[0].hdr_name, hdr->hdr[IPA_IP_v4].name, sizeof(tx_prop[0].hdr_name)); tx_prop[1].ip = IPA_IP_v6; tx_prop[1].dst_pipe = IPA_CLIENT_ODU_TETH_CONS; tx_prop[1].dst_pipe = IPA_CLIENT_ETHERNET_CONS; tx_prop[1].hdr_l2_type = inp->hdr_info[1].hdr_type; memcpy(tx_prop[1].hdr_name, hdr->hdr[IPA_IP_v6].name, sizeof(tx_prop[1].hdr_name)); Loading @@ -194,7 +194,7 @@ static int ipa_uc_offload_ntn_reg_intf( memset(rx_prop, 0, sizeof(rx_prop)); rx_prop[0].ip = IPA_IP_v4; rx_prop[0].src_pipe = IPA_CLIENT_ODU_PROD; rx_prop[0].src_pipe = IPA_CLIENT_ETHERNET_PROD; rx_prop[0].hdr_l2_type = inp->hdr_info[0].hdr_type; if (inp->is_meta_data_valid) { rx_prop[0].attrib.attrib_mask |= IPA_FLT_META_DATA; Loading @@ -203,7 +203,7 @@ static int ipa_uc_offload_ntn_reg_intf( } rx_prop[1].ip = IPA_IP_v6; rx_prop[1].src_pipe = IPA_CLIENT_ODU_PROD; rx_prop[1].src_pipe = IPA_CLIENT_ETHERNET_PROD; rx_prop[1].hdr_l2_type = inp->hdr_info[1].hdr_type; if (inp->is_meta_data_valid) { rx_prop[1].attrib.attrib_mask |= IPA_FLT_META_DATA; Loading @@ -229,9 +229,9 @@ static int ipa_uc_offload_ntn_reg_intf( fail: kfree(hdr); fail_alloc: ipa_rm_delete_resource(IPA_RM_RESOURCE_ODU_ADAPT_CONS); ipa_rm_delete_resource(IPA_RM_RESOURCE_ETHERNET_CONS); fail_create_rm_cons: ipa_rm_delete_resource(IPA_RM_RESOURCE_ODU_ADAPT_PROD); ipa_rm_delete_resource(IPA_RM_RESOURCE_ETHERNET_PROD); return ret; } Loading Loading @@ -349,18 +349,18 @@ int ipa_uc_ntn_conn_pipes(struct ipa_ntn_conn_in_params *inp, return -EINVAL; } result = ipa_rm_add_dependency(IPA_RM_RESOURCE_ODU_ADAPT_PROD, result = ipa_rm_add_dependency(IPA_RM_RESOURCE_ETHERNET_PROD, IPA_RM_RESOURCE_APPS_CONS); if (result) { IPA_UC_OFFLOAD_ERR("fail to add rm dependency: %d\n", result); return result; } result = ipa_rm_request_resource(IPA_RM_RESOURCE_ODU_ADAPT_PROD); result = ipa_rm_request_resource(IPA_RM_RESOURCE_ETHERNET_PROD); if (result == -EINPROGRESS) { if (wait_for_completion_timeout(&ntn_ctx->ntn_completion, 10*HZ) == 0) { IPA_UC_OFFLOAD_ERR("ODU PROD resource req time out\n"); IPA_UC_OFFLOAD_ERR("ETH_PROD resource req time out\n"); result = -EFAULT; goto fail; } Loading @@ -384,7 +384,7 @@ int ipa_uc_ntn_conn_pipes(struct ipa_ntn_conn_in_params *inp, return 0; fail: ipa_rm_delete_dependency(IPA_RM_RESOURCE_ODU_ADAPT_PROD, ipa_rm_delete_dependency(IPA_RM_RESOURCE_ETHERNET_PROD, IPA_RM_RESOURCE_APPS_CONS); return result; } Loading Loading @@ -448,10 +448,10 @@ int ipa_set_perf_profile(struct ipa_perf_profile *profile) rm_profile.max_supported_bandwidth_mbps = profile->max_supported_bw_mbps; if (profile->client == IPA_CLIENT_ODU_PROD) { resource_name = IPA_RM_RESOURCE_ODU_ADAPT_PROD; } else if (profile->client == IPA_CLIENT_ODU_TETH_CONS) { resource_name = IPA_RM_RESOURCE_ODU_ADAPT_CONS; if (profile->client == IPA_CLIENT_ETHERNET_PROD) { resource_name = IPA_RM_RESOURCE_ETHERNET_PROD; } else if (profile->client == IPA_CLIENT_ETHERNET_CONS) { resource_name = IPA_RM_RESOURCE_ETHERNET_CONS; } else { IPA_UC_OFFLOAD_ERR("not supported\n"); return -EINVAL; Loading @@ -473,22 +473,22 @@ static int ipa_uc_ntn_disconn_pipes(struct ipa_uc_offload_ctx *ntn_ctx) ntn_ctx->state = IPA_UC_OFFLOAD_STATE_DOWN; ret = ipa_rm_release_resource(IPA_RM_RESOURCE_ODU_ADAPT_PROD); ret = ipa_rm_release_resource(IPA_RM_RESOURCE_ETHERNET_PROD); if (ret) { IPA_UC_OFFLOAD_ERR("fail to release ODU_ADAPT_PROD res: %d\n", IPA_UC_OFFLOAD_ERR("fail to release ETHERNET_PROD res: %d\n", ret); return -EFAULT; } ret = ipa_rm_delete_dependency(IPA_RM_RESOURCE_ODU_ADAPT_PROD, ret = ipa_rm_delete_dependency(IPA_RM_RESOURCE_ETHERNET_PROD, IPA_RM_RESOURCE_APPS_CONS); if (ret) { IPA_UC_OFFLOAD_ERR("fail to del dep ODU->APPS, %d\n", ret); IPA_UC_OFFLOAD_ERR("fail to del dep ETH_PROD->APPS, %d\n", ret); return -EFAULT; } ipa_ep_idx_ul = ipa_get_ep_mapping(IPA_CLIENT_ODU_PROD); ipa_ep_idx_dl = ipa_get_ep_mapping(IPA_CLIENT_ODU_TETH_CONS); ipa_ep_idx_ul = ipa_get_ep_mapping(IPA_CLIENT_ETHERNET_PROD); ipa_ep_idx_dl = ipa_get_ep_mapping(IPA_CLIENT_ETHERNET_CONS); ret = ipa_tear_down_uc_offload_pipes(ipa_ep_idx_ul, ipa_ep_idx_dl); if (ret) { IPA_UC_OFFLOAD_ERR("fail to tear down ntn offload pipes, %d\n", Loading Loading @@ -541,13 +541,13 @@ static int ipa_uc_ntn_cleanup(struct ipa_uc_offload_ctx *ntn_ctx) int len, result = 0; struct ipa_ioc_del_hdr *hdr; if (ipa_rm_delete_resource(IPA_RM_RESOURCE_ODU_ADAPT_PROD)) { IPA_UC_OFFLOAD_ERR("fail to delete ODU_ADAPT_PROD resource\n"); if (ipa_rm_delete_resource(IPA_RM_RESOURCE_ETHERNET_PROD)) { IPA_UC_OFFLOAD_ERR("fail to delete ETHERNET_PROD resource\n"); return -EFAULT; } if (ipa_rm_delete_resource(IPA_RM_RESOURCE_ODU_ADAPT_CONS)) { IPA_UC_OFFLOAD_ERR("fail to delete ODU_ADAPT_CONS resource\n"); if (ipa_rm_delete_resource(IPA_RM_RESOURCE_ETHERNET_CONS)) { IPA_UC_OFFLOAD_ERR("fail to delete ETHERNET_CONS resource\n"); return -EFAULT; } Loading drivers/platform/msm/ipa/ipa_rm.c +3 −1 Original line number Diff line number Diff line /* Copyright (c) 2013-2016, The Linux Foundation. All rights reserved. /* Copyright (c) 2013-2017, 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 Loading Loading @@ -28,6 +28,7 @@ static const char *resource_name_to_str[IPA_RM_RESOURCE_MAX] = { __stringify(IPA_RM_RESOURCE_WLAN_PROD), __stringify(IPA_RM_RESOURCE_ODU_ADAPT_PROD), __stringify(IPA_RM_RESOURCE_MHI_PROD), __stringify(IPA_RM_RESOURCE_ETHERNET_PROD), __stringify(IPA_RM_RESOURCE_Q6_CONS), __stringify(IPA_RM_RESOURCE_USB_CONS), __stringify(IPA_RM_RESOURCE_USB_DPL_CONS), Loading @@ -36,6 +37,7 @@ static const char *resource_name_to_str[IPA_RM_RESOURCE_MAX] = { __stringify(IPA_RM_RESOURCE_APPS_CONS), __stringify(IPA_RM_RESOURCE_ODU_ADAPT_CONS), __stringify(IPA_RM_RESOURCE_MHI_CONS), __stringify(IPA_RM_RESOURCE_ETHERNET_CONS), }; struct ipa_rm_profile_vote_type { Loading drivers/platform/msm/ipa/ipa_rm_resource.c +3 −1 Original line number Diff line number Diff line /* Copyright (c) 2013-2016, The Linux Foundation. All rights reserved. /* Copyright (c) 2013-2017, 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 Loading Loading @@ -38,6 +38,7 @@ int ipa_rm_prod_index(enum ipa_rm_resource_name resource_name) case IPA_RM_RESOURCE_WLAN_PROD: case IPA_RM_RESOURCE_ODU_ADAPT_PROD: case IPA_RM_RESOURCE_MHI_PROD: case IPA_RM_RESOURCE_ETHERNET_PROD: break; default: result = IPA_RM_INDEX_INVALID; Loading Loading @@ -69,6 +70,7 @@ int ipa_rm_cons_index(enum ipa_rm_resource_name resource_name) case IPA_RM_RESOURCE_ODU_ADAPT_CONS: case IPA_RM_RESOURCE_MHI_CONS: case IPA_RM_RESOURCE_USB_DPL_CONS: case IPA_RM_RESOURCE_ETHERNET_CONS: break; default: result = IPA_RM_INDEX_INVALID; Loading drivers/platform/msm/ipa/ipa_v2/ipa_utils.c +17 −2 Original line number Diff line number Diff line Loading @@ -94,6 +94,7 @@ static const int ep_mapping[3][IPA_CLIENT_MAX] = { [IPA_1_1][IPA_CLIENT_Q6_LAN_PROD] = 5, [IPA_1_1][IPA_CLIENT_Q6_WAN_PROD] = -1, [IPA_1_1][IPA_CLIENT_Q6_CMD_PROD] = -1, [IPA_1_1][IPA_CLIENT_ETHERNET_PROD] = -1, [IPA_1_1][IPA_CLIENT_HSIC1_CONS] = 14, [IPA_1_1][IPA_CLIENT_WLAN1_CONS] = -1, Loading @@ -119,6 +120,7 @@ static const int ep_mapping[3][IPA_CLIENT_MAX] = { [IPA_1_1][IPA_CLIENT_MHI_CONS] = -1, [IPA_1_1][IPA_CLIENT_Q6_LAN_CONS] = 4, [IPA_1_1][IPA_CLIENT_Q6_WAN_CONS] = -1, [IPA_1_1][IPA_CLIENT_ETHERNET_CONS] = -1, [IPA_2_0][IPA_CLIENT_HSIC1_PROD] = 12, Loading Loading @@ -148,6 +150,7 @@ static const int ep_mapping[3][IPA_CLIENT_MAX] = { = 12, [IPA_2_0][IPA_CLIENT_MEMCPY_DMA_ASYNC_PROD] = 19, [IPA_2_0][IPA_CLIENT_ETHERNET_PROD] = 12, /* Only for test purpose */ [IPA_2_0][IPA_CLIENT_TEST_PROD] = 19, [IPA_2_0][IPA_CLIENT_TEST1_PROD] = 19, Loading Loading @@ -188,6 +191,7 @@ static const int ep_mapping[3][IPA_CLIENT_MAX] = { = 16, [IPA_2_0][IPA_CLIENT_Q6_LTE_WIFI_AGGR_CONS] = 10, [IPA_2_0][IPA_CLIENT_ETHERNET_CONS] = 1, /* Only for test purpose */ [IPA_2_0][IPA_CLIENT_TEST_CONS] = 1, [IPA_2_0][IPA_CLIENT_TEST1_CONS] = 1, Loading Loading @@ -223,6 +227,7 @@ static const int ep_mapping[3][IPA_CLIENT_MAX] = { = -1, [IPA_2_6L][IPA_CLIENT_MEMCPY_DMA_ASYNC_PROD] = -1, [IPA_2_6L][IPA_CLIENT_ETHERNET_PROD] = -1, /* Only for test purpose */ [IPA_2_6L][IPA_CLIENT_TEST_PROD] = 11, [IPA_2_6L][IPA_CLIENT_TEST1_PROD] = 11, Loading Loading @@ -263,6 +268,7 @@ static const int ep_mapping[3][IPA_CLIENT_MAX] = { = -1, [IPA_2_6L][IPA_CLIENT_Q6_LTE_WIFI_AGGR_CONS] = -1, [IPA_2_6L][IPA_CLIENT_ETHERNET_CONS] = -1, /* Only for test purpose */ [IPA_2_6L][IPA_CLIENT_TEST_CONS] = 15, [IPA_2_6L][IPA_CLIENT_TEST1_CONS] = 15, Loading Loading @@ -457,6 +463,9 @@ int ipa_get_clients_from_rm_resource( clients->names[i++] = IPA_CLIENT_ODU_EMB_CONS; clients->names[i++] = IPA_CLIENT_ODU_TETH_CONS; break; case IPA_RM_RESOURCE_ETHERNET_CONS: clients->names[i++] = IPA_CLIENT_ETHERNET_CONS; break; case IPA_RM_RESOURCE_USB_PROD: clients->names[i++] = IPA_CLIENT_USB_PROD; break; Loading @@ -468,6 +477,10 @@ int ipa_get_clients_from_rm_resource( break; case IPA_RM_RESOURCE_ODU_ADAPT_PROD: clients->names[i++] = IPA_CLIENT_ODU_PROD; break; case IPA_RM_RESOURCE_ETHERNET_PROD: clients->names[i++] = IPA_CLIENT_ETHERNET_PROD; break; default: break; } Loading Loading @@ -507,7 +520,8 @@ bool ipa_should_pipe_be_suspended(enum ipa_client_type client) client == IPA_CLIENT_WLAN3_CONS || client == IPA_CLIENT_WLAN4_CONS || client == IPA_CLIENT_ODU_EMB_CONS || client == IPA_CLIENT_ODU_TETH_CONS) client == IPA_CLIENT_ODU_TETH_CONS || client == IPA_CLIENT_ETHERNET_CONS) return true; return false; Loading Loading @@ -3630,7 +3644,8 @@ int ipa2_write_qmap_id(struct ipa_ioc_write_qmapid *param_in) meta.qmap_id = param_in->qmap_id; if (param_in->client == IPA_CLIENT_USB_PROD || param_in->client == IPA_CLIENT_HSIC1_PROD || param_in->client == IPA_CLIENT_ODU_PROD) { param_in->client == IPA_CLIENT_ODU_PROD || param_in->client == IPA_CLIENT_ETHERNET_PROD) { result = ipa2_cfg_ep_metadata(ipa_ep_idx, &meta); } else if (param_in->client == IPA_CLIENT_WLAN1_PROD) { ipa_ctx->ep[ipa_ep_idx].cfg.meta = meta; Loading drivers/platform/msm/ipa/ipa_v3/ipa_debugfs.c +4 −24 Original line number Diff line number Diff line Loading @@ -1213,12 +1213,7 @@ static ssize_t ipa3_read_ntn(struct file *file, char __user *ubuf, "TX bamFifoUsageLow=%u\n" "TX bamUtilCount=%u\n" "TX num_db=%u\n" "TX num_unexpected_db=%u\n" "TX num_bam_int_handled=%u\n" "TX num_bam_int_in_non_running_state=%u\n" "TX num_qmb_int_handled=%u\n" "TX num_bam_int_handled_while_wait_for_bam=%u\n" "TX num_bam_int_handled_while_not_in_bam=%u\n", "TX num_qmb_int_handled=%u\n", TX_STATS(num_pkts_processed), TX_STATS(tail_ptr_val), TX_STATS(num_db_fired), Loading @@ -1233,12 +1228,7 @@ static ssize_t ipa3_read_ntn(struct file *file, char __user *ubuf, TX_STATS(bam_stats.bamFifoUsageLow), TX_STATS(bam_stats.bamUtilCount), TX_STATS(num_db), TX_STATS(num_unexpected_db), TX_STATS(num_bam_int_handled), TX_STATS(num_bam_int_in_non_running_state), TX_STATS(num_qmb_int_handled), TX_STATS(num_bam_int_handled_while_wait_for_bam), TX_STATS(num_bam_int_handled_while_not_in_bam)); TX_STATS(num_qmb_int_handled)); cnt += nbytes; nbytes = scnprintf(dbg_buff + cnt, IPA_MAX_MSG_LEN - cnt, "RX max_outstanding_pkts=%u\n" Loading @@ -1254,12 +1244,7 @@ static ssize_t ipa3_read_ntn(struct file *file, char __user *ubuf, "RX bamFifoUsageHigh=%u\n" "RX bamFifoUsageLow=%u\n" "RX bamUtilCount=%u\n" "RX num_bam_int_handled=%u\n" "RX num_db=%u\n" "RX num_unexpected_db=%u\n" "RX num_pkts_in_dis_uninit_state=%u\n" "num_ic_inj_vdev_change=%u\n" "num_ic_inj_fw_desc_change=%u\n", "RX num_db=%u\n", RX_STATS(max_outstanding_pkts), RX_STATS(num_pkts_processed), RX_STATS(rx_ring_rp_value), Loading @@ -1273,12 +1258,7 @@ static ssize_t ipa3_read_ntn(struct file *file, char __user *ubuf, RX_STATS(bam_stats.bamFifoUsageHigh), RX_STATS(bam_stats.bamFifoUsageLow), RX_STATS(bam_stats.bamUtilCount), RX_STATS(num_bam_int_handled), RX_STATS(num_db), RX_STATS(num_unexpected_db), RX_STATS(num_pkts_in_dis_uninit_state), RX_STATS(num_bam_int_handled_while_not_in_bam), RX_STATS(num_bam_int_handled_while_in_bam_state)); RX_STATS(num_db)); cnt += nbytes; } else { nbytes = scnprintf(dbg_buff, IPA_MAX_MSG_LEN, Loading Loading
drivers/platform/msm/ipa/ipa_clients/ipa_uc_offload.c +29 −29 Original line number Diff line number Diff line /* Copyright (c) 2015, 2016 The Linux Foundation. All rights reserved. /* Copyright (c) 2016-2017 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 Loading Loading @@ -131,23 +131,23 @@ static int ipa_uc_offload_ntn_reg_intf( IPA_UC_OFFLOAD_DBG("register interface for netdev %s\n", inp->netdev_name); memset(¶m, 0, sizeof(param)); param.name = IPA_RM_RESOURCE_ODU_ADAPT_PROD; param.name = IPA_RM_RESOURCE_ETHERNET_PROD; param.reg_params.user_data = ntn_ctx; param.reg_params.notify_cb = ipa_uc_offload_rm_notify; param.floor_voltage = IPA_VOLTAGE_SVS; ret = ipa_rm_create_resource(¶m); if (ret) { IPA_UC_OFFLOAD_ERR("fail to create ODU_ADAPT_PROD resource\n"); IPA_UC_OFFLOAD_ERR("fail to create ETHERNET_PROD resource\n"); return -EFAULT; } memset(¶m, 0, sizeof(param)); param.name = IPA_RM_RESOURCE_ODU_ADAPT_CONS; param.name = IPA_RM_RESOURCE_ETHERNET_CONS; param.request_resource = ipa_uc_ntn_cons_request; param.release_resource = ipa_uc_ntn_cons_release; ret = ipa_rm_create_resource(¶m); if (ret) { IPA_UC_OFFLOAD_ERR("fail to create ODU_ADAPT_CONS resource\n"); IPA_UC_OFFLOAD_ERR("fail to create ETHERNET_CONS resource\n"); goto fail_create_rm_cons; } Loading Loading @@ -177,13 +177,13 @@ static int ipa_uc_offload_ntn_reg_intf( memset(tx_prop, 0, sizeof(tx_prop)); tx_prop[0].ip = IPA_IP_v4; tx_prop[0].dst_pipe = IPA_CLIENT_ODU_TETH_CONS; tx_prop[0].dst_pipe = IPA_CLIENT_ETHERNET_CONS; tx_prop[0].hdr_l2_type = inp->hdr_info[0].hdr_type; memcpy(tx_prop[0].hdr_name, hdr->hdr[IPA_IP_v4].name, sizeof(tx_prop[0].hdr_name)); tx_prop[1].ip = IPA_IP_v6; tx_prop[1].dst_pipe = IPA_CLIENT_ODU_TETH_CONS; tx_prop[1].dst_pipe = IPA_CLIENT_ETHERNET_CONS; tx_prop[1].hdr_l2_type = inp->hdr_info[1].hdr_type; memcpy(tx_prop[1].hdr_name, hdr->hdr[IPA_IP_v6].name, sizeof(tx_prop[1].hdr_name)); Loading @@ -194,7 +194,7 @@ static int ipa_uc_offload_ntn_reg_intf( memset(rx_prop, 0, sizeof(rx_prop)); rx_prop[0].ip = IPA_IP_v4; rx_prop[0].src_pipe = IPA_CLIENT_ODU_PROD; rx_prop[0].src_pipe = IPA_CLIENT_ETHERNET_PROD; rx_prop[0].hdr_l2_type = inp->hdr_info[0].hdr_type; if (inp->is_meta_data_valid) { rx_prop[0].attrib.attrib_mask |= IPA_FLT_META_DATA; Loading @@ -203,7 +203,7 @@ static int ipa_uc_offload_ntn_reg_intf( } rx_prop[1].ip = IPA_IP_v6; rx_prop[1].src_pipe = IPA_CLIENT_ODU_PROD; rx_prop[1].src_pipe = IPA_CLIENT_ETHERNET_PROD; rx_prop[1].hdr_l2_type = inp->hdr_info[1].hdr_type; if (inp->is_meta_data_valid) { rx_prop[1].attrib.attrib_mask |= IPA_FLT_META_DATA; Loading @@ -229,9 +229,9 @@ static int ipa_uc_offload_ntn_reg_intf( fail: kfree(hdr); fail_alloc: ipa_rm_delete_resource(IPA_RM_RESOURCE_ODU_ADAPT_CONS); ipa_rm_delete_resource(IPA_RM_RESOURCE_ETHERNET_CONS); fail_create_rm_cons: ipa_rm_delete_resource(IPA_RM_RESOURCE_ODU_ADAPT_PROD); ipa_rm_delete_resource(IPA_RM_RESOURCE_ETHERNET_PROD); return ret; } Loading Loading @@ -349,18 +349,18 @@ int ipa_uc_ntn_conn_pipes(struct ipa_ntn_conn_in_params *inp, return -EINVAL; } result = ipa_rm_add_dependency(IPA_RM_RESOURCE_ODU_ADAPT_PROD, result = ipa_rm_add_dependency(IPA_RM_RESOURCE_ETHERNET_PROD, IPA_RM_RESOURCE_APPS_CONS); if (result) { IPA_UC_OFFLOAD_ERR("fail to add rm dependency: %d\n", result); return result; } result = ipa_rm_request_resource(IPA_RM_RESOURCE_ODU_ADAPT_PROD); result = ipa_rm_request_resource(IPA_RM_RESOURCE_ETHERNET_PROD); if (result == -EINPROGRESS) { if (wait_for_completion_timeout(&ntn_ctx->ntn_completion, 10*HZ) == 0) { IPA_UC_OFFLOAD_ERR("ODU PROD resource req time out\n"); IPA_UC_OFFLOAD_ERR("ETH_PROD resource req time out\n"); result = -EFAULT; goto fail; } Loading @@ -384,7 +384,7 @@ int ipa_uc_ntn_conn_pipes(struct ipa_ntn_conn_in_params *inp, return 0; fail: ipa_rm_delete_dependency(IPA_RM_RESOURCE_ODU_ADAPT_PROD, ipa_rm_delete_dependency(IPA_RM_RESOURCE_ETHERNET_PROD, IPA_RM_RESOURCE_APPS_CONS); return result; } Loading Loading @@ -448,10 +448,10 @@ int ipa_set_perf_profile(struct ipa_perf_profile *profile) rm_profile.max_supported_bandwidth_mbps = profile->max_supported_bw_mbps; if (profile->client == IPA_CLIENT_ODU_PROD) { resource_name = IPA_RM_RESOURCE_ODU_ADAPT_PROD; } else if (profile->client == IPA_CLIENT_ODU_TETH_CONS) { resource_name = IPA_RM_RESOURCE_ODU_ADAPT_CONS; if (profile->client == IPA_CLIENT_ETHERNET_PROD) { resource_name = IPA_RM_RESOURCE_ETHERNET_PROD; } else if (profile->client == IPA_CLIENT_ETHERNET_CONS) { resource_name = IPA_RM_RESOURCE_ETHERNET_CONS; } else { IPA_UC_OFFLOAD_ERR("not supported\n"); return -EINVAL; Loading @@ -473,22 +473,22 @@ static int ipa_uc_ntn_disconn_pipes(struct ipa_uc_offload_ctx *ntn_ctx) ntn_ctx->state = IPA_UC_OFFLOAD_STATE_DOWN; ret = ipa_rm_release_resource(IPA_RM_RESOURCE_ODU_ADAPT_PROD); ret = ipa_rm_release_resource(IPA_RM_RESOURCE_ETHERNET_PROD); if (ret) { IPA_UC_OFFLOAD_ERR("fail to release ODU_ADAPT_PROD res: %d\n", IPA_UC_OFFLOAD_ERR("fail to release ETHERNET_PROD res: %d\n", ret); return -EFAULT; } ret = ipa_rm_delete_dependency(IPA_RM_RESOURCE_ODU_ADAPT_PROD, ret = ipa_rm_delete_dependency(IPA_RM_RESOURCE_ETHERNET_PROD, IPA_RM_RESOURCE_APPS_CONS); if (ret) { IPA_UC_OFFLOAD_ERR("fail to del dep ODU->APPS, %d\n", ret); IPA_UC_OFFLOAD_ERR("fail to del dep ETH_PROD->APPS, %d\n", ret); return -EFAULT; } ipa_ep_idx_ul = ipa_get_ep_mapping(IPA_CLIENT_ODU_PROD); ipa_ep_idx_dl = ipa_get_ep_mapping(IPA_CLIENT_ODU_TETH_CONS); ipa_ep_idx_ul = ipa_get_ep_mapping(IPA_CLIENT_ETHERNET_PROD); ipa_ep_idx_dl = ipa_get_ep_mapping(IPA_CLIENT_ETHERNET_CONS); ret = ipa_tear_down_uc_offload_pipes(ipa_ep_idx_ul, ipa_ep_idx_dl); if (ret) { IPA_UC_OFFLOAD_ERR("fail to tear down ntn offload pipes, %d\n", Loading Loading @@ -541,13 +541,13 @@ static int ipa_uc_ntn_cleanup(struct ipa_uc_offload_ctx *ntn_ctx) int len, result = 0; struct ipa_ioc_del_hdr *hdr; if (ipa_rm_delete_resource(IPA_RM_RESOURCE_ODU_ADAPT_PROD)) { IPA_UC_OFFLOAD_ERR("fail to delete ODU_ADAPT_PROD resource\n"); if (ipa_rm_delete_resource(IPA_RM_RESOURCE_ETHERNET_PROD)) { IPA_UC_OFFLOAD_ERR("fail to delete ETHERNET_PROD resource\n"); return -EFAULT; } if (ipa_rm_delete_resource(IPA_RM_RESOURCE_ODU_ADAPT_CONS)) { IPA_UC_OFFLOAD_ERR("fail to delete ODU_ADAPT_CONS resource\n"); if (ipa_rm_delete_resource(IPA_RM_RESOURCE_ETHERNET_CONS)) { IPA_UC_OFFLOAD_ERR("fail to delete ETHERNET_CONS resource\n"); return -EFAULT; } Loading
drivers/platform/msm/ipa/ipa_rm.c +3 −1 Original line number Diff line number Diff line /* Copyright (c) 2013-2016, The Linux Foundation. All rights reserved. /* Copyright (c) 2013-2017, 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 Loading Loading @@ -28,6 +28,7 @@ static const char *resource_name_to_str[IPA_RM_RESOURCE_MAX] = { __stringify(IPA_RM_RESOURCE_WLAN_PROD), __stringify(IPA_RM_RESOURCE_ODU_ADAPT_PROD), __stringify(IPA_RM_RESOURCE_MHI_PROD), __stringify(IPA_RM_RESOURCE_ETHERNET_PROD), __stringify(IPA_RM_RESOURCE_Q6_CONS), __stringify(IPA_RM_RESOURCE_USB_CONS), __stringify(IPA_RM_RESOURCE_USB_DPL_CONS), Loading @@ -36,6 +37,7 @@ static const char *resource_name_to_str[IPA_RM_RESOURCE_MAX] = { __stringify(IPA_RM_RESOURCE_APPS_CONS), __stringify(IPA_RM_RESOURCE_ODU_ADAPT_CONS), __stringify(IPA_RM_RESOURCE_MHI_CONS), __stringify(IPA_RM_RESOURCE_ETHERNET_CONS), }; struct ipa_rm_profile_vote_type { Loading
drivers/platform/msm/ipa/ipa_rm_resource.c +3 −1 Original line number Diff line number Diff line /* Copyright (c) 2013-2016, The Linux Foundation. All rights reserved. /* Copyright (c) 2013-2017, 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 Loading Loading @@ -38,6 +38,7 @@ int ipa_rm_prod_index(enum ipa_rm_resource_name resource_name) case IPA_RM_RESOURCE_WLAN_PROD: case IPA_RM_RESOURCE_ODU_ADAPT_PROD: case IPA_RM_RESOURCE_MHI_PROD: case IPA_RM_RESOURCE_ETHERNET_PROD: break; default: result = IPA_RM_INDEX_INVALID; Loading Loading @@ -69,6 +70,7 @@ int ipa_rm_cons_index(enum ipa_rm_resource_name resource_name) case IPA_RM_RESOURCE_ODU_ADAPT_CONS: case IPA_RM_RESOURCE_MHI_CONS: case IPA_RM_RESOURCE_USB_DPL_CONS: case IPA_RM_RESOURCE_ETHERNET_CONS: break; default: result = IPA_RM_INDEX_INVALID; Loading
drivers/platform/msm/ipa/ipa_v2/ipa_utils.c +17 −2 Original line number Diff line number Diff line Loading @@ -94,6 +94,7 @@ static const int ep_mapping[3][IPA_CLIENT_MAX] = { [IPA_1_1][IPA_CLIENT_Q6_LAN_PROD] = 5, [IPA_1_1][IPA_CLIENT_Q6_WAN_PROD] = -1, [IPA_1_1][IPA_CLIENT_Q6_CMD_PROD] = -1, [IPA_1_1][IPA_CLIENT_ETHERNET_PROD] = -1, [IPA_1_1][IPA_CLIENT_HSIC1_CONS] = 14, [IPA_1_1][IPA_CLIENT_WLAN1_CONS] = -1, Loading @@ -119,6 +120,7 @@ static const int ep_mapping[3][IPA_CLIENT_MAX] = { [IPA_1_1][IPA_CLIENT_MHI_CONS] = -1, [IPA_1_1][IPA_CLIENT_Q6_LAN_CONS] = 4, [IPA_1_1][IPA_CLIENT_Q6_WAN_CONS] = -1, [IPA_1_1][IPA_CLIENT_ETHERNET_CONS] = -1, [IPA_2_0][IPA_CLIENT_HSIC1_PROD] = 12, Loading Loading @@ -148,6 +150,7 @@ static const int ep_mapping[3][IPA_CLIENT_MAX] = { = 12, [IPA_2_0][IPA_CLIENT_MEMCPY_DMA_ASYNC_PROD] = 19, [IPA_2_0][IPA_CLIENT_ETHERNET_PROD] = 12, /* Only for test purpose */ [IPA_2_0][IPA_CLIENT_TEST_PROD] = 19, [IPA_2_0][IPA_CLIENT_TEST1_PROD] = 19, Loading Loading @@ -188,6 +191,7 @@ static const int ep_mapping[3][IPA_CLIENT_MAX] = { = 16, [IPA_2_0][IPA_CLIENT_Q6_LTE_WIFI_AGGR_CONS] = 10, [IPA_2_0][IPA_CLIENT_ETHERNET_CONS] = 1, /* Only for test purpose */ [IPA_2_0][IPA_CLIENT_TEST_CONS] = 1, [IPA_2_0][IPA_CLIENT_TEST1_CONS] = 1, Loading Loading @@ -223,6 +227,7 @@ static const int ep_mapping[3][IPA_CLIENT_MAX] = { = -1, [IPA_2_6L][IPA_CLIENT_MEMCPY_DMA_ASYNC_PROD] = -1, [IPA_2_6L][IPA_CLIENT_ETHERNET_PROD] = -1, /* Only for test purpose */ [IPA_2_6L][IPA_CLIENT_TEST_PROD] = 11, [IPA_2_6L][IPA_CLIENT_TEST1_PROD] = 11, Loading Loading @@ -263,6 +268,7 @@ static const int ep_mapping[3][IPA_CLIENT_MAX] = { = -1, [IPA_2_6L][IPA_CLIENT_Q6_LTE_WIFI_AGGR_CONS] = -1, [IPA_2_6L][IPA_CLIENT_ETHERNET_CONS] = -1, /* Only for test purpose */ [IPA_2_6L][IPA_CLIENT_TEST_CONS] = 15, [IPA_2_6L][IPA_CLIENT_TEST1_CONS] = 15, Loading Loading @@ -457,6 +463,9 @@ int ipa_get_clients_from_rm_resource( clients->names[i++] = IPA_CLIENT_ODU_EMB_CONS; clients->names[i++] = IPA_CLIENT_ODU_TETH_CONS; break; case IPA_RM_RESOURCE_ETHERNET_CONS: clients->names[i++] = IPA_CLIENT_ETHERNET_CONS; break; case IPA_RM_RESOURCE_USB_PROD: clients->names[i++] = IPA_CLIENT_USB_PROD; break; Loading @@ -468,6 +477,10 @@ int ipa_get_clients_from_rm_resource( break; case IPA_RM_RESOURCE_ODU_ADAPT_PROD: clients->names[i++] = IPA_CLIENT_ODU_PROD; break; case IPA_RM_RESOURCE_ETHERNET_PROD: clients->names[i++] = IPA_CLIENT_ETHERNET_PROD; break; default: break; } Loading Loading @@ -507,7 +520,8 @@ bool ipa_should_pipe_be_suspended(enum ipa_client_type client) client == IPA_CLIENT_WLAN3_CONS || client == IPA_CLIENT_WLAN4_CONS || client == IPA_CLIENT_ODU_EMB_CONS || client == IPA_CLIENT_ODU_TETH_CONS) client == IPA_CLIENT_ODU_TETH_CONS || client == IPA_CLIENT_ETHERNET_CONS) return true; return false; Loading Loading @@ -3630,7 +3644,8 @@ int ipa2_write_qmap_id(struct ipa_ioc_write_qmapid *param_in) meta.qmap_id = param_in->qmap_id; if (param_in->client == IPA_CLIENT_USB_PROD || param_in->client == IPA_CLIENT_HSIC1_PROD || param_in->client == IPA_CLIENT_ODU_PROD) { param_in->client == IPA_CLIENT_ODU_PROD || param_in->client == IPA_CLIENT_ETHERNET_PROD) { result = ipa2_cfg_ep_metadata(ipa_ep_idx, &meta); } else if (param_in->client == IPA_CLIENT_WLAN1_PROD) { ipa_ctx->ep[ipa_ep_idx].cfg.meta = meta; Loading
drivers/platform/msm/ipa/ipa_v3/ipa_debugfs.c +4 −24 Original line number Diff line number Diff line Loading @@ -1213,12 +1213,7 @@ static ssize_t ipa3_read_ntn(struct file *file, char __user *ubuf, "TX bamFifoUsageLow=%u\n" "TX bamUtilCount=%u\n" "TX num_db=%u\n" "TX num_unexpected_db=%u\n" "TX num_bam_int_handled=%u\n" "TX num_bam_int_in_non_running_state=%u\n" "TX num_qmb_int_handled=%u\n" "TX num_bam_int_handled_while_wait_for_bam=%u\n" "TX num_bam_int_handled_while_not_in_bam=%u\n", "TX num_qmb_int_handled=%u\n", TX_STATS(num_pkts_processed), TX_STATS(tail_ptr_val), TX_STATS(num_db_fired), Loading @@ -1233,12 +1228,7 @@ static ssize_t ipa3_read_ntn(struct file *file, char __user *ubuf, TX_STATS(bam_stats.bamFifoUsageLow), TX_STATS(bam_stats.bamUtilCount), TX_STATS(num_db), TX_STATS(num_unexpected_db), TX_STATS(num_bam_int_handled), TX_STATS(num_bam_int_in_non_running_state), TX_STATS(num_qmb_int_handled), TX_STATS(num_bam_int_handled_while_wait_for_bam), TX_STATS(num_bam_int_handled_while_not_in_bam)); TX_STATS(num_qmb_int_handled)); cnt += nbytes; nbytes = scnprintf(dbg_buff + cnt, IPA_MAX_MSG_LEN - cnt, "RX max_outstanding_pkts=%u\n" Loading @@ -1254,12 +1244,7 @@ static ssize_t ipa3_read_ntn(struct file *file, char __user *ubuf, "RX bamFifoUsageHigh=%u\n" "RX bamFifoUsageLow=%u\n" "RX bamUtilCount=%u\n" "RX num_bam_int_handled=%u\n" "RX num_db=%u\n" "RX num_unexpected_db=%u\n" "RX num_pkts_in_dis_uninit_state=%u\n" "num_ic_inj_vdev_change=%u\n" "num_ic_inj_fw_desc_change=%u\n", "RX num_db=%u\n", RX_STATS(max_outstanding_pkts), RX_STATS(num_pkts_processed), RX_STATS(rx_ring_rp_value), Loading @@ -1273,12 +1258,7 @@ static ssize_t ipa3_read_ntn(struct file *file, char __user *ubuf, RX_STATS(bam_stats.bamFifoUsageHigh), RX_STATS(bam_stats.bamFifoUsageLow), RX_STATS(bam_stats.bamUtilCount), RX_STATS(num_bam_int_handled), RX_STATS(num_db), RX_STATS(num_unexpected_db), RX_STATS(num_pkts_in_dis_uninit_state), RX_STATS(num_bam_int_handled_while_not_in_bam), RX_STATS(num_bam_int_handled_while_in_bam_state)); RX_STATS(num_db)); cnt += nbytes; } else { nbytes = scnprintf(dbg_buff, IPA_MAX_MSG_LEN, Loading