aboutsummaryrefslogtreecommitdiffstats
path: root/pci
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2006-02-23 14:56:27 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2006-02-23 14:56:27 -0800
commit0a04042debb651c3f529c3aee17deca5ada6683b (patch)
treeb415776eb10a6c8341f2362d7c06daf87210fbbb /pci
parentd167529dacbad453f1449e5e78b4857c6e687bf0 (diff)
downloadpatches-0a04042debb651c3f529c3aee17deca5ada6683b.tar.gz
removed acpi patch
Diffstat (limited to 'pci')
-rw-r--r--pci/acpiphp-add-new-bus-to-acpi.patch153
-rw-r--r--pci/pci-hotplug-convert-semaphores-to-mutex.patch8
2 files changed, 4 insertions, 157 deletions
diff --git a/pci/acpiphp-add-new-bus-to-acpi.patch b/pci/acpiphp-add-new-bus-to-acpi.patch
deleted file mode 100644
index 0dbd6d9d5ba26..0000000000000
--- a/pci/acpiphp-add-new-bus-to-acpi.patch
+++ /dev/null
@@ -1,153 +0,0 @@
-From kristenc@cs.pdx.edu Wed Feb 1 13:28:32 2006
-Date: Wed, 1 Feb 2006 13:27:43 -0800
-From: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
-To: pcihp-discuss@lists.sourceforge.net
-Cc: greg@kroah.com, linux-kernel@vger.kernel.org,
- muneda.takahiro@jp.fujitsu.com, linux-acpi@vger.kernel.org
-Subject: [patch] acpiphp: add new bus to acpi
-Message-ID: <20060201212743.GB27247@nerpa>
-Content-Disposition: inline
-
-If we add a new bridge with subordinate busses, we should call make sure
-that acpi is notified so that the PRT (if present) can be read and drivers
-who have registered on this bus will be notified when it is started.
-Also make sure to use the max reservered bus number for the starting the bus
-scan.
-
-
-Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
----
- drivers/pci/hotplug/acpiphp_glue.c | 106 ++++++++++++++++++++++++++++++++++++-
- 1 file changed, 104 insertions(+), 2 deletions(-)
-
---- gregkh-2.6.orig/drivers/pci/hotplug/acpiphp_glue.c
-+++ gregkh-2.6/drivers/pci/hotplug/acpiphp_glue.c
-@@ -751,6 +751,101 @@ static int power_off_slot(struct acpiphp
- }
-
-
-+
-+/**
-+ * acpiphp_max_busnr - return the highest reserved bus number under
-+ * the given bus.
-+ * @bus: bus to start search with
-+ *
-+ */
-+static unsigned char acpiphp_max_busnr(struct pci_bus *bus)
-+{
-+ struct list_head *tmp;
-+ unsigned char max, n;
-+
-+ /*
-+ * pci_bus_max_busnr will return the highest
-+ * reserved busnr for all these children.
-+ * that is equivalent to the bus->subordinate
-+ * value. We don't want to use the parent's
-+ * bus->subordinate value because it could have
-+ * padding in it.
-+ */
-+ max = bus->secondary;
-+
-+ list_for_each(tmp, &bus->children) {
-+ n = pci_bus_max_busnr(pci_bus_b(tmp));
-+ if (n > max)
-+ max = n;
-+ }
-+ return max;
-+}
-+
-+
-+
-+/**
-+ * get_func - get a pointer to acpiphp_func given a slot, device
-+ * @slot: slot to search
-+ * @dev: pci_dev struct to match.
-+ *
-+ * This function will increase the reference count of pci_dev,
-+ * so callers should call pci_dev_put when complete.
-+ *
-+ */
-+static struct acpiphp_func *
-+get_func(struct acpiphp_slot *slot, struct pci_dev *dev)
-+{
-+ struct acpiphp_func *func = NULL;
-+ struct pci_bus *bus = slot->bridge->pci_bus;
-+ struct pci_dev *pdev;
-+
-+ list_for_each_entry(func, &slot->funcs, sibling) {
-+ pdev = pci_get_slot(bus, PCI_DEVFN(slot->device,
-+ func->function));
-+ if (pdev) {
-+ if (pdev == dev)
-+ break;
-+ pci_dev_put(pdev);
-+ }
-+ }
-+ return func;
-+}
-+
-+
-+/**
-+ * acpiphp_bus_add - add a new bus to acpi subsystem
-+ * @func: acpiphp_func of the bridge
-+ *
-+ */
-+static int acpiphp_bus_add(struct acpiphp_func *func)
-+{
-+ acpi_handle phandle;
-+ struct acpi_device *device, *pdevice;
-+ int ret_val;
-+
-+ acpi_get_parent(func->handle, &phandle);
-+ if (acpi_bus_get_device(phandle, &pdevice)) {
-+ dbg("no parent device, assuming NULL\n");
-+ pdevice = NULL;
-+ }
-+ ret_val = acpi_bus_add(&device, pdevice, func->handle,
-+ ACPI_BUS_TYPE_DEVICE);
-+ if (ret_val)
-+ dbg("cannot add bridge to acpi list\n");
-+
-+ /*
-+ * try to start anyway. We could have failed to add
-+ * simply because this bus had previously been added
-+ * on another add. Don't bother with the return value
-+ * we just keep going.
-+ */
-+ ret_val = acpi_bus_start(device);
-+
-+ return ret_val;
-+}
-+
-+
-+
- /**
- * enable_device - enable, configure a slot
- * @slot: slot to be enabled
-@@ -788,7 +883,7 @@ static int enable_device(struct acpiphp_
- goto err_exit;
- }
-
-- max = bus->secondary;
-+ max = acpiphp_max_busnr(bus);
- for (pass = 0; pass < 2; pass++) {
- list_for_each_entry(dev, &bus->devices, bus_list) {
- if (PCI_SLOT(dev->devfn) != slot->device)
-@@ -796,8 +891,15 @@ static int enable_device(struct acpiphp_
- if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE ||
- dev->hdr_type == PCI_HEADER_TYPE_CARDBUS) {
- max = pci_scan_bridge(bus, dev, max, pass);
-- if (pass && dev->subordinate)
-+ if (pass && dev->subordinate) {
- pci_bus_size_bridges(dev->subordinate);
-+ func = get_func(slot, dev);
-+ if (func) {
-+ acpiphp_bus_add(func);
-+ /* side effect of get_func */
-+ pci_dev_put(dev);
-+ }
-+ }
- }
- }
- }
diff --git a/pci/pci-hotplug-convert-semaphores-to-mutex.patch b/pci/pci-hotplug-convert-semaphores-to-mutex.patch
index 08ccb5c24b82e..39f22e9e491a6 100644
--- a/pci/pci-hotplug-convert-semaphores-to-mutex.patch
+++ b/pci/pci-hotplug-convert-semaphores-to-mutex.patch
@@ -75,7 +75,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
slot->next = bridge->slots;
bridge->slots = slot;
-@@ -1503,7 +1503,7 @@ int acpiphp_enable_slot(struct acpiphp_s
+@@ -1401,7 +1401,7 @@ int acpiphp_enable_slot(struct acpiphp_s
{
int retval;
@@ -84,7 +84,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/* wake up all functions */
retval = power_on_slot(slot);
-@@ -1515,7 +1515,7 @@ int acpiphp_enable_slot(struct acpiphp_s
+@@ -1413,7 +1413,7 @@ int acpiphp_enable_slot(struct acpiphp_s
retval = enable_device(slot);
err_exit:
@@ -93,7 +93,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return retval;
}
-@@ -1526,7 +1526,7 @@ int acpiphp_disable_slot(struct acpiphp_
+@@ -1424,7 +1424,7 @@ int acpiphp_disable_slot(struct acpiphp_
{
int retval = 0;
@@ -102,7 +102,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/* unconfigure all functions */
retval = disable_device(slot);
-@@ -1539,7 +1539,7 @@ int acpiphp_disable_slot(struct acpiphp_
+@@ -1437,7 +1437,7 @@ int acpiphp_disable_slot(struct acpiphp_
goto err_exit;
err_exit: