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

Commit fb1612ba authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "cnss2: Collect device RAM dump during WLAN driver unload"

parents 7ae0095e 2bc9d1d0
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -984,6 +984,11 @@ void cnss_schedule_recovery(struct device *dev,

	cnss_bus_update_status(plat_priv, CNSS_FW_DOWN);

	if (test_bit(CNSS_DRIVER_UNLOADING, &plat_priv->driver_state)) {
		cnss_pr_dbg("Driver unload is in progress, ignore schedule recovery\n");
		return;
	}

	if (in_interrupt() || irqs_disabled())
		gfp = GFP_ATOMIC;

+18 −5
Original line number Diff line number Diff line
@@ -373,6 +373,18 @@ int cnss_pci_update_status(struct cnss_pci_data *pci_priv,
	return 0;
}

#ifdef CONFIG_CNSS2_DEBUG
static void cnss_pci_collect_dump(struct cnss_pci_data *pci_priv)
{
	cnss_pci_collect_dump_info(pci_priv, false);
	CNSS_ASSERT(0);
}
#else
static void cnss_pci_collect_dump(struct cnss_pci_data *pci_priv)
{
}
#endif

static int cnss_qca6174_powerup(struct cnss_pci_data *pci_priv)
{
	int ret = 0;
@@ -531,6 +543,12 @@ static int cnss_qca6290_shutdown(struct cnss_pci_data *pci_priv)
	cnss_pci_set_monitor_wake_intr(pci_priv, false);
	cnss_pci_set_auto_suspended(pci_priv, 0);

	if (test_bit(CNSS_DRIVER_UNLOADING, &plat_priv->driver_state) &&
	    test_bit(CNSS_DEV_ERR_NOTIFY, &plat_priv->driver_state)) {
		del_timer(&pci_priv->dev_rddm_timer);
		cnss_pci_collect_dump(pci_priv);
	}

	cnss_pci_stop_mhi(pci_priv);

	ret = cnss_suspend_pci_link(pci_priv);
@@ -2069,11 +2087,6 @@ static void cnss_mhi_notify_status(struct mhi_controller *mhi_ctrl, void *priv,
	cnss_pr_dbg("MHI status cb is called with reason %s(%d)\n",
		    cnss_mhi_notify_status_to_str(reason), reason);

	if (test_bit(CNSS_DRIVER_UNLOADING, &plat_priv->driver_state)) {
		cnss_pr_dbg("Driver unload is in progress, ignore device error\n");
		return;
	}

	switch (reason) {
	case MHI_CB_IDLE:
		return;