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

Commit 96cd6e3b authored by Yue Ma's avatar Yue Ma
Browse files

cnss2: Do not suspend PCIe link for emulation hardware



When CONFIG_CNSS_EMULATION is enabled, do not suspend PCIe link
and power off device after PCIe probe as it may not be supported.

Change-Id: I5194fd8cbe424903327a78e3be8cbb19571b5e1b
Signed-off-by: default avatarYue Ma <yuem@codeaurora.org>
parent 2aea12dd
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -50,6 +50,12 @@

#define FW_ASSERT_TIMEOUT		5000

#ifdef CONFIG_CNSS_EMULATION
#define EMULATION_HW			1
#else
#define EMULATION_HW			0
#endif

static DEFINE_SPINLOCK(pci_link_down_lock);

static unsigned int pci_link_down_panic;
@@ -2253,6 +2259,8 @@ static int cnss_pci_probe(struct pci_dev *pci_dev,
			cnss_pci_disable_msi(pci_priv);
			goto disable_bus;
		}
		if (EMULATION_HW)
			break;
		ret = cnss_suspend_pci_link(pci_priv);
		if (ret)
			cnss_pr_err("Failed to suspend PCI link, err = %d\n",