|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] [linux-2.6.18-xen] Backport: PCI: allow pci_alloc_child_
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1236930112 0
# Node ID e3cec0113535268ddc018f0de36202f4ba570ecf
# Parent 955d92afcbce6e9a24274af626d9cb197ba837af
Backport: PCI: allow pci_alloc_child_bus() to handle a NULL bridge
commit 3789fa8a2e534523c896a32a9f27f78d52ad7d82
Author: Yu Zhao <yu.zhao@xxxxxxxxx>
Date: Sat Nov 22 02:41:07 2008 +0800
PCI: allow pci_alloc_child_bus() to handle a NULL bridge
Allow pci_alloc_child_bus() to allocate buses without bridge
devices.
Some SR-IOV devices can occupy more than one bus number, but there
is no
explicit bridges because that have internal routing mechanism.
Signed-off-by: Yu Zhao <yu.zhao@xxxxxxxxx>
Signed-off-by: Jesse Barnes <jbarnes@xxxxxxxxxxxxxxxx>
Signed-off-by: Yu Zhao <yu.zhao@xxxxxxxxx>
---
drivers/pci/probe.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff -r 955d92afcbce -r e3cec0113535 drivers/pci/probe.c
--- a/drivers/pci/probe.c Fri Mar 13 07:41:39 2009 +0000
+++ b/drivers/pci/probe.c Fri Mar 13 07:41:52 2009 +0000
@@ -392,12 +392,10 @@ pci_alloc_child_bus(struct pci_bus *pare
if (!child)
return NULL;
- child->self = bridge;
child->parent = parent;
child->ops = parent->ops;
child->sysdata = parent->sysdata;
child->bus_flags = parent->bus_flags;
- child->bridge = get_device(&bridge->dev);
child->class_dev.class = &pcibus_class;
sprintf(child->class_dev.class_id, "%04x:%02x", pci_domain_nr(child),
busnr);
@@ -411,6 +409,12 @@ pci_alloc_child_bus(struct pci_bus *pare
child->number = child->secondary = busnr;
child->primary = parent->secondary;
child->subordinate = 0xff;
+
+ if (!bridge)
+ return child;
+
+ child->self = bridge;
+ child->bridge = get_device(&bridge->dev);
/* Set up default resource pointers and names.. */
for (i = 0; i < 4; i++) {
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-changelog] [linux-2.6.18-xen] Backport: PCI: allow pci_alloc_child_bus() to handle a NULL bridge,
Xen patchbot-linux-2.6.18-xen <=
|
|
|
|
|