Merge 562dff031d
on remote branch
Change-Id: I9e515820766ce95887a97da816bc499764ec8a85
This commit is contained in:
@@ -2011,11 +2011,6 @@ int ipa_teardown_sys_pipe(u32 clnt_hdl)
|
|||||||
netif_napi_del(&ep->sys->napi_tx);
|
netif_napi_del(&ep->sys->napi_tx);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IPA_CLIENT_IS_WAN_CONS(ep->client)) {
|
|
||||||
napi_disable(ep->sys->napi_obj);
|
|
||||||
netif_napi_del(ep->sys->napi_obj);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(ep->client == IPA_CLIENT_APPS_WAN_LOW_LAT_DATA_CONS) {
|
if(ep->client == IPA_CLIENT_APPS_WAN_LOW_LAT_DATA_CONS) {
|
||||||
napi_disable(&ep->sys->napi_rx);
|
napi_disable(&ep->sys->napi_rx);
|
||||||
netif_napi_del(&ep->sys->napi_rx);
|
netif_napi_del(&ep->sys->napi_rx);
|
||||||
@@ -2077,6 +2072,9 @@ int ipa_teardown_sys_pipe(u32 clnt_hdl)
|
|||||||
IPAERR("failed to teardown default coal pipe\n");
|
IPAERR("failed to teardown default coal pipe\n");
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
napi_disable(ep->sys->napi_obj);
|
||||||
|
netif_napi_del(ep->sys->napi_obj);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2226,6 +2224,19 @@ static int ipa3_teardown_pipe(u32 clnt_hdl)
|
|||||||
ipa_assert();
|
ipa_assert();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (IPA_CLIENT_IS_WAN_CONS(ep->client)) {
|
||||||
|
/* Wait for any pending irqs */
|
||||||
|
usleep_range(POLLING_MIN_SLEEP_RX, POLLING_MAX_SLEEP_RX);
|
||||||
|
/* Wait until end point moving to interrupt mode before teardown */
|
||||||
|
do {
|
||||||
|
usleep_range(95, 105);
|
||||||
|
} while (atomic_read(&ep->sys->curr_polling_state));
|
||||||
|
|
||||||
|
napi_disable(ep->sys->napi_obj);
|
||||||
|
netif_napi_del(ep->sys->napi_obj);
|
||||||
|
}
|
||||||
|
|
||||||
result = ipa3_reset_gsi_channel(clnt_hdl);
|
result = ipa3_reset_gsi_channel(clnt_hdl);
|
||||||
if (result != GSI_STATUS_SUCCESS) {
|
if (result != GSI_STATUS_SUCCESS) {
|
||||||
IPAERR("Failed to reset chan: %d.\n", result);
|
IPAERR("Failed to reset chan: %d.\n", result);
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
// SPDX-License-Identifier: GPL-2.0-only
|
// SPDX-License-Identifier: GPL-2.0-only
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2012-2021, The Linux Foundation. All rights reserved.
|
* Copyright (c) 2012-2021, The Linux Foundation. All rights reserved.
|
||||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
* Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/bitops.h>
|
#include <linux/bitops.h>
|
||||||
@@ -1105,12 +1105,14 @@ error:
|
|||||||
static int __ipa_finish_rt_rule_add(struct ipa3_rt_entry *entry, u32 *rule_hdl,
|
static int __ipa_finish_rt_rule_add(struct ipa3_rt_entry *entry, u32 *rule_hdl,
|
||||||
struct ipa3_rt_tbl *tbl)
|
struct ipa3_rt_tbl *tbl)
|
||||||
{
|
{
|
||||||
int id;
|
int id, res = 0;
|
||||||
|
|
||||||
if (tbl->rule_cnt < IPA_RULE_CNT_MAX)
|
if (tbl->rule_cnt < IPA_RULE_CNT_MAX)
|
||||||
tbl->rule_cnt++;
|
tbl->rule_cnt++;
|
||||||
else
|
else {
|
||||||
return -EINVAL;
|
res = -EINVAL;
|
||||||
|
goto failed;
|
||||||
|
}
|
||||||
if (entry->hdr)
|
if (entry->hdr)
|
||||||
entry->hdr->ref_cnt++;
|
entry->hdr->ref_cnt++;
|
||||||
else if (entry->proc_ctx)
|
else if (entry->proc_ctx)
|
||||||
@@ -1119,6 +1121,7 @@ static int __ipa_finish_rt_rule_add(struct ipa3_rt_entry *entry, u32 *rule_hdl,
|
|||||||
if (id < 0) {
|
if (id < 0) {
|
||||||
IPAERR_RL("failed to add to tree\n");
|
IPAERR_RL("failed to add to tree\n");
|
||||||
WARN_ON_RATELIMIT_IPA(1);
|
WARN_ON_RATELIMIT_IPA(1);
|
||||||
|
res = -EPERM;
|
||||||
goto ipa_insert_failed;
|
goto ipa_insert_failed;
|
||||||
}
|
}
|
||||||
IPADBG("add rt rule tbl_idx=%d rule_cnt=%d rule_id=%d\n",
|
IPADBG("add rt rule tbl_idx=%d rule_cnt=%d rule_id=%d\n",
|
||||||
@@ -1133,10 +1136,11 @@ ipa_insert_failed:
|
|||||||
entry->hdr->ref_cnt--;
|
entry->hdr->ref_cnt--;
|
||||||
else if (entry->proc_ctx)
|
else if (entry->proc_ctx)
|
||||||
entry->proc_ctx->ref_cnt--;
|
entry->proc_ctx->ref_cnt--;
|
||||||
|
failed:
|
||||||
idr_remove(tbl->rule_ids, entry->rule_id);
|
idr_remove(tbl->rule_ids, entry->rule_id);
|
||||||
list_del(&entry->link);
|
list_del(&entry->link);
|
||||||
kmem_cache_free(ipa3_ctx->rt_rule_cache, entry);
|
kmem_cache_free(ipa3_ctx->rt_rule_cache, entry);
|
||||||
return -EPERM;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int __ipa_add_rt_rule(enum ipa_ip_type ip, const char *name,
|
static int __ipa_add_rt_rule(enum ipa_ip_type ip, const char *name,
|
||||||
|
Reference in New Issue
Block a user