* [patch] PCI: cpcihp: missing curly braces in cpci_configure_slot()
@ 2015-02-25 13:23 Dan Carpenter
2015-02-26 1:01 ` Yijing Wang
2015-03-06 18:29 ` Bjorn Helgaas
0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2015-02-25 13:23 UTC (permalink / raw)
To: Scott Murray, Yijing Wang; +Cc: Bjorn Helgaas, linux-pci, kernel-janitors
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@oracle.com>
diff --git a/drivers/pci/hotplug/cpci_hotplug_pci.c b/drivers/pci/hotplug/cpci_hotplug_pci.c
index 7d48eca..788db48 100644
--- a/drivers/pci/hotplug/cpci_hotplug_pci.c
+++ b/drivers/pci/hotplug/cpci_hotplug_pci.c
@@ -286,11 +286,12 @@ int 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 (pci_is_bridge(dev))
pci_hp_add_bridge(dev);
+ }
pci_assign_unassigned_bridge_resources(parent->self);
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [patch] PCI: cpcihp: missing curly braces in cpci_configure_slot()
2015-02-25 13:23 [patch] PCI: cpcihp: missing curly braces in cpci_configure_slot() Dan Carpenter
@ 2015-02-26 1:01 ` Yijing Wang
2015-03-06 18:29 ` Bjorn Helgaas
1 sibling, 0 replies; 3+ messages in thread
From: Yijing Wang @ 2015-02-26 1:01 UTC (permalink / raw)
To: Dan Carpenter, Scott Murray; +Cc: Bjorn Helgaas, linux-pci, kernel-janitors
On 2015/2/25 21:23, Dan Carpenter wrote:
> 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@oracle.com>
>
> diff --git a/drivers/pci/hotplug/cpci_hotplug_pci.c b/drivers/pci/hotplug/cpci_hotplug_pci.c
> index 7d48eca..788db48 100644
> --- a/drivers/pci/hotplug/cpci_hotplug_pci.c
> +++ b/drivers/pci/hotplug/cpci_hotplug_pci.c
> @@ -286,11 +286,12 @@ int 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 (pci_is_bridge(dev))
> pci_hp_add_bridge(dev);
> + }
>
Good fix.
Acked-by: Yijing Wang <wangyijing@huawei.com>
Thanks!
Yijing.
>
> pci_assign_unassigned_bridge_resources(parent->self);
>
>
--
Thanks!
Yijing
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch] PCI: cpcihp: missing curly braces in cpci_configure_slot()
2015-02-25 13:23 [patch] PCI: cpcihp: missing curly braces in cpci_configure_slot() Dan Carpenter
2015-02-26 1:01 ` Yijing Wang
@ 2015-03-06 18:29 ` Bjorn Helgaas
1 sibling, 0 replies; 3+ messages in thread
From: Bjorn Helgaas @ 2015-03-06 18:29 UTC (permalink / raw)
To: Dan Carpenter; +Cc: Scott Murray, Yijing Wang, linux-pci, kernel-janitors
On Wed, Feb 25, 2015 at 04:23:22PM +0300, Dan Carpenter wrote:
> 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@oracle.com>
Applied with Yijing's ack to for-linus for v4.0, thanks! Also marked for
stable.
I'm afraid this is probably my fault, sorry.
> diff --git a/drivers/pci/hotplug/cpci_hotplug_pci.c b/drivers/pci/hotplug/cpci_hotplug_pci.c
> index 7d48eca..788db48 100644
> --- a/drivers/pci/hotplug/cpci_hotplug_pci.c
> +++ b/drivers/pci/hotplug/cpci_hotplug_pci.c
> @@ -286,11 +286,12 @@ int 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 (pci_is_bridge(dev))
> pci_hp_add_bridge(dev);
> + }
>
>
> pci_assign_unassigned_bridge_resources(parent->self);
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-03-06 18:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-25 13:23 [patch] PCI: cpcihp: missing curly braces in cpci_configure_slot() Dan Carpenter
2015-02-26 1:01 ` Yijing Wang
2015-03-06 18:29 ` Bjorn Helgaas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).