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

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

Merge "msm: pcie: add proper PCIe link state for linkdown"

parents 72eeaa9d 58d2a296
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -330,6 +330,7 @@ enum msm_pcie_link_status {
	MSM_PCIE_LINK_ENABLED,
	MSM_PCIE_LINK_DISABLED,
	MSM_PCIE_LINK_DRV,
	MSM_PCIE_LINK_DOWN,
};

enum msm_pcie_boot_option {
@@ -4888,7 +4889,7 @@ static irqreturn_t handle_aer_irq(int irq, void *data)
	msm_pcie_write_mask(dev->dm_core + PCIE20_CAP_DEVCTRLSTATUS, 0,
				BIT(18)|BIT(17)|BIT(16));

	if (dev->link_status == MSM_PCIE_LINK_DISABLED) {
	if (dev->link_status != MSM_PCIE_LINK_ENABLED) {
		PCIE_DBG2(dev, "RC%d link is down\n", dev->rc_idx);
		goto out;
	}
@@ -5039,7 +5040,7 @@ static irqreturn_t handle_linkdown_irq(int irq, void *data)
			"PCIe:the link of RC%d is suspending.\n",
			dev->rc_idx);
	} else {
		dev->link_status = MSM_PCIE_LINK_DISABLED;
		dev->link_status = MSM_PCIE_LINK_DOWN;
		dev->shadow_en = false;

		if (dev->linkdown_panic)