summaryrefslogtreecommitdiff
path: root/drivers/platform/msm
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2019-05-01 00:57:37 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2019-05-01 00:57:36 -0700
commitf175c863efb474a4b2908f0867fac6eb5ceaf589 (patch)
tree388a243b0de734c0611921808e6525cb37f1a9bc /drivers/platform/msm
parent33ddfc515d055b98eb6b76cbf4573022579ca429 (diff)
parent67fabb639087711441c8b4db0bebf9307c1464c6 (diff)
Merge "msm: ipa3: add check to load gsi fw once"
Diffstat (limited to 'drivers/platform/msm')
-rw-r--r--drivers/platform/msm/ipa/ipa_v3/ipa.c11
-rw-r--r--drivers/platform/msm/ipa/ipa_v3/ipa_i.h3
2 files changed, 12 insertions, 2 deletions
diff --git a/drivers/platform/msm/ipa/ipa_v3/ipa.c b/drivers/platform/msm/ipa/ipa_v3/ipa.c
index dfff3b422659..48a5b4047144 100644
--- a/drivers/platform/msm/ipa/ipa_v3/ipa.c
+++ b/drivers/platform/msm/ipa/ipa_v3/ipa.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2012-2019, 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
@@ -4484,6 +4484,15 @@ static ssize_t ipa3_write(struct file *file, const char __user *buf,
if (ipa3_ctx->transport_prototype != IPA_TRANSPORT_TYPE_GSI)
return count;
+ /* Prevent multiple calls from trying to load the FW again. */
+ if (ipa3_ctx->fw_loaded) {
+ IPAERR("not load FW again\n");
+ return count;
+ }
+
+ /* Schedule WQ to load ipa-fws */
+ ipa3_ctx->fw_loaded = true;
+
IPA_ACTIVE_CLIENTS_INC_SIMPLE();
if (ipa3_is_msm_device() || (ipa3_ctx->ipa_hw_type >= IPA_HW_v3_5))
diff --git a/drivers/platform/msm/ipa/ipa_v3/ipa_i.h b/drivers/platform/msm/ipa/ipa_v3/ipa_i.h
index 0c55582d1571..4d6bc6fc859e 100644
--- a/drivers/platform/msm/ipa/ipa_v3/ipa_i.h
+++ b/drivers/platform/msm/ipa/ipa_v3/ipa_i.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2012-2019, 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
@@ -1296,6 +1296,7 @@ struct ipa3_context {
struct ipa_cne_evt ipa_cne_evt_req_cache[IPA_MAX_NUM_REQ_CACHE];
int num_ipa_cne_evt_req;
struct mutex ipa_cne_evt_lock;
+ bool fw_loaded;
};
/**