summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiangwei Dong <liangwei@codeaurora.org>2017-07-05 02:00:01 -0400
committerLiangwei Dong <liangwei@codeaurora.org>2017-07-08 03:11:02 -0400
commit2f483c49bf39a8d6eb874e953a3de548072555e0 (patch)
treedfe18ac122ed900b1ff44342f727e4bcee302d7d
parente4d8bf59202a54b45195c37c73844efa9a58c6f0 (diff)
downloadqcacld-2f483c49bf39a8d6eb874e953a3de548072555e0.tar.gz
qcacld-3.0: skip FW dump for SDIO SSR
Skip FW memory dump in SSR case for HL SDIO solution. HL SDIO uses the diag read API to read by 4 bytes, which is too slow to meet SSR time requirement. Change-Id: Iacde90ab0ec84f29f3744bf4497ec8fd8517600a CRs-Fixed: 2071329
-rw-r--r--core/bmi/src/ol_fw.c5
-rw-r--r--core/pld/inc/pld_common.h1
-rw-r--r--core/pld/src/pld_common.c24
-rw-r--r--core/pld/src/pld_sdio.h10
4 files changed, 38 insertions, 2 deletions
diff --git a/core/bmi/src/ol_fw.c b/core/bmi/src/ol_fw.c
index 3d47364c06..d55d5ba68f 100644
--- a/core/bmi/src/ol_fw.c
+++ b/core/bmi/src/ol_fw.c
@@ -493,7 +493,10 @@ int ol_copy_ramdump(struct hif_opaque_softc *scn)
BMI_ERR("%s qdf_dev is NULL", __func__);
return -EINVAL;
}
-
+ if (pld_is_fw_dump_skipped(qdf_dev->dev)) {
+ BMI_INFO("%s ssr enabled, skip ramdump", __func__);
+ return 0;
+ }
info = qdf_mem_malloc(sizeof(struct ramdump_info));
if (!info) {
BMI_ERR("%s Memory for Ramdump Allocation failed", __func__);
diff --git a/core/pld/inc/pld_common.h b/core/pld/inc/pld_common.h
index 21ff043d94..ac746479e6 100644
--- a/core/pld/inc/pld_common.h
+++ b/core/pld/inc/pld_common.h
@@ -528,4 +528,5 @@ int pld_smmu_map(struct device *dev, phys_addr_t paddr,
unsigned int pld_socinfo_get_serial_number(struct device *dev);
int pld_is_qmi_disable(struct device *dev);
int pld_force_assert_target(struct device *dev);
+bool pld_is_fw_dump_skipped(struct device *dev);
#endif
diff --git a/core/pld/src/pld_common.c b/core/pld/src/pld_common.c
index 5904878649..2aac2b9fd8 100644
--- a/core/pld/src/pld_common.c
+++ b/core/pld/src/pld_common.c
@@ -1442,3 +1442,27 @@ int pld_force_assert_target(struct device *dev)
}
return ret;
}
+
+/**
+ * pld_is_fw_dump_skipped() - get fw dump skipped status.
+ * The subsys ssr status help the driver to decide whether to skip
+ * the FW memory dump when FW assert.
+ * For SDIO case, the memory dump progress takes 1 minutes to
+ * complete, which is not acceptable in SSR enabled.
+ *
+ * Return: true if need to skip FW dump.
+ */
+bool pld_is_fw_dump_skipped(struct device *dev)
+{
+ bool ret = false;
+ enum pld_bus_type type = pld_get_bus_type(dev);
+
+ switch (type) {
+ case PLD_BUS_TYPE_SDIO:
+ ret = pld_sdio_is_fw_dump_skipped();
+ break;
+ default:
+ break;
+ }
+ return ret;
+}
diff --git a/core/pld/src/pld_sdio.h b/core/pld/src/pld_sdio.h
index 6324429196..d87f950621 100644
--- a/core/pld/src/pld_sdio.h
+++ b/core/pld/src/pld_sdio.h
@@ -109,7 +109,10 @@ static inline void pld_sdio_device_crashed(struct device *dev)
{
cnss_common_device_crashed(dev);
}
-
+static inline bool pld_sdio_is_fw_dump_skipped(void)
+{
+ return cnss_get_restart_level() == CNSS_RESET_SUBSYS_COUPLED;
+}
#else
static inline void *pld_sdio_get_virt_ramdump_mem(struct device *dev,
unsigned long *size)
@@ -120,6 +123,11 @@ static inline void *pld_sdio_get_virt_ramdump_mem(struct device *dev,
static inline void pld_sdio_device_crashed(struct device *dev)
{
}
+static inline bool pld_sdio_is_fw_dump_skipped(void)
+{
+ return false;
+}
+
#endif
void *pld_hif_sdio_get_virt_ramdump_mem(struct device *dev,
unsigned long *size);