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

Commit 9399e4a1 authored by Mohammed Siddiq's avatar Mohammed Siddiq
Browse files

cnss2: Add code to do PCIe L2 suspend/resume during link recovery



Add code to do PCIe L2 suspend/resume during link down recovery.

Change-Id: I495d63b6cd7d826e7fbff627b3fe74af51c56099
Signed-off-by: default avatarMohammed Siddiq <msiddiq@codeaurora.org>
parent 1ea05851
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/* Copyright (c) 2016-2020, The Linux Foundation. All rights reserved. */
/* Copyright (c) 2016-2021, The Linux Foundation. All rights reserved. */

#include <linux/cma.h>
#include <linux/firmware.h>
@@ -891,6 +891,8 @@ int cnss_pci_recover_link_down(struct cnss_pci_data *pci_priv)
	 */
	msleep(WAKE_EVENT_TIMEOUT);

	/* Always do PCIe L2 suspend/resume during link down recovery */
	pci_priv->drv_connected_last = 0;
	ret = cnss_suspend_pci_link(pci_priv);
	if (ret)
		cnss_pr_err("Failed to suspend PCI link, err = %d\n", ret);