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

Commit 2a7bc9c2 authored by Alan Chen's avatar Alan Chen Committed by Madan Koyyalamudi
Browse files

qcacmn: Remove logic to enable/disable wake msi for drv systems

Remove logic to enable/disable wake msi for drv systems. Today, during
WoW suspend sequence, between hif pci bus suspend and hif pci bus
suspend no irq, wake msi is getting disable temporarily. In case
fw toggles wake msi during this period, then the wake msi is lost,
which can lead to device not waking up for fw triggered wakeup.
Add the fix to remove enable/disable wake msi from suspend/resume
path and keep wake msi always enabled.

Change-Id: Idad0805f66ead4079d67577fa1151f73567511a3
CRs-Fixed: 3042261
parent f69cbbc2
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
/*
 * Copyright (c) 2016-2018, 2020-2021 The Linux Foundation. All rights reserved.
 * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
 *
 * Permission to use, copy, modify, and/or distribute this software for
 * any purpose with or without fee is hereby granted, provided that the
@@ -477,7 +478,6 @@ int hif_apps_irqs_disable(struct hif_opaque_softc *hif_ctx)
		return -EINVAL;

	/* if the wake_irq is shared, don't disable it twice */
	disable_irq(scn->wake_irq);
	for (i = 0; i < scn->ce_count; ++i) {
		int irq = scn->bus_ops.hif_map_ce_to_irq(scn, i);

@@ -499,7 +499,6 @@ int hif_apps_irqs_enable(struct hif_opaque_softc *hif_ctx)
		return -EINVAL;

	/* if the wake_irq is shared, don't enable it twice */
	enable_irq(scn->wake_irq);
	for (i = 0; i < scn->ce_count; ++i) {
		int irq = scn->bus_ops.hif_map_ce_to_irq(scn, i);

+2 −4
Original line number Diff line number Diff line
@@ -2047,10 +2047,8 @@ irqreturn_t hif_wake_interrupt_handler(int irq, void *context)

	hif_info("wake interrupt received on irq %d", irq);

	if (hif_pm_runtime_get_monitor_wake_intr(hif_ctx)) {
	hif_pm_runtime_set_monitor_wake_intr(hif_ctx, 0);
	hif_pm_runtime_request_resume(hif_ctx);
	}

	if (scn->initial_wakeup_cb)
		scn->initial_wakeup_cb(scn->initial_wakeup_priv);
+1 −4
Original line number Diff line number Diff line
/*
 * Copyright (c) 2013-2021 The Linux Foundation. All rights reserved.
 * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
 *
 * Permission to use, copy, modify, and/or distribute this software for
 * any purpose with or without fee is hereby granted, provided that the
@@ -2403,8 +2404,6 @@ int hif_pci_bus_suspend_noirq(struct hif_softc *scn)
	if (hif_can_suspend_link(GET_HIF_OPAQUE_HDL(scn)))
		qdf_atomic_set(&scn->link_suspended, 1);

	hif_apps_wake_irq_enable(GET_HIF_OPAQUE_HDL(scn));

	return 0;
}

@@ -2419,8 +2418,6 @@ int hif_pci_bus_suspend_noirq(struct hif_softc *scn)
 */
int hif_pci_bus_resume_noirq(struct hif_softc *scn)
{
	hif_apps_wake_irq_disable(GET_HIF_OPAQUE_HDL(scn));

	/* a vote for link up can come in the middle of the ongoing resume
	 * process. hence, clear the link suspend flag once
	 * hif_bus_resume_noirq() succeeds since PCIe link is already resumed