diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-26 00:18:18 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-26 00:18:18 -0500 |
commit | 556f12f602ac0a18a82ca83e9f8e8547688fc633 (patch) | |
tree | d4051f6dd57968c8e8e660ad117c5bedc2aa7e8e /drivers/pci/pci-acpi.c | |
parent | fffddfd6c8e0c10c42c6e2cc54ba880fcc36ebbb (diff) | |
parent | 018ba0a6efada61b9bc17500101d81c3d35807c2 (diff) |
Merge tag 'pci-v3.9-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci
Pull PCI changes from Bjorn Helgaas:
"Host bridge hotplug
- Major overhaul of ACPI host bridge add/start (Rafael Wysocki, Yinghai Lu)
- Major overhaul of PCI/ACPI binding (Rafael Wysocki, Yinghai Lu)
- Split out ACPI host bridge and ACPI PCI device hotplug (Yinghai Lu)
- Stop caching _PRT and make independent of bus numbers (Yinghai Lu)
PCI device hotplug
- Clean up cpqphp dead code (Sasha Levin)
- Disable ARI unless device and upstream bridge support it (Yijing Wang)
- Initialize all hot-added devices (not functions 0-7) (Yijing Wang)
Power management
- Don't touch ASPM if disabled (Joe Lawrence)
- Fix ASPM link state management (Myron Stowe)
Miscellaneous
- Fix PCI_EXP_FLAGS accessor (Alex Williamson)
- Disable Bus Master in pci_device_shutdown (Konstantin Khlebnikov)
- Document hotplug resource and MPS parameters (Yijing Wang)
- Add accessor for PCIe capabilities (Myron Stowe)
- Drop pciehp suspend/resume messages (Paul Bolle)
- Make pci_slot built-in only (not a module) (Jiang Liu)
- Remove unused PCI/ACPI bind ops (Jiang Liu)
- Removed used pci_root_bus (Bjorn Helgaas)"
* tag 'pci-v3.9-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (51 commits)
PCI/ACPI: Don't cache _PRT, and don't associate them with bus numbers
PCI: Fix PCI Express Capability accessors for PCI_EXP_FLAGS
ACPI / PCI: Make pci_slot built-in only, not a module
PCI/PM: Clear state_saved during suspend
PCI: Use atomic_inc_return() rather than atomic_add_return()
PCI: Catch attempts to disable already-disabled devices
PCI: Disable Bus Master unconditionally in pci_device_shutdown()
PCI: acpiphp: Remove dead code for PCI host bridge hotplug
PCI: acpiphp: Create companion ACPI devices before creating PCI devices
PCI: Remove unused "rc" in virtfn_add_bus()
PCI: pciehp: Drop suspend/resume ENTRY messages
PCI/ASPM: Don't touch ASPM if forcibly disabled
PCI/ASPM: Deallocate upstream link state even if device is not PCIe
PCI: Document MPS parameters pci=pcie_bus_safe, pci=pcie_bus_perf, etc
PCI: Document hpiosize= and hpmemsize= resource reservation parameters
PCI: Use PCI Express Capability accessor
PCI: Introduce accessor to retrieve PCIe Capabilities Register
PCI: Put pci_dev in device tree as early as possible
PCI: Skip attaching driver in device_add()
PCI: acpiphp: Keep driver loaded even if no slots found
...
Diffstat (limited to 'drivers/pci/pci-acpi.c')
-rw-r--r-- | drivers/pci/pci-acpi.c | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c index e407c61559ca..39c937f9b426 100644 --- a/drivers/pci/pci-acpi.c +++ b/drivers/pci/pci-acpi.c | |||
@@ -302,48 +302,11 @@ static int acpi_pci_find_device(struct device *dev, acpi_handle *handle) | |||
302 | return 0; | 302 | return 0; |
303 | } | 303 | } |
304 | 304 | ||
305 | static int acpi_pci_find_root_bridge(struct device *dev, acpi_handle *handle) | ||
306 | { | ||
307 | int num; | ||
308 | unsigned int seg, bus; | ||
309 | |||
310 | /* | ||
311 | * The string should be the same as root bridge's name | ||
312 | * Please look at 'pci_scan_bus_parented' | ||
313 | */ | ||
314 | num = sscanf(dev_name(dev), "pci%04x:%02x", &seg, &bus); | ||
315 | if (num != 2) | ||
316 | return -ENODEV; | ||
317 | *handle = acpi_get_pci_rootbridge_handle(seg, bus); | ||
318 | if (!*handle) | ||
319 | return -ENODEV; | ||
320 | return 0; | ||
321 | } | ||
322 | |||
323 | static void pci_acpi_setup(struct device *dev) | 305 | static void pci_acpi_setup(struct device *dev) |
324 | { | 306 | { |
325 | struct pci_dev *pci_dev = to_pci_dev(dev); | 307 | struct pci_dev *pci_dev = to_pci_dev(dev); |
326 | acpi_handle handle = ACPI_HANDLE(dev); | 308 | acpi_handle handle = ACPI_HANDLE(dev); |
327 | struct acpi_device *adev; | 309 | struct acpi_device *adev; |
328 | acpi_status status; | ||
329 | acpi_handle dummy; | ||
330 | |||
331 | /* | ||
332 | * Evaluate and parse _PRT, if exists. This code allows parsing of | ||
333 | * _PRT objects within the scope of non-bridge devices. Note that | ||
334 | * _PRTs within the scope of a PCI bridge assume the bridge's | ||
335 | * subordinate bus number. | ||
336 | * | ||
337 | * TBD: Can _PRTs exist within the scope of non-bridge PCI devices? | ||
338 | */ | ||
339 | status = acpi_get_handle(handle, METHOD_NAME__PRT, &dummy); | ||
340 | if (ACPI_SUCCESS(status)) { | ||
341 | unsigned char bus; | ||
342 | |||
343 | bus = pci_dev->subordinate ? | ||
344 | pci_dev->subordinate->number : pci_dev->bus->number; | ||
345 | acpi_pci_irq_add_prt(handle, pci_domain_nr(pci_dev->bus), bus); | ||
346 | } | ||
347 | 310 | ||
348 | if (acpi_bus_get_device(handle, &adev) || !adev->wakeup.flags.valid) | 311 | if (acpi_bus_get_device(handle, &adev) || !adev->wakeup.flags.valid) |
349 | return; | 312 | return; |
@@ -358,7 +321,6 @@ static void pci_acpi_setup(struct device *dev) | |||
358 | 321 | ||
359 | static void pci_acpi_cleanup(struct device *dev) | 322 | static void pci_acpi_cleanup(struct device *dev) |
360 | { | 323 | { |
361 | struct pci_dev *pci_dev = to_pci_dev(dev); | ||
362 | acpi_handle handle = ACPI_HANDLE(dev); | 324 | acpi_handle handle = ACPI_HANDLE(dev); |
363 | struct acpi_device *adev; | 325 | struct acpi_device *adev; |
364 | 326 | ||
@@ -367,16 +329,11 @@ static void pci_acpi_cleanup(struct device *dev) | |||
367 | device_set_run_wake(dev, false); | 329 | device_set_run_wake(dev, false); |
368 | pci_acpi_remove_pm_notifier(adev); | 330 | pci_acpi_remove_pm_notifier(adev); |
369 | } | 331 | } |
370 | |||
371 | if (pci_dev->subordinate) | ||
372 | acpi_pci_irq_del_prt(pci_domain_nr(pci_dev->bus), | ||
373 | pci_dev->subordinate->number); | ||
374 | } | 332 | } |
375 | 333 | ||
376 | static struct acpi_bus_type acpi_pci_bus = { | 334 | static struct acpi_bus_type acpi_pci_bus = { |
377 | .bus = &pci_bus_type, | 335 | .bus = &pci_bus_type, |
378 | .find_device = acpi_pci_find_device, | 336 | .find_device = acpi_pci_find_device, |
379 | .find_bridge = acpi_pci_find_root_bridge, | ||
380 | .setup = pci_acpi_setup, | 337 | .setup = pci_acpi_setup, |
381 | .cleanup = pci_acpi_cleanup, | 338 | .cleanup = pci_acpi_cleanup, |
382 | }; | 339 | }; |