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

Commit 07163c88 authored by Gavin Shan's avatar Gavin Shan Committed by android-build-merger
Browse files

drivers/pci/hotplug: Handle presence detection change properly

am: 1afe7b4a

Change-Id: Ia1259f87fb6dcb038d42ca40a35fb43f7167b001
parents c45b44d5 1afe7b4a
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -713,8 +713,12 @@ static irqreturn_t pnv_php_interrupt(int irq, void *data)
		added = !!(lsts & PCI_EXP_LNKSTA_DLLLA);
	} else if (sts & PCI_EXP_SLTSTA_PDC) {
		ret = pnv_pci_get_presence_state(php_slot->id, &presence);
		if (!ret)
		if (ret) {
			dev_warn(&pdev->dev, "PCI slot [%s] error %d getting presence (0x%04x), to retry the operation.\n",
				 php_slot->name, ret, sts);
			return IRQ_HANDLED;
		}

		added = !!(presence == OPAL_PCI_SLOT_PRESENT);
	} else {
		return IRQ_NONE;