1. 27 9月, 2018 1 次提交
    • M
      ACPI / hotplug / PCI: Don't scan for non-hotplug bridges if slot is not bridge · f188b99f
      Mika Westerberg 提交于
      HP 6730b laptop has an ethernet NIC connected to one of the PCIe root
      ports.  The root ports themselves are native PCIe hotplug capable.  Now,
      during boot after PCI devices are scanned the BIOS triggers ACPI bus check
      directly to the NIC:
      
        ACPI: \_SB_.PCI0.RP06.NIC_: Bus check in hotplug_event()
      
      It is not clear why it is sending bus check but regardless the ACPI hotplug
      notify handler calls enable_slot() directly (instead of going through
      acpiphp_check_bridge() as there is no bridge), which ends up handling
      special case for non-hotplug bridges with native PCIe hotplug.  This
      results a crash of some kind but the reporter only sees black screen so it
      is hard to figure out the exact spot and what actually happens.  Based on
      a few fix proposals it was tracked to crash somewhere inside
      pci_assign_unassigned_bridge_resources().
      
      In any case we should not really be in that special branch at all because
      the ACPI notify happened to a slot that is not a PCI bridge (it is just a
      regular PCI device).
      
      Fix this so that we only go to that special branch if we are calling
      enable_slot() for a bridge (e.g., the ACPI notification was for the
      bridge).
      
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=201127
      Fixes: 84c8b58e ("ACPI / hotplug / PCI: Don't scan bridges managed by native hotplug")
      Reported-by: NPeter Anemone <peter.anemone@gmail.com>
      Signed-off-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Reviewed-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      CC: stable@vger.kernel.org	# v4.18+
      f188b99f
  2. 01 8月, 2018 1 次提交
    • H
      PCI: Fix is_added/is_busmaster race condition · 44bda4b7
      Hari Vyas 提交于
      When a PCI device is detected, pdev->is_added is set to 1 and proc and
      sysfs entries are created.
      
      When the device is removed, pdev->is_added is checked for one and then
      device is detached with clearing of proc and sys entries and at end,
      pdev->is_added is set to 0.
      
      is_added and is_busmaster are bit fields in pci_dev structure sharing same
      memory location.
      
      A strange issue was observed with multiple removal and rescan of a PCIe
      NVMe device using sysfs commands where is_added flag was observed as zero
      instead of one while removing device and proc,sys entries are not cleared.
      This causes issue in later device addition with warning message
      "proc_dir_entry" already registered.
      
      Debugging revealed a race condition between the PCI core setting the
      is_added bit in pci_bus_add_device() and the NVMe driver reset work-queue
      setting the is_busmaster bit in pci_set_master().  As these fields are not
      handled atomically, that clears the is_added bit.
      
      Move the is_added bit to a separate private flag variable and use atomic
      functions to set and retrieve the device addition state.  This avoids the
      race because is_added no longer shares a memory location with is_busmaster.
      
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=200283Signed-off-by: NHari Vyas <hari.vyas@broadcom.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Reviewed-by: NLukas Wunner <lukas@wunner.de>
      Acked-by: NMichael Ellerman <mpe@ellerman.id.au>
      44bda4b7
  3. 05 6月, 2018 3 次提交
    • M
      ACPI / hotplug / PCI: Drop unnecessary parentheses · 9337a493
      Mika Westerberg 提交于
      Remove unnecessary parentheses.
      Signed-off-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Reviewed-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      9337a493
    • M
      ACPI / hotplug / PCI: Mark stale PCI devices disconnected · 8f004f4a
      Mika Westerberg 提交于
      Following PCIehp mark the unplugged PCI devices disconnected.  This makes
      sure PCI core code leaves the now missing hardware registers alone.
      Signed-off-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Reviewed-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Reviewed-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      8f004f4a
    • M
      ACPI / hotplug / PCI: Don't scan bridges managed by native hotplug · 84c8b58e
      Mika Westerberg 提交于
      When acpiphp re-enumerates a PCI hierarchy because of an ACPI Notify()
      event, we should skip bridges managed by native hotplug (pciehp or shpchp).
      We don't want to scan below a native hotplug bridge until the hotplug
      controller generates a hot-add event.
      
      A typical scenario is a Root Port leading to a Thunderbolt host router that
      remains powered off until something is connected to it.  See [1] for the
      lspci details.
      
        1. Before something is connected, only the Root Port exists.  It has
           PCI_EXP_SLTCAP_HPC set and pciehp is responsible for hotplug:
      
             00:1b.0 Root Port (HotPlug+)
      
        2. When a USB-C or Thunderbolt device is connected, the Switch in the
           Thunderbolt host router is powered up, the Root Port signals a hotplug
           add event and pciehp enumerates the Switch:
      
             01:00.0 Switch Upstream Port   to [bus 02-39]
             02:00.0 Switch Downstream Port to [bus 03]    (HotPlug-, to NHI)
             02:01.0 Switch Downstream Port to [bus 04-38] (HotPlug+, to Thunderbolt connector)
             02:02.0 Switch Downstream Port to [bus 39]    (HotPlug-, to xHCI)
      
           The 02:00.0 and 02:02.0 Ports lead to Endpoints that are not powered
           up yet.  The Ports have PCI_EXP_SLTCAP_HPC cleared, so pciehp doesn't
           handle hotplug for them and we assign minimal resources to them.
      
           The 02:01.0 Port has PCI_EXP_SLTCAP_HPC set, so pciehp handles native
           hotplug events for it.
      
        3. The BIOS powers up the xHCI controller.  If a Thunderbolt device was
           connected (not just a USB-C device), it also powers up the NHI.  Then
           it sends an ACPI Notify() to the Root Port, and acpiphp enumerates the
           new device(s):
      
             03:00.0 Thunderbolt Host Controller (NHI) Endpoint
             39:00.0 xHCI Endpoint
      
        4. If a Thunderbolt device was connected, the host router firmware uses
           the NHI to set up Thunderbolt tunnels and triggers a native hotplug
           event (via 02:01.0 in this example).  Then pciehp enumerates the new
           Thunderbolt devices:
      
             04:00.0 Switch Upstream Port   to [bus 05-38]
             05:01.0 Switch Downstream Port to [bus 06-09] (HotPlug-)
             05:04.0 Switch Downstream Port to [bus 0a-38] (HotPlug+)
      
           In this example, 05:01.0 leads to another Switch and some NICs.  This
           subtree is static, so 05:01.0 doesn't support hotplug and has
           PCI_EXP_SLTCAP_HPC cleared.
      
      In step 3, acpiphp previously enumerated everything below the Root Port,
      including things below the 02:01.0 Port.  We don't want that because pciehp
      expects to manage hotplug below that Port, and firmware on the host router
      may be in the middle of configuring its Link so it may not be ready yet.
      
      To make this work better with the native PCIe (pciehp) and standard PCI
      (shpchp) hotplug drivers, we let them handle all slot management and
      resource allocation for hotplug bridges and restrict ACPI hotplug to
      non-hotplug bridges.
      
      [1] https://bugzilla.kernel.org/show_bug.cgi?id=199581#c5
      Link: https://lkml.kernel.org/r/20180529160155.1738-1-mika.westerberg@linux.intel.comSigned-off-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      [bhelgaas: changelog, use hotplug_is_native() instead of
      dev->is_hotplug_bridge]
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Reviewed-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Reviewed-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      84c8b58e
  4. 24 3月, 2018 1 次提交
    • M
      ACPI / hotplug / PCI: Check presence of slot itself in get_slot_status() · 13d3047c
      Mika Westerberg 提交于
      Mike Lothian reported that plugging in a USB-C device does not work
      properly in his Dell Alienware system.  This system has an Intel Alpine
      Ridge Thunderbolt controller providing USB-C functionality.  In these
      systems the USB controller (xHCI) is hotplugged whenever a device is
      connected to the port using ACPI-based hotplug.
      
      The ACPI description of the root port in question is as follows:
      
        Device (RP01)
        {
            Name (_ADR, 0x001C0000)
      
            Device (PXSX)
            {
                Name (_ADR, 0x02)
      
                Method (_RMV, 0, NotSerialized)
                {
                    // ...
                }
            }
      
      Here _ADR 0x02 means device 0, function 2 on the bus under root port (RP01)
      but that seems to be incorrect because device 0 is the upstream port of the
      Alpine Ridge PCIe switch and it has no functions other than 0 (the bridge
      itself).  When we get ACPI Notify() to the root port resulting from
      connecting a USB-C device, Linux tries to read PCI_VENDOR_ID from device 0,
      function 2 which of course always returns 0xffffffff because there is no
      such function and we never find the device.
      
      In Windows this works fine.
      
      Now, since we get ACPI Notify() to the root port and not to the PXSX device
      we should actually start our scan from there as well and not from the
      non-existent PXSX device.  Fix this by checking presence of the slot itself
      (function 0) if we fail to do that otherwise.
      
      While there use pci_bus_read_dev_vendor_id() in get_slot_status(), which is
      the recommended way to read Device and Vendor IDs of devices on PCI buses.
      
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=198557Reported-by: NMike Lothian <mike@fireburn.co.uk>
      Signed-off-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Reviewed-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: stable@vger.kernel.org
      13d3047c
  5. 29 1月, 2018 1 次提交
  6. 17 1月, 2018 1 次提交
    • M
      PCI: Remove unnecessary messages for memory allocation failures · c7abb235
      Markus Elfring 提交于
      Per ebfdc409 ("checkpatch: attempt to find unnecessary 'out of memory'
      messages"), when a memory allocation fails, the memory subsystem emits
      generic "out of memory" messages (see slab_out_of_memory() for some of this
      logging).  Therefore, additional error messages in the caller don't add
      much value.
      
      Remove messages that merely report "out of memory".
      
      This preserves some messages that report additional information, e.g.,
      allocation failures that mean we drop hotplug events.
      
      This issue was detected by using the Coccinelle software.
      Signed-off-by: NMarkus Elfring <elfring@users.sourceforge.net>
      [bhelgaas: changelog, squash patches, make similar changes to acpiphp,
      cpqphp, ibmphp, keep warning when dropping hotplug event]
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      c7abb235
  7. 07 11月, 2017 1 次提交
  8. 18 11月, 2016 2 次提交
    • L
      ACPI / hotplug / PCI: Make device_is_managed_by_native_pciehp() public · 437eb7bf
      Lukas Wunner 提交于
      We're about to add runtime PM of hotplug ports, but we need to restrict it
      to ports that are handled natively by the OS:  If they're handled by the
      firmware (which is the case for Thunderbolt on non-Macs), things would
      break if the OS put the ports into D3hot behind the firmware's back.
      
      To determine if a hotplug port is handled natively, one has to walk up from
      the port to the root bridge and check the cached _OSC Control Field for the
      value of the "PCI Express Native Hot Plug control" bit.  There's already a
      function to do that, device_is_managed_by_native_pciehp(), but it's private
      to drivers/pci/hotplug/acpiphp_glue.c and only compiled in if
      CONFIG_HOTPLUG_PCI_ACPI is enabled.
      
      Make it public and move it to drivers/pci/pci-acpi.c, so that it is
      available in the more general CONFIG_ACPI case.
      
      The function contains a check if the device in question is a hotplug port
      and returns false if it's not.  The caller we're going to add doesn't need
      this as it only calls the function if it actually *is* a hotplug port.
      Move the check out of the function into the single existing caller.
      
      Rename it to pciehp_is_native() and add some kerneldoc and polish.
      
      No functional change intended.
      Tested-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      Signed-off-by: NLukas Wunner <lukas@wunner.de>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Reviewed-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      437eb7bf
    • L
      ACPI / hotplug / PCI: Use cached copy of PCI_EXP_SLTCAP_HPC bit · 6ef13824
      Lukas Wunner 提交于
      We cache the PCI_EXP_SLTCAP_HPC bit in pci_dev->is_hotplug_bridge on device
      probe, so there's no need to read it again when adding the ACPI hotplug
      context.
      
      Here's the call chain to prove that no ordering issue is introduced:
      
      pci_scan_child_bus [drivers/pci/probe.c]
        pci_scan_slot
          pci_scan_single_device
            pci_scan_device
              pci_setup_device
                set_pcie_hotplug_bridge
                  [is_hotplug_bridge bit is set here]
        pci_scan_bridge
          pci_add_new_bus
            pci_alloc_child_bus
              pcibios_add_bus  [arch/(x86|arm64|ia64)/...]
                acpi_pci_add_bus [drivers/pci/pci-acpi.c]
                  acpiphp_enumerate_slots [drivers/pci/hotplug/acpiphp_glue.c]
                    acpiphp_add_context
                      device_is_managed_by_native_pciehp
                        [is_hotplug_bridge bit is queried here]
      
      No functional change intended.
      Tested-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      Signed-off-by: NLukas Wunner <lukas@wunner.de>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Reviewed-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      6ef13824
  9. 05 8月, 2016 1 次提交
  10. 04 8月, 2016 1 次提交
  11. 14 6月, 2016 1 次提交
  12. 24 1月, 2016 1 次提交
  13. 09 1月, 2016 1 次提交
  14. 23 5月, 2015 1 次提交
    • R
      ACPI / hotplug / PCI: Check ignore_hotplug for all downstream devices · d41be346
      Rafael J. Wysocki 提交于
      If the ignore_hotplug flag is set for a PCI device without an ACPI
      companion and a bus check notification is received for an ancestor bridge
      that is not the device's parent, ACPIPHP will ignore that flag.
      
      Namely, in that case acpiphp_check_bridge() is called for the target bridge
      and if all of the devices immediately below the bridge are still present,
      trim_stale_devices() will be called for each of them.  That function
      recursively walks the hierarchy downwards and removes device objects
      corresponding to devices that don't appear to be present any more.
      Unfortunately, it only checks ignore_hotplug for devices having ACPI
      companions, so it will remove the others (if they don't respond) regardless
      of the ignore_hotplug value.
      
      Fix the problem by making trim_stale_devices() take ignore_hotplug into
      consideration regardless of whether or not an ACPI companion is present for
      the device it has been called for.
      
      [bhelgaas: This may fix bug 61891, depending on whether the bridge above a
      device is removed along with the device]
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=61891Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      d41be346
  15. 13 9月, 2014 1 次提交
  16. 11 9月, 2014 1 次提交
    • B
      PCI: Add pci_ignore_hotplug() to ignore hotplug events for a device · b440bde7
      Bjorn Helgaas 提交于
      Powering off a hot-pluggable device, e.g., with pci_set_power_state(D3cold),
      normally generates a hot-remove event that unbinds the driver.
      
      Some drivers expect to remain bound to a device even while they power it
      off and back on again.  This can be dangerous, because if the device is
      removed or replaced while it is powered off, the driver doesn't know that
      anything changed.  But some drivers accept that risk.
      
      Add pci_ignore_hotplug() for use by drivers that know their device cannot
      be removed.  Using pci_ignore_hotplug() tells the PCI core that hot-plug
      events for the device should be ignored.
      
      The radeon and nouveau drivers use this to switch between a low-power,
      integrated GPU and a higher-power, higher-performance discrete GPU.  They
      power off the unused GPU, but they want to remain bound to it.
      
      This is a reimplementation of f244d8b6 ("ACPIPHP / radeon / nouveau:
      Fix VGA switcheroo problem related to hotplug") but extends it to work with
      both acpiphp and pciehp.
      
      This fixes a problem where systems with dual GPUs using the radeon drivers
      become unusable, freezing every few seconds (see bugzillas below).  The
      resume of the radeon device may also fail, e.g.,
      
      This fixes problems on dual GPU systems where the radeon driver becomes
      unusable because of problems while suspending the device, as in bug 79701:
      
          [drm] radeon: finishing device.
          radeon 0000:01:00.0: Userspace still has active objects !
          radeon 0000:01:00.0: ffff8800cb4ec288 ffff8800cb4ec000 16384 4294967297 force free
          ...
          WARNING: CPU: 0 PID: 67 at /home/apw/COD/linux/drivers/gpu/drm/radeon/radeon_gart.c:234 radeon_gart_unbind+0xd2/0xe0 [radeon]()
          trying to unbind memory from uninitialized GART !
      
      or while resuming it, as in bug 77261:
      
          radeon 0000:01:00.0: ring 0 stalled for more than 10158msec
          radeon 0000:01:00.0: GPU lockup ...
          radeon 0000:01:00.0: GPU pci config reset
          pciehp 0000:00:01.0:pcie04: Card not present on Slot(1-1)
          radeon 0000:01:00.0: GPU reset succeeded, trying to resume
          *ERROR* radeon: dpm resume failed
          radeon 0000:01:00.0: Wait for MC idle timedout !
      
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=77261
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=79701Reported-by: NShawn Starr <shawn.starr@rogers.com>
      Reported-by: NJose P. <lbdkmjdf@sharklasers.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Acked-by: NAlex Deucher <alexander.deucher@amd.com>
      Acked-by: NRajat Jain <rajatxjain@gmail.com>
      Acked-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Acked-by: NDave Airlie <airlied@redhat.com>
      CC: stable@vger.kernel.org	# v3.15+
      b440bde7
  17. 21 7月, 2014 1 次提交
  18. 16 7月, 2014 2 次提交
  19. 12 6月, 2014 1 次提交
  20. 11 6月, 2014 1 次提交
  21. 28 5月, 2014 1 次提交
  22. 30 4月, 2014 1 次提交
    • B
      PCI: Remove unnecessary __ref annotations · 10874f5a
      Bjorn Helgaas 提交于
      Some PCI functions used to be marked __devinit.  When CONFIG_HOTPLUG was
      not set, these functions were discarded after boot.  A few callers of these
      __devinit functions were marked __ref to indicate that they could safely
      call the __devinit functions even though the callers were not __devinit.
      
      But CONFIG_HOTPLUG and __devinit are now gone, and the need for the __ref
      annotations is also gone, so remove them.  Relevant historical commits:
      
        54b956b9 Remove __dev* markings from init.h
        a8e4b9c1 PCI: add generic pci_hp_add_bridge()
        0ab2b57f PCI: fix section mismatch warning in pci_scan_child_bus
        451124a7 PCI: fix 4x section mismatch warnings
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      10874f5a
  23. 15 4月, 2014 1 次提交
  24. 05 3月, 2014 1 次提交
  25. 21 2月, 2014 5 次提交
  26. 16 2月, 2014 2 次提交
    • R
      ACPI / hotplug / PCI: Add ACPIPHP contexts to devices handled by PCIeHP · cc6254e0
      Rafael J. Wysocki 提交于
      Currently, ACPIPHP does not add hotplug context to devices that
      should be handled by the native PCI hotplug (PCIeHP) code.  The
      reason why was because PCIeHP didn't know about the devices'
      connections with ACPI and would not clean up things properly
      during an eject of an ACPI-backed device, for example.
      
      However, after recent changes that made the ACPI core create struct
      acpi_device objects for all namespace nodes regardless of the
      underlying devices' status and added PCI rescan-remove locking to
      both ACPIPHP and PCIeHP, that concern is not valid any more.
      Namely, after those changes PCIeHP need not care about the ACPI
      side of things any more and it should be serialized with respect to
      ACPIPHP and they won't be running concurrently with each other in
      any case.
      
      For this reason, make ACPIPHP to add its hotplug context to
      all devices with ACPI companions, even the ones that should be
      handled by PCIeHP in principle.  That may work around hotplug
      issues on some systems where PCIeHP is supposed to work, but it
      doesn't and the ACPI hotplug signaling works instead.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      cc6254e0
    • R
      ACPI / hotplug / PCI: Rename register_slot() to acpiphp_add_context() · 3799c5a0
      Rafael J. Wysocki 提交于
      The name of register_slot() doesn't really reflect what the function
      is does, so rename it to acpiphp_add_context() and add a proper
      kerneldoc comment to it.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      3799c5a0
  27. 15 2月, 2014 1 次提交
  28. 12 2月, 2014 1 次提交
    • M
      ACPI / hotplug / PCI: Relax the checking of _STA return values · 72820594
      Mika Westerberg 提交于
      The ACPI specification (ACPI 5.0A, Section 6.3.7) says:
      
       _STA may return bit 0 clear (not present) with bit 3 set (device is
       functional). This case is used to indicate a valid device for which
       no device driver should be loaded (for example, a bridge device.)
       Children of this device may be present and valid. OSPM should
       continue enumeration below a device whose _STA returns this bit
       combination.
      
      Evidently, some BIOSes follow that and return 0x0A from _STA, which
      causes problems to happen when they trigger bus check or device check
      notifications for those devices too.  Namely, ACPIPHP thinks that they
      are gone and may drop them, for example, if such a notification is
      triggered during a resume from system suspend.
      
      To fix that, modify ACPICA to regard devies as present and
      functioning if _STA returns both the ACPI_STA_DEVICE_ENABLED
      and ACPI_STA_DEVICE_FUNCTIONING bits set for them.
      Reported-and-tested-by: NPeter Wu <lekensteyn@gmail.com>
      Cc: 3.12+ <stable@vger.kernel.org> # 3.12+
      [rjw: Subject and changelog, minor code modifications]
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      72820594
  29. 10 2月, 2014 1 次提交
  30. 07 2月, 2014 2 次提交
    • R
      ACPI / hotplug / PCI: Rework acpiphp_check_host_bridge() · 1f7c164b
      Rafael J. Wysocki 提交于
      Since the only existing caller of acpiphp_check_host_bridge(),
      which is acpi_pci_root_scan_dependent(), already has a struct
      acpi_device pointer needed to obtain the ACPIPHP context, it
      doesn't make sense to execute acpi_bus_get_device() on its
      handle in acpiphp_handle_to_bridge() just in order to get that
      pointer back.
      
      For this reason, modify acpiphp_check_host_bridge() to take
      a struct acpi_device pointer as its argument and rearrange the
      code accordingly.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Tested-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      1f7c164b
    • R
      ACPI / hotplug / PCI: Hotplug notifications from acpi_bus_notify() · 1a699476
      Rafael J. Wysocki 提交于
      Since acpi_bus_notify() is executed on all notifications for all
      devices anyway, make it execute acpi_device_hotplug() for all
      hotplug events instead of installing notify handlers pointing to
      the same function for all hotplug devices.
      
      This change reduces both the size and complexity of ACPI-based device
      hotplug code.  Moreover, since acpi_device_hotplug() only does
      significant things for devices that have either an ACPI scan handler,
      or a hotplug context with .eject() defined, and those devices
      had notify handlers pointing to acpi_hotplug_notify_cb() installed
      before anyway, this modification shouldn't change functionality.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      1a699476