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

Commit d22d29ff authored by Kyle Yan's avatar Kyle Yan Committed by Gerrit - the friendly Code Review server
Browse files

Merge "wil6210: protect against sporadic interrupt during suspend flow" into msm-4.9

parents 9b38479a 3c031caf
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -80,12 +80,20 @@ int wil_suspend(struct wil6210_priv *wil, bool is_runtime)
		}
	}

	if (wil->platform_ops.suspend)
	/* Disable PCIe IRQ to prevent sporadic IRQs when PCIe is suspending */
	wil_dbg_pm(wil, "Disabling PCIe IRQ before suspending\n");
	wil_disable_irq(wil);

	if (wil->platform_ops.suspend) {
		rc = wil->platform_ops.suspend(wil->platform_handle);
		if (rc)
			wil_enable_irq(wil);
	}

out:
	wil_dbg_pm(wil, "suspend: %s => %d\n",
		   is_runtime ? "runtime" : "system", rc);

	return rc;
}

@@ -104,6 +112,9 @@ int wil_resume(struct wil6210_priv *wil, bool is_runtime)
		}
	}

	wil_dbg_pm(wil, "Enabling PCIe IRQ\n");
	wil_enable_irq(wil);

	/* if netif up, bring hardware up
	 * During open(), IFF_UP set after actual device method
	 * invocation. This prevent recursive call to wil_up()