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

Commit 63f0dd25 authored by Mahesh Kumar Kalikot Veetil's avatar Mahesh Kumar Kalikot Veetil
Browse files

cnss2: Avoid pci register access after link fail



During PCI resume, if link training fails, avoid accessing
PCI register to set link speed.

Change-Id: I04b243405ebb8e05e4b672ff4fe5f01fede33665
CRs-Fixed: 2474888
Signed-off-by: default avatarMahesh Kumar Kalikot Veetil <mkalikot@codeaurora.org>
parent 2fd9b6ce
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -422,8 +422,10 @@ static int cnss_set_pci_link(struct cnss_pci_data *pci_priv, bool link_up)
		cnss_pr_err("Failed to %s PCI link with default option, err = %d\n",
			    link_up ? "resume" : "suspend", ret);

	if ((link_up || (!link_up && ret)) && pci_priv->drv_connected_last)
	if (pci_priv->drv_connected_last) {
		if ((link_up && !ret) || (!link_up && ret))
			cnss_set_pci_link_status(pci_priv, PCI_DEF);
	}

	return ret;
}