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

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

Merge "cnss2: Add debug assert on idle restart timeout"

parents 694fb7b3 094f1d2f
Loading
Loading
Loading
Loading
+13 −3
Original line number Diff line number Diff line
@@ -656,12 +656,22 @@ int cnss_idle_restart(struct device *dev)
	}

	timeout = cnss_get_boot_timeout(dev);
	/* In Idle restart power up sequence, we have fw_boot_timer to handle
	 * FW initialization failure. It uses WLAN_DRIVER_LOAD_TIMEOUT.
	 * Thus setup 3x that completion wait time to account for FW reinit /
	 * dump collection on retry.
	 */
	ret = wait_for_completion_timeout(&plat_priv->power_up_complete,
					  msecs_to_jiffies((timeout << 1) +
							   WLAN_WD_TIMEOUT_MS));
					  msecs_to_jiffies(timeout +
					  WLAN_MISSION_MODE_TIMEOUT * 3));
	if (!ret) {
		cnss_pr_err("Timeout waiting for idle restart to complete\n");
		/* This exception occurs after attempting retry of FW recovery.
		 * Thus we can safely power off the device.
		 */
		cnss_fatal_err("Timeout for idle restart to complete\n");
		ret = -ETIMEDOUT;
		cnss_power_down(dev);
		CNSS_ASSERT(0);
		goto out;
	}

+1 −1
Original line number Diff line number Diff line
@@ -26,7 +26,7 @@
#define RECOVERY_TIMEOUT		60000
#define WLAN_WD_TIMEOUT_MS		60000
#define WLAN_COLD_BOOT_CAL_TIMEOUT	60000
#define WLAN_DRIVER_LOAD_TIMEOUT	90000
#define WLAN_MISSION_MODE_TIMEOUT	30000
#define TIME_CLOCK_FREQ_HZ		19200000
#define CNSS_RAMDUMP_MAGIC		0x574C414E
#define CNSS_RAMDUMP_VERSION		0
+1 −1
Original line number Diff line number Diff line
@@ -1919,7 +1919,7 @@ static int cnss_qca6290_powerup(struct cnss_pci_data *pci_priv)
		if (test_bit(CNSS_IN_COLD_BOOT_CAL, &plat_priv->driver_state))
			timeout += WLAN_COLD_BOOT_CAL_TIMEOUT;
		else
			timeout += WLAN_DRIVER_LOAD_TIMEOUT;
			timeout += WLAN_MISSION_MODE_TIMEOUT;
		mod_timer(&plat_priv->fw_boot_timer,
			  jiffies + msecs_to_jiffies(timeout));
	}