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

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

Merge "cnss2: Check PCIe link status before dumping registers"

parents 6322268b e65b033e
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -357,6 +357,11 @@ static int cnss_pci_check_link_status(struct cnss_pci_data *pci_priv)
{
	u16 device_id;

	if (pci_priv->pci_link_state == PCI_LINK_DOWN) {
		cnss_pr_dbg("PCIe link is suspended\n");
		return -EIO;
	}

	if (pci_priv->pci_link_down_ind) {
		cnss_pr_err("PCIe link is down\n");
		return -EIO;
@@ -2159,6 +2164,9 @@ void cnss_pci_collect_dump_info(struct cnss_pci_data *pci_priv, bool in_panic)
		return;
	}

	if (cnss_pci_check_link_status(pci_priv))
		return;

	cnss_pci_dump_qdss_reg(pci_priv);

	ret = mhi_download_rddm_img(pci_priv->mhi_ctrl, in_panic);