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

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

Merge "cnss2: Disable LPASS full power collapse on DRV suspend"

parents df5fbccd 41f0ad0d
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -710,6 +710,7 @@ static int cnss_set_pci_link(struct cnss_pci_data *pci_priv, bool link_up)
	struct pci_dev *pci_dev = pci_priv->pci_dev;
	enum msm_pcie_pm_opt pm_ops;
	int retry = 0;
	u32 pm_options = PM_OPTIONS_DEFAULT;

	cnss_pr_vdbg("%s PCI link\n", link_up ? "Resuming" : "Suspending");

@@ -719,6 +720,7 @@ static int cnss_set_pci_link(struct cnss_pci_data *pci_priv, bool link_up)
		if (pci_priv->drv_connected_last) {
			cnss_pr_vdbg("Use PCIe DRV suspend\n");
			pm_ops = MSM_PCIE_DRV_SUSPEND;
			pm_options |= MSM_PCIE_CONFIG_NO_DRV_PC;
			cnss_set_pci_link_status(pci_priv, PCI_GEN1);
		} else {
			pm_ops = MSM_PCIE_SUSPEND;
@@ -727,7 +729,7 @@ static int cnss_set_pci_link(struct cnss_pci_data *pci_priv, bool link_up)

retry:
	ret = msm_pcie_pm_control(pm_ops, pci_dev->bus->number, pci_dev,
				  NULL, PM_OPTIONS_DEFAULT);
				  NULL, pm_options);
	if (ret) {
		cnss_pr_err("Failed to %s PCI link with default option, err = %d\n",
			    link_up ? "resume" : "suspend", ret);
+2 −0
Original line number Diff line number Diff line
@@ -6775,6 +6775,8 @@ static int msm_pcie_drv_suspend(struct msm_pcie_dev_t *pcie_dev,
	/* disable global irq - no more linkdown/aer detection */
	disable_irq(pcie_dev->irq[MSM_PCIE_INT_GLOBAL_INT].num);

	drv_info->drv_enable.pkt.dword[2] = options & MSM_PCIE_CONFIG_NO_DRV_PC;

	ret = msm_pcie_drv_send_rpmsg(pcie_dev, &drv_info->drv_enable);
	if (ret) {
		ret = -EBUSY;
+1 −0
Original line number Diff line number Diff line
@@ -13,6 +13,7 @@ enum msm_pcie_config {
	MSM_PCIE_CONFIG_LINKDOWN = 0x2,
	MSM_PCIE_CONFIG_NO_RECOVERY = 0x4,
	MSM_PCIE_CONFIG_NO_L1SS_TO = 0x8,
	MSM_PCIE_CONFIG_NO_DRV_PC = 0x10,
};

enum msm_pcie_pm_opt {