1. 11 6月, 2014 2 次提交
  2. 14 1月, 2014 1 次提交
    • B
      PCI/AER: Support ACPI HEST AER error sources for PCI domains other than 0 · 339c0fc5
      Betty Dall 提交于
      In the discussion for this set of patches [link below], Bjorn Helgaas
      pointed out that the ACPI HEST AER error sources do not have the PCIe
      segment number associated with the bus.  I worked with the ACPI spec and
      got this change to definition of the "Bus" field into the recently released
      ACPI Spec 5.0a section 18.3.2.3-5:
      
        Identifies the PCI Bus and Segment of the device.  The Bus is encoded in
        bits 0-7.  For systems that expose multiple PCI segment groups, the
        segment number is encoded in bits 8-23 and bits 24-31 must be zero.  For
        systems that do not expose multiple PCI segment groups, bits 8-31 must be
        zero.  If the GLOBAL flag is specified, this field is ignored.
      
      This patch makes use of the new definition in the only place in the kernel
      that uses the acpi_hest_aer_common's bus field.
      
      This depends on 36f36151 ("ACPICA: Add helper macros to extract
      bus/segment numbers from HEST table.")
      
      Link: http://lkml.kernel.org/r/1370542251-27387-1-git-send-email-betty.dall@hp.comSigned-off-by: NBetty Dall <betty.dall@hp.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      339c0fc5
  3. 14 12月, 2013 4 次提交
  4. 15 11月, 2013 2 次提交
    • S
      kfifo API type safety · 498d319b
      Stefani Seibold 提交于
      This patch enhances the type safety for the kfifo API.  It is now safe
      to put const data into a non const FIFO and the API will now generate a
      compiler warning when reading from the fifo where the destination
      address is pointing to a const variable.
      
      As a side effect the kfifo_put() does now expect the value of an element
      instead a pointer to the element.  This was suggested Russell King.  It
      make the handling of the kfifo_put easier since there is no need to
      create a helper variable for getting the address of a pointer or to pass
      integers of different sizes.
      
      IMHO the API break is okay, since there are currently only six users of
      kfifo_put().
      
      The code is also cleaner by kicking out the "if (0)" expressions.
      
      [akpm@linux-foundation.org: coding-style fixes]
      Signed-off-by: NStefani Seibold <stefani@seibold.net>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Cc: Hauke Mehrtens <hauke@hauke-m.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      498d319b
    • B
      PCI: Fix whitespace, capitalization, and spelling errors · f7625980
      Bjorn Helgaas 提交于
      Fix whitespace, capitalization, and spelling errors.  No functional change.
      I know "busses" is not an error, but "buses" was more common, so I used it
      consistently.
      
      Signed-off-by: Marta Rybczynska <rybczynska@gmail.com> (pci_reset_bridge_secondary_bus())
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Acked-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      f7625980
  5. 15 8月, 2013 1 次提交
  6. 07 6月, 2013 5 次提交
  7. 31 5月, 2013 1 次提交
  8. 18 4月, 2013 1 次提交
  9. 13 4月, 2013 1 次提交
  10. 04 4月, 2013 1 次提交
  11. 27 3月, 2013 1 次提交
  12. 14 1月, 2013 1 次提交
  13. 04 1月, 2013 2 次提交
  14. 29 11月, 2012 1 次提交
  15. 27 11月, 2012 1 次提交
    • V
      PCI/AER: Report success only when every device has AER-aware driver · 918b4053
      Vijay Mohan Pandarathil 提交于
      When an error is detected on a PCIe device which does not have an
      AER-aware driver, prevent AER infrastructure from reporting
      successful error recovery.
      
      This is because the report_error_detected() function that gets
      called in the first phase of recovery process allows forward
      progress even when the driver for the device does not have AER
      capabilities. It seems that all callbacks (in pci_error_handlers
      structure) registered by drivers that gets called during error
      recovery are not mandatory. So the intention of the infrastructure
      design seems to be to allow forward progress even when a specific
      callback has not been registered by a driver. However, if error
      handler structure itself has not been registered, it doesn't make
      sense to allow forward progress.
      
      As a result of the current design, in the case of a single device
      having an AER-unaware driver or in the case of any function in a
      multi-function card having an AER-unaware driver, a successful
      recovery is reported.
      
      Typical scenario this happens is when a PCI device is detached
      from a KVM host and the pci-stub driver on the host claims the
      device. The pci-stub driver does not have error handling capabilities
      but the AER infrastructure still reports that the device recovered
      successfully.
      
      The changes proposed here leaves the device(s)in an unrecovered state
      if the driver for the device or for any device in the subtree
      does not have error handler structure registered. This reflects
      the true state of the device and prevents any partial recovery (or no
      recovery at all) reported as successful.
      
      [bhelgaas: changelog]
      Signed-off-by: NVijay Mohan Pandarathil <vijaymohan.pandarathil@hp.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Reviewed-by: NLinas Vepstas <linasvepstas@gmail.com>
      Reviewed-by: NMyron Stowe <myron.stowe@redhat.com>
      918b4053
  16. 03 11月, 2012 1 次提交
    • H
      PCI/PM: Fix deadlock when unbinding device if parent in D3cold · 90b5c1d7
      Huang Ying 提交于
      If a PCI device and its parents are put into D3cold, unbinding the
      device will trigger deadlock as follow:
      
      - driver_unbind
        - device_release_driver
          - device_lock(dev)				<--- previous lock here
          - __device_release_driver
            - pm_runtime_get_sync
              ...
                - rpm_resume(dev)
                  - rpm_resume(dev->parent)
                    ...
                      - pci_pm_runtime_resume
                        ...
                        - pci_set_power_state
                          - __pci_start_power_transition
                            - pci_wakeup_bus(dev->parent->subordinate)
                              - pci_walk_bus
                                - device_lock(dev)	<--- deadlock here
      
      
      If we do not do device_lock in pci_walk_bus, we can avoid deadlock.
      Device_lock in pci_walk_bus is introduced in commit:
      d71374da, corresponding email thread
      is: https://lkml.org/lkml/2006/5/26/38.  The patch author Zhang Yanmin
      said device_lock is added to pci_walk_bus because:
      
        Some error handling functions call pci_walk_bus. For example, PCIe
        aer. Here we lock the device, so the driver wouldn't detach from the
        device, as the cb might call driver's callback function.
      
      So I fixed the deadlock as follows:
      
      - remove device_lock from pci_walk_bus
      - add device_lock into callback if callback will call driver's callback
      
      I checked pci_walk_bus users one by one, and found only PCIe aer needs
      device lock.
      Signed-off-by: NHuang Ying <ying.huang@intel.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Acked-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      CC: stable@vger.kernel.org		# v3.6+
      CC: Zhang Yanmin <yanmin.zhang@intel.com>
      90b5c1d7
  17. 08 9月, 2012 1 次提交
  18. 25 8月, 2012 1 次提交
  19. 24 8月, 2012 1 次提交
  20. 23 8月, 2012 1 次提交
  21. 12 6月, 2012 1 次提交
  22. 13 1月, 2012 1 次提交
  23. 22 7月, 2011 1 次提交
    • H
      PCI: PCIe AER: add aer_recover_queue · 0918472c
      Huang Ying 提交于
      In addition to native PCIe AER, now APEI (ACPI Platform Error
      Interface) GHES (Generic Hardware Error Source) can be used to report
      PCIe AER errors too.  To add support to APEI GHES PCIe AER recovery,
      aer_recover_queue is added to export the recovery function in native
      PCIe AER driver.
      
      Recoverable PCIe AER errors are reported via NMI in APEI GHES.  Then
      APEI GHES uses irq_work to delay the error processing into an IRQ
      handler.  But PCIe AER recovery can be very time-consuming, so
      aer_recover_queue, which can be used in IRQ handler, delays the real
      recovery action into the process context, that is, work queue.
      Signed-off-by: NHuang Ying <ying.huang@intel.com>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      0918472c
  24. 22 5月, 2011 1 次提交
  25. 11 5月, 2011 1 次提交
  26. 22 3月, 2011 2 次提交
    • H
      ACPI, APEI, Add PCIe AER error information printing support · c413d768
      Huang Ying 提交于
      The AER error information printing support is implemented in
      drivers/pci/pcie/aer/aer_print.c.  So some string constants, functions
      and macros definitions can be re-used without being exported.
      
      The original PCIe AER error information printing function is not
      re-used directly because the overall format is quite different.  And
      changing the original printing format may make some original users'
      scripts broken.
      Signed-off-by: NHuang Ying <ying.huang@intel.com>
      CC: Jesse Barnes <jbarnes@virtuousgeek.org>
      CC: Zhang Yanmin <yanmin.zhang@intel.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      c413d768
    • H
      PCIe, AER, use pre-generated prefix in error information printing · b64a4414
      Huang Ying 提交于
      When printing PCIe AER error information, each line is prefixed with
      PCIe device and driver information.  In original implementation, the
      prefix is generated when each line is printed.  In fact, all lines
      share the same prefix.  So this patch pre-generated the prefix, and
      use that one when each line is printed.
      
      In addition to common prefix can be pre-generated, the trailing white
      spaces in string constants and NULLs in char * array constants can be
      removed too.  These can reduce the object file size further.
      
      The size of object file before and after changing is as follow:
      
                 text    data     bss     dec
      before:    3038       0       0    3038
      after:     2118       0       0    2118
      Signed-off-by: NHuang Ying <ying.huang@intel.com>
      CC: Jesse Barnes <jbarnes@virtuousgeek.org>
      CC: Zhang Yanmin <yanmin.zhang@intel.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      b64a4414
  27. 05 3月, 2011 1 次提交
    • P
      PCI: aer-inject: Override PCIe AER Mask Registers · 457d9d08
      Prarit Bhargava 提交于
      I have several systems which have the same problem:  The PCIe AER
      corrected and uncorrected masks have all the error bits set.  This
      results in the inablility to test with the aer_inject module & utility
      on those systems.
      
      Add the 'aer_mask_override' module parameter which will override the
      corrected or uncorrected masks for a PCI device.  The mask will have the
      bit corresponding to the status passed into the aer_inject() function.
      
      After this patch it is possible to successfully use the aer_inject
      utility on those PCI slots.
      
      Successfully tested by me on a Dell and Intel whitebox which exhibited
      the mask problem.
      Signed-off-by: NPrarit Bhargava <prarit@redhat.com>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      457d9d08
  28. 15 1月, 2011 1 次提交
  29. 16 10月, 2010 1 次提交
    • R
      PCI/PCIe/AER: Disable native AER service if BIOS has precedence · b22c3d82
      Rafael J. Wysocki 提交于
      There is a design issue related to PCIe AER and _OSC that the BIOS
      may be asked to grant control of the AER service even if some
      Hardware Error Source Table (HEST) entries contain information
      meaning that the BIOS really should control it.  Namely,
      pcie_port_acpi_setup() calls pcie_aer_get_firmware_first() that
      determines whether or not the AER service should be controlled by
      the BIOS on the basis of the HEST information for the given PCIe
      port.  The BIOS is asked to grant control of the AER service for
      a PCIe Root Complex if pcie_aer_get_firmware_first() returns 'false'
      for at least one root port in that complex, even if all of the other
      root ports' HEST entries have the FIRMWARE_FIRST flag set (and none
      of them has the GLOBAL flag set).  However, if the AER service is
      controlled by the kernel, that may interfere with the BIOS' handling
      of the error sources having the FIRMWARE_FIRST flag.  Moreover,
      there may be PCIe endpoints that have the FIRMWARE_FIRST flag set in
      HEST and are attached to the root ports in question, in which case it
      also may be unsafe to ask the BIOS for control of the AER service.
      
      For this reason, introduce a function checking if there's at least
      one PCIe-related HEST entry with the FIRMWARE_FIRST flag set and
      disable the native AER service altogether if this function returns
      'true'.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      b22c3d82