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

Commit 7af7acca authored by Yue Ma's avatar Yue Ma Committed by Gerrit - the friendly Code Review server
Browse files

cnss2: Ignore triggering assert if device is already in bad state



There is no need to handle firmware assert if device is already in
bad state so just directly ignore it.

Change-Id: I594754d8bbed3e6aefc8b2e859d4542def0b1aaf
Signed-off-by: default avatarYue Ma <yuem@codeaurora.org>
parent 6065592e
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -1546,9 +1546,8 @@ int cnss_pci_force_fw_assert_hdlr(struct cnss_pci_data *pci_priv)
	if (!plat_priv)
		return -ENODEV;

	if (test_bit(CNSS_MHI_RDDM_DONE, &pci_priv->mhi_state)) {
		cnss_pr_err("RDDM already collected 0x%x, return\n",
			    pci_priv->mhi_state);
	if (cnss_pci_is_device_down(&pci_priv->pci_dev->dev)) {
		cnss_pr_info("Device is already in bad state, ignore force assert\n");
		return 0;
	}

@@ -2284,6 +2283,7 @@ static void cnss_pci_set_mhi_state_bit(struct cnss_pci_data *pci_priv,
	case CNSS_MHI_POWER_OFF:
	case CNSS_MHI_FORCE_POWER_OFF:
		clear_bit(CNSS_MHI_POWER_ON, &pci_priv->mhi_state);
		clear_bit(CNSS_MHI_TRIGGER_RDDM, &pci_priv->mhi_state);
		clear_bit(CNSS_MHI_RDDM_DONE, &pci_priv->mhi_state);
		break;
	case CNSS_MHI_SUSPEND:
@@ -2293,6 +2293,7 @@ static void cnss_pci_set_mhi_state_bit(struct cnss_pci_data *pci_priv,
		clear_bit(CNSS_MHI_SUSPEND, &pci_priv->mhi_state);
		break;
	case CNSS_MHI_TRIGGER_RDDM:
		set_bit(CNSS_MHI_TRIGGER_RDDM, &pci_priv->mhi_state);
		break;
	case CNSS_MHI_RDDM_DONE:
		set_bit(CNSS_MHI_RDDM_DONE, &pci_priv->mhi_state);