mac80211: remove encrypt parameter from ieee80211_tx_skb
[safe/jmp/linux-2.6] / drivers / pci / hotplug / acpiphp_glue.c
index e062337..58d25a1 100644 (file)
@@ -59,7 +59,7 @@ static DEFINE_SPINLOCK(ioapic_list_lock);
 
 static void handle_hotplug_event_bridge (acpi_handle, u32, void *);
 static void acpiphp_sanitize_bus(struct pci_bus *bus);
-static void acpiphp_set_hpp_values(acpi_handle handle, struct pci_bus *bus);
+static void acpiphp_set_hpp_values(struct pci_bus *bus);
 static void handle_hotplug_event_func(acpi_handle handle, u32 type, void *context);
 
 /* callback routine to check for the existence of a pci dock device */
@@ -271,30 +271,6 @@ static int detect_ejectable_slots(acpi_handle handle)
        return found;
 }
 
-
-/* decode ACPI 2.0 _HPP hot plug parameters */
-static void decode_hpp(struct acpiphp_bridge *bridge)
-{
-       acpi_status status;
-
-       status = acpi_get_hp_params_from_firmware(bridge->pci_bus, &bridge->hpp);
-       if (ACPI_FAILURE(status) ||
-           !bridge->hpp.t0 || (bridge->hpp.t0->revision > 1)) {
-               /* use default numbers */
-               printk(KERN_WARNING
-                      "%s: Could not get hotplug parameters. Use defaults\n",
-                      __func__);
-               bridge->hpp.t0 = &bridge->hpp.type0_data;
-               bridge->hpp.t0->revision = 0;
-               bridge->hpp.t0->cache_line_size = 0x10;
-               bridge->hpp.t0->latency_timer = 0x40;
-               bridge->hpp.t0->enable_serr = 0;
-               bridge->hpp.t0->enable_perr = 0;
-       }
-}
-
-
-
 /* initialize miscellaneous stuff for both root and PCI-to-PCI bridge */
 static void init_bridge_misc(struct acpiphp_bridge *bridge)
 {
@@ -1037,7 +1013,7 @@ static int __ref enable_device(struct acpiphp_slot *slot)
 
        pci_bus_assign_resources(bus);
        acpiphp_sanitize_bus(bus);
-       acpiphp_set_hpp_values(slot->bridge->handle, bus);
+       acpiphp_set_hpp_values(bus);
        list_for_each_entry(func, &slot->funcs, sibling)
                acpiphp_configure_ioapics(func->handle);
        pci_enable_bridges(bus);
@@ -1248,70 +1224,12 @@ static int acpiphp_check_bridge(struct acpiphp_bridge *bridge)
        return retval;
 }
 
-static void program_hpp(struct pci_dev *dev, struct acpiphp_bridge *bridge)
+static void acpiphp_set_hpp_values(struct pci_bus *bus)
 {
-       u16 pci_cmd, pci_bctl;
-       struct pci_dev *cdev;
-
-       /* Program hpp values for this device */
-       if (!(dev->hdr_type == PCI_HEADER_TYPE_NORMAL ||
-                       (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE &&
-                       (dev->class >> 8) == PCI_CLASS_BRIDGE_PCI)))
-               return;
-
-       if ((dev->class >> 8) == PCI_CLASS_BRIDGE_HOST)
-               return;
-
-       pci_write_config_byte(dev, PCI_CACHE_LINE_SIZE,
-                       bridge->hpp.t0->cache_line_size);
-       pci_write_config_byte(dev, PCI_LATENCY_TIMER,
-                       bridge->hpp.t0->latency_timer);
-       pci_read_config_word(dev, PCI_COMMAND, &pci_cmd);
-       if (bridge->hpp.t0->enable_serr)
-               pci_cmd |= PCI_COMMAND_SERR;
-       else
-               pci_cmd &= ~PCI_COMMAND_SERR;
-       if (bridge->hpp.t0->enable_perr)
-               pci_cmd |= PCI_COMMAND_PARITY;
-       else
-               pci_cmd &= ~PCI_COMMAND_PARITY;
-       pci_write_config_word(dev, PCI_COMMAND, pci_cmd);
-
-       /* Program bridge control value and child devices */
-       if ((dev->class >> 8) == PCI_CLASS_BRIDGE_PCI) {
-               pci_write_config_byte(dev, PCI_SEC_LATENCY_TIMER,
-                               bridge->hpp.t0->latency_timer);
-               pci_read_config_word(dev, PCI_BRIDGE_CONTROL, &pci_bctl);
-               if (bridge->hpp.t0->enable_serr)
-                       pci_bctl |= PCI_BRIDGE_CTL_SERR;
-               else
-                       pci_bctl &= ~PCI_BRIDGE_CTL_SERR;
-               if (bridge->hpp.t0->enable_perr)
-                       pci_bctl |= PCI_BRIDGE_CTL_PARITY;
-               else
-                       pci_bctl &= ~PCI_BRIDGE_CTL_PARITY;
-               pci_write_config_word(dev, PCI_BRIDGE_CONTROL, pci_bctl);
-               if (dev->subordinate) {
-                       list_for_each_entry(cdev, &dev->subordinate->devices,
-                                       bus_list)
-                               program_hpp(cdev, bridge);
-               }
-       }
-}
-
-static void acpiphp_set_hpp_values(acpi_handle handle, struct pci_bus *bus)
-{
-       struct acpiphp_bridge bridge;
        struct pci_dev *dev;
 
-       memset(&bridge, 0, sizeof(bridge));
-       bridge.handle = handle;
-       bridge.pci_bus = bus;
-       bridge.pci_dev = bus->self;
-       decode_hpp(&bridge);
        list_for_each_entry(dev, &bus->devices, bus_list)
-               program_hpp(dev, &bridge);
-
+               pci_configure_slot(dev);
 }
 
 /*
@@ -1355,7 +1273,7 @@ static int acpiphp_configure_bridge (acpi_handle handle)
        pci_bus_size_bridges(bus);
        pci_bus_assign_resources(bus);
        acpiphp_sanitize_bus(bus);
-       acpiphp_set_hpp_values(handle, bus);
+       acpiphp_set_hpp_values(bus);
        pci_enable_bridges(bus);
        acpiphp_configure_ioapics(handle);
        return 0;