Skip to contentSkip to conversation

PCI / Hotplug: Fix unexpected driver unregister in pciehp_acpi.c

PATCH RESEND Applied Rafael J. Wysocki 3 participants 3 messages Dec 18, 2010 – Dec 23, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 PCI / Hotplug: Fix unexpected driver unregister in pciehp_acpi.c

From: Rafael J. Wysocki <[email protected]>

If pcie_ports_disabled is set, pcie_port_service_register() returns error code and select_detection_mode() should not attempt to unregister dummy_driver and use dummy_slots. It should return PCIEHP_DETECT_ACPI immediately instead.

---

Hi Jesse,

I'm not sure if you've got this patch. It fixes a problem introduced in the 2.6.37 merge window, so I guess it should be merged before 2.6.37 final.

Details in https://bugzilla.kernel.org/show_bug.cgi?id=20232#c23 .

Thanks,
Rafael

---
 drivers/pci/hotplug/pciehp_acpi.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/pci/hotplug/pciehp_acpi.c +2 -1
Index: linux-2.6/drivers/pci/hotplug/pciehp_acpi.c
===================================================================
@@ -115,7 +115,8 @@ static struct pcie_port_service_driver _
 static int __init select_detection_mode(void)
 {
 	struct dummy_slot *slot, *tmp;
-	pcie_port_service_register(&dummy_driver);
+	if (pcie_port_service_register(&dummy_driver))
+		return PCIEHP_DETECT_ACPI;
 	pcie_port_service_unregister(&dummy_driver);
 	list_for_each_entry_safe(slot, tmp, &dummy_slots, list) {
 		list_del(&slot->list);
Reviewed-by Acked-by on v1 1/1
#1 lore raw
Quoted 8 lines · Rafael J. Wysocki

From: Rafael J. Wysocki<[email protected]>

If pcie_ports_disabled is set, pcie_port_service_register() returns error code and select_detection_mode() should not attempt to unregister dummy_driver and use dummy_slots. It should return PCIEHP_DETECT_ACPI immediately instead.

Applied
#2 lore raw
Quoted 8 lines · On Mon, 20 Dec 2010 09:30:04 +0900 Kenji Kaneshige…
Quoted 7 lines · Rafael J. Wysocki

From: Rafael J. Wysocki<[email protected]>

If pcie_ports_disabled is set, pcie_port_service_register() returns error code and select_detection_mode() should not attempt to unregister dummy_driver and use dummy_slots. It should return PCIEHP_DETECT_ACPI immediately instead.

Quoted 6 lines
Quoted 1 line

Applied to my for-linus branch, thanks guys.

Signature · 1 line
Jesse Barnes, Intel Open Source Technology Center