1. 15 2月, 2014 1 次提交
  2. 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
  3. 10 2月, 2014 3 次提交
    • R
      ACPI / dock: Use acpi_device_enumerated() to check if dock is present · 0a8e5c3d
      Rafael J. Wysocki 提交于
      After commit 202317a5 (ACPI / scan: Add acpi_device objects for
      all device nodes in the namespace) acpi_bus_get_device() will always
      return 0 for dock devices in dock_notify(), so the dock station
      docking code under ACPI_NOTIFY_DEVICE_CHECK will never be executed
      and docking will not work as a result of that.
      
      Fix the problem by making dock_notify() use acpi_device_enumerated()
      to check the presence of the device instead of checking the return
      value of acpi_bus_get_device().
      
      Fixes: 202317a5 (ACPI / scan: Add acpi_device objects for all device nodes in the namespace)
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      0a8e5c3d
    • R
      ACPI / hotplug / PCI: Execute _EJ0 under the ACPI scan lock · 21369c77
      Rafael J. Wysocki 提交于
      Since acpi_device_hotplug() assumes that ACPI handles of device
      objects passed to it will not become invalid while acpi_scan_lock
      is being held, make acpiphp_disable_slot() acquire acpi_scan_lock,
      because it generally causes _EJ0 to be executed for one of the
      devices in the slot and that may cause its ACPI handle to become
      invalid.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      21369c77
    • A
      fix a kmap leak in virtio_console · c9efe511
      Al Viro 提交于
      While we are at it, don't do kmap() under kmap_atomic(), *especially*
      for a page we'd allocated with GFP_KERNEL.  It's spelled "page_address",
      and had that been more than that, we'd have a real trouble - kmap_high()
      can block, and doing that while holding kmap_atomic() is a Bad Idea(tm).
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      c9efe511
  4. 08 2月, 2014 1 次提交
  5. 07 2月, 2014 6 次提交
    • A
      hwmon: (da9055) Remove use of regmap_irq_get_virq() · 4f545a4b
      Adam Thomson 提交于
      Remove use of regmap_irq_get_virq() in driver probe which was
      conflicting with use of platform_get_irq_byname().
      platform_get_irq_byname() already returns the VIRQ number due
      to MFD core translation so using regmap_irq_get_virq() on that
      returned value results in an incorrect IRQ being requested.
      The driver probes then fail because of this.
      Signed-off-by: NAdam Thomson <Adam.Thomson.Opensource@diasemi.com>
      Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
      4f545a4b
    • 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
    • R
      ACPI / hotplug / PCI: Simplify acpi_install_hotplug_notify_handler() · 5e6f236c
      Rafael J. Wysocki 提交于
      Since acpi_hotplug_notify_cb() does not use its data argument any
      more, the second argument of acpi_install_hotplug_notify_handler()
      can be dropped, so do that and update its callers accordingly.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      5e6f236c
    • R
      ACPI / hotplug / PCI: Rework the handling of eject requests · dd2151be
      Rafael J. Wysocki 提交于
      To avoid the need to install a hotplug notify handler for each ACPI
      namespace node representing a device and having a matching scan
      handler, move the check whether or not the ejection of the given
      device is enabled through its scan handler from acpi_hotplug_notify_cb()
      to acpi_generic_hotplug_event().  Also, move the execution of
      ACPI_OST_SC_EJECT_IN_PROGRESS _OST to acpi_generic_hotplug_event(),
      because in acpi_hotplug_notify_cb() or in acpi_eject_store() we really
      don't know whether or not the eject is going to be in progress (for
      example, acpi_hotplug_execute() may still fail without queuing up the
      work item).
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Tested-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      dd2151be
    • R
      ACPI / hotplug / PCI: Consolidate ACPIPHP with ACPI core hotplug · 3c2cc7ff
      Rafael J. Wysocki 提交于
      The ACPI-based PCI hotplug (ACPIPHP) code currently attaches its
      hotplug context objects directly to ACPI namespace nodes representing
      hotplug devices.  However, after recent changes causing struct
      acpi_device to be created for every namespace node representing a
      device (regardless of its status), that is not necessary any more.
      Moreover, it's vulnerable to the theoretical issue that the ACPI
      handle passed in the context between handle_hotplug_event() and
      hotplug_event_work() may become invalid in the meantime (as a
      result of a concurrent table unload).
      
      In principle, this issue might be addressed by adding a non-empty
      release handler for ACPIPHP hotplug context objects analogous to
      acpi_scan_drop_device(), but that would duplicate the code in that
      function and in acpi_device_del_work_fn().  For this reason, it's
      better to modify ACPIPHP to attach its device hotplug contexts to
      struct device objects representing hotplug devices and make it
      use acpi_hotplug_notify_cb() as its notify handler.  At the same
      time, acpi_device_hotplug() can be modified to dispatch the new
      .hp.event() callback pointing to acpiphp_hotplug_event() from ACPI
      device objects associated with PCI devices or use the generic
      ACPI device hotplug code for device objects with matching scan
      handlers.
      
      This allows the existing code duplication between ACPIPHP and the
      ACPI core to be reduced too and makes further ACPI-based device
      hotplug consolidation possible.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      3c2cc7ff
  6. 06 2月, 2014 18 次提交
  7. 05 2月, 2014 10 次提交