Skip to contentSkip to conversation

acpiphp: only size new bus

PATCH In review Kristen Accardi 2 participants 3 messages Dec 14, 2005

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

PATCH 1/1 acpiphp: only size new bus

Only size the bus that has been added.

drivers/pci/hotplug/acpiphp_glue.c | 4 +++-

 drivers/pci/hotplug/acpiphp_glue.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
drivers/pci/hotplug/acpiphp_glue.c +5 -2
@@ -794,12 +794,15 @@ static int enable_device(struct acpiphp_
 			if (PCI_SLOT(dev->devfn) != slot->device)
 				continue;
 			if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE ||
-			    dev->hdr_type == PCI_HEADER_TYPE_CARDBUS)
+			    dev->hdr_type == PCI_HEADER_TYPE_CARDBUS) {
 				max = pci_scan_bridge(bus, dev, max, pass);
+				if (pass)
+					if (dev->subordinate)
+						pci_bus_size_bridges(dev->subordinate);
+			}
 		}
 	}
 
-	pci_bus_size_bridges(bus);
 	pci_bus_assign_resources(bus);
 	acpiphp_sanitize_bus(bus);
 	pci_enable_bridges(bus);
#1 lore raw

Hi Kristen,

drivers/pci/hotplug/acpiphp_glue.c static int enable_device(struct acpiphp_ · line 801

Quoted 3 lines
drivers/pci/hotplug/acpiphp_glue.c +3 -0
+				if (pass)
+					if (dev->subordinate)
+						pci_bus_size_bridges(dev->subordinate);

How about doing as follows. This also satisfies 80 columns rule.

	if (pass && dev->subordinate)
		pci_bus_size_bridges(dev->subordinate);

Thanks,
Kenji Kaneshige

Quoted 41 lines · Kristen Accardi

Only size the bus that has been added.

drivers/pci/hotplug/acpiphp_glue.c | 4 +++-

 drivers/pci/hotplug/acpiphp_glue.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
drivers/pci/hotplug/acpiphp_glue.c +5 -3
@@ -794,12 +794,15 @@ static int enable_device(struct acpiphp_
 			if (PCI_SLOT(dev->devfn) != slot->device)
 				continue;
 			if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE ||
-			    dev->hdr_type == PCI_HEADER_TYPE_CARDBUS)
+			    dev->hdr_type == PCI_HEADER_TYPE_CARDBUS) {
 				max = pci_scan_bridge(bus, dev, max, pass);
+				if (pass)
+					if (dev->subordinate)
+						pci_bus_size_bridges(dev->subordinate);
+			}
 		}
 	}
 
-	pci_bus_size_bridges(bus);
 	pci_bus_assign_resources(bus);
 	acpiphp_sanitize_bus(bus);
 	pci_enable_bridges(bus);
 
 
 
-------------------------------------------------------

This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Pcihpd-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pcihpd-discuss

#2 lore raw

Only size the bus that has been added.

drivers/pci/hotplug/acpiphp_glue.c | 4 +++-

 drivers/pci/hotplug/acpiphp_glue.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
drivers/pci/hotplug/acpiphp_glue.c +4 -2
@@ -794,12 +794,14 @@ static int enable_device(struct acpiphp_
 			if (PCI_SLOT(dev->devfn) != slot->device)
 				continue;
 			if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE ||
-			    dev->hdr_type == PCI_HEADER_TYPE_CARDBUS)
+			    dev->hdr_type == PCI_HEADER_TYPE_CARDBUS) {
 				max = pci_scan_bridge(bus, dev, max, pass);
+				if (pass && dev->subordinate)
+					pci_bus_size_bridges(dev->subordinate);
+			}
 		}
 	}
 
-	pci_bus_size_bridges(bus);
 	pci_bus_assign_resources(bus);
 	acpiphp_sanitize_bus(bus);
 	pci_enable_bridges(bus);