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

Commit 7b2fb41b authored by Komal Seelam's avatar Komal Seelam Committed by Komal Seelam
Browse files

cnss: Use Different Dump Names for QCA PCIe and SDIO targets



On Dual-WiFi platforms, SDIO and PCIe dumps are overwritten by
the crashscope, as they use the same dump name.
Use different dump names to distinguish the dump between SDIO and PCIe.

CRs-Fixed: 1037346
Change-Id: Id1ef6a8b6bc5a47ffea63f214c49ebd99abed0ff
Signed-off-by: default avatarKomal Seelam <kseelam@codeaurora.org>
parent 05a0c86d
Loading
Loading
Loading
Loading
+26 −19
Original line number Diff line number Diff line
@@ -2770,14 +2770,8 @@ static void cnss_crash_shutdown(const struct subsys_desc *subsys)
	wdrv = penv->driver;
	pdev = penv->pdev;

	penv->dump_data.version = CNSS_DUMP_FORMAT_VER;
	strlcpy(penv->dump_data.name, CNSS_DUMP_NAME,
			sizeof(penv->dump_data.name));

	if (pdev && wdrv && wdrv->crash_shutdown)
		wdrv->crash_shutdown(pdev);

	penv->dump_data.magic = CNSS_DUMP_MAGIC_VER_V2;
}

void cnss_device_self_recovery(void)
@@ -2838,6 +2832,28 @@ static struct notifier_block mnb = {
	.notifier_call = cnss_modem_notifier_nb,
};

static int cnss_init_dump_entry(void)
{
	struct msm_dump_entry dump_entry;

	if (!penv)
		return -ENODEV;

	if (!penv->ramdump_dynamic)
		return 0;

	penv->dump_data.addr = penv->ramdump_phys;
	penv->dump_data.len = penv->ramdump_size;
	penv->dump_data.version = CNSS_DUMP_FORMAT_VER;
	penv->dump_data.magic = CNSS_DUMP_MAGIC_VER_V2;
	strlcpy(penv->dump_data.name, CNSS_DUMP_NAME,
		sizeof(penv->dump_data.name));
	dump_entry.id = MSM_DUMP_DATA_CNSS_WLAN;
	dump_entry.addr = virt_to_phys(&penv->dump_data);

	return msm_dump_data_register(MSM_DUMP_TABLE_APPS, &dump_entry);
}

static int cnss_probe(struct platform_device *pdev)
{
	int ret = 0;
@@ -2845,7 +2861,6 @@ static int cnss_probe(struct platform_device *pdev)
	const char *client_desc;
	struct device *dev = &pdev->dev;
	u32 rc_num;
	struct msm_dump_entry dump_entry;
	struct resource *res;
	u32 ramdump_size = 0;
	u32 smmu_iova_address[2];
@@ -2961,19 +2976,11 @@ static int cnss_probe(struct platform_device *pdev)
		goto skip_ramdump;
	}

	if (penv->ramdump_dynamic) {
		penv->dump_data.addr = penv->ramdump_phys;
		penv->dump_data.len = penv->ramdump_size;
		dump_entry.id = MSM_DUMP_DATA_CNSS_WLAN;
		dump_entry.addr = virt_to_phys(&penv->dump_data);

		ret = msm_dump_data_register(MSM_DUMP_TABLE_APPS, &dump_entry);
	ret = cnss_init_dump_entry();
	if (ret) {
			pr_err("%s: Dump table setup failed: %d\n",
					__func__, ret);
		pr_err("%s: Dump table setup failed: %d\n", __func__, ret);
		goto err_ramdump_create;
	}
	}

	penv->ramdump_dev = create_ramdump_device(penv->subsysdesc.name,
				penv->subsysdesc.dev);
+1 −1
Original line number Diff line number Diff line
@@ -46,7 +46,7 @@
/* Values for Dynamic Ramdump Collection*/
#define CNSS_DUMP_FORMAT_VER	0x11
#define CNSS_DUMP_MAGIC_VER_V2	0x42445953
#define CNSS_DUMP_NAME		"CNSS_WLAN"
#define CNSS_DUMP_NAME		"CNSS_WLAN_SDIO"
#define CNSS_PINCTRL_SLEEP_STATE	"sleep"
#define CNSS_PINCTRL_ACTIVE_STATE	"active"