[3.13.y-ckt stable] Patch "PCI: cpcihp: Add missing curly braces in cpci_configure_slot()" has been added to staging queue

Kamal Mostafa kamal at canonical.com
Tue May 5 20:33:30 UTC 2015


This is a note to let you know that I have just added a patch titled

    PCI: cpcihp: Add missing curly braces in cpci_configure_slot()

to the linux-3.13.y-queue branch of the 3.13.y-ckt extended stable tree 
which can be found at:

    http://kernel.ubuntu.com/git/ubuntu/linux.git/log/?h=linux-3.13.y-queue

This patch is scheduled to be released in version 3.13.11-ckt20.

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.13.y-ckt tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Kamal

------

>From 36dea02f8d1013e2c32ff51e4b1d359f05d983fa Mon Sep 17 00:00:00 2001
From: Dan Carpenter <dan.carpenter at oracle.com>
Date: Wed, 25 Feb 2015 16:23:22 +0300
Subject: PCI: cpcihp: Add missing curly braces in cpci_configure_slot()

commit bc3b5b47c80da8838758731d423179262c9c36ec upstream.

I don't have this hardware but it looks like we weren't adding bridge
devices as intended.  Maybe the bridge is always the last device?

Fixes: 05b125004815 ("PCI: cpcihp: Iterate over all devices in slot, not functions 0-7")
Signed-off-by: Dan Carpenter <dan.carpenter at oracle.com>
Signed-off-by: Bjorn Helgaas <bhelgaas at google.com>
Acked-by: Yijing Wang <wangyijing at huawei.com>
Signed-off-by: Kamal Mostafa <kamal at canonical.com>
---
 drivers/pci/hotplug/cpci_hotplug_pci.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/pci/hotplug/cpci_hotplug_pci.c b/drivers/pci/hotplug/cpci_hotplug_pci.c
index d3add98..4bc53f2 100644
--- a/drivers/pci/hotplug/cpci_hotplug_pci.c
+++ b/drivers/pci/hotplug/cpci_hotplug_pci.c
@@ -282,12 +282,13 @@ int __ref cpci_configure_slot(struct slot *slot)
 	}
 	parent = slot->dev->bus;

-	list_for_each_entry(dev, &parent->devices, bus_list)
+	list_for_each_entry(dev, &parent->devices, bus_list) {
 		if (PCI_SLOT(dev->devfn) != PCI_SLOT(slot->devfn))
 			continue;
 		if ((dev->hdr_type == PCI_HEADER_TYPE_BRIDGE) ||
 		    (dev->hdr_type == PCI_HEADER_TYPE_CARDBUS))
 			pci_hp_add_bridge(dev);
+	}


 	pci_assign_unassigned_bridge_resources(parent->self);
--
1.9.1





More information about the kernel-team mailing list