1. 03 6月, 2018 1 次提交
  2. 18 5月, 2018 5 次提交
    • O
      PCI/portdrv: Add generic pcie_port_find_service() · f252d062
      Oza Pawandeep 提交于
      Add generic pcie_port_find_service() routine.
      Signed-off-by: NOza Pawandeep <poza@codeaurora.org>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Reviewed-by: NKeith Busch <keith.busch@intel.com>
      f252d062
    • O
      PCI/AER: Factor out error reporting to drivers/pci/pcie/err.c · 2e28bc84
      Oza Pawandeep 提交于
      Move the error reporting callbacks from aerdrv_core.c to err.c, where they
      can be used by DPC in addition to AER.
      
      As part of aerdrv_core.c, these callbacks were built under CONFIG_PCIEAER.
      Moving them to the new err.c means they will now be built under
      CONFIG_PCIEPORTBUS, so adjust the definition of pci_uevent_ers() to match.
      Signed-off-by: NOza Pawandeep <poza@codeaurora.org>
      [bhelgaas: in reset_link(), initialize "driver" even if CONFIG_PCIEAER is
      unset, update pci_uevent_ers() #ifdef wrapper]
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      2e28bc84
    • O
      PCI/AER: Rename error recovery interfaces to generic PCI naming · d25e28e8
      Oza Pawandeep 提交于
      Rename error recovery interfaces with "pcie_" prefix so they can be made
      non-static.
      Signed-off-by: NOza Pawandeep <poza@codeaurora.org>
      [bhelgaas: move declaration to later patch, leave functions static]
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Reviewed-by: NKeith Busch <keith.busch@intel.com>
      d25e28e8
    • O
      PCI/AER: Handle ERR_FATAL with removal and re-enumeration of devices · 7e9084b3
      Oza Pawandeep 提交于
      PCIe ERR_FATAL errors mean the Link is unreliable.  Components on the Link
      may need to be reset to return to reliable operation (PCIe r4.0, sec
      6.2.2).  We previously handled these errors much differently depending on
      whether the platform supports Downstream Port Containment (DPC) (PCIe r4.0,
      sec 6.2.10) or not.
      
      The AER driver has historically logged the error details, called
      driver-supplied pci_error_handlers callbacks, and reset the Link.  This
      reset downstream devices, but did not remove them from the PCI subsystem,
      re-enumerate them, or call their driver .remove() or .probe() methods.
      
      DPC is different because the hardware automatically disables the Link when
      it detects ERR_FATAL, which resets downstream devices.  There's no
      opportunity for pci_error_handlers callbacks before resetting the Link.
      The DPC driver removes affected devices (which calls their driver .remove()
      methods), brings the Link back up, and re-enumerates (which calls driver
      .probe() methods).
      
      Align AER ERR_FATAL handling with DPC by resetting the Link in software,
      skipping the driver pci_error_handlers callbacks, removing the devices from
      the PCI subsystem, and re-enumerating.  The idea is that drivers and
      devices should see the same behavior for ERR_FATAL events, regardless of
      whether they're handled by AER or DPC.
      
      Here are the basic ERR_FATAL recovery steps, showing the previous AER
      behavior, the AER behavior after this patch, and the DPC behavior:
      
                                AER        AER      DPC
                                previous   new      behavior
                                --------   ---      --------
        Log error               yes        yes      yes (minimal)
        drv.error_detected()    yes        no       no
        Reset Link              yes        yes      yes
        drv.mmio_enabled()      yes        no       no
        drv.slot_reset()        yes        no       no
        drv.resume()            yes        no       no
        Remove PCI devices      no         yes      yes
          (calls drv.remove())
        Re-enumerate            no         yes      yes
          (calls drv.probe())
      
      N.B. With DPC, the Link reset happens before the driver .remove() calls,
      while with AER, the reset happens *after* the .remove() calls.  The goal is
      to eventually do the reset before .remove() for AER as well.
      Signed-off-by: NOza Pawandeep <poza@codeaurora.org>
      [bhelgaas: changelog, squash doc patch into this, remove unused
      "result_data"]
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Reviewed-by: NKeith Busch <keith.busch@intel.com>
      7e9084b3
    • O
      PCI: Add generic pcie_wait_for_link() interface · 9f5a70f1
      Oza Pawandeep 提交于
      Clients such as hotplug and Downstream Port Containment (DPC) both need to
      wait until a link becomes active or inactive.
      
      Add a generic pcie_wait_link_active() interface and use it instead of
      duplicating the code.
      Signed-off-by: NOza Pawandeep <poza@codeaurora.org>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Reviewed-by: NKeith Busch <keith.busch@intel.com>
      9f5a70f1
  3. 10 5月, 2018 1 次提交
  4. 08 5月, 2018 1 次提交
    • A
      PCI/AER: Unify error bit printing for native and CPER reporting · 5d0b401f
      Alexandru Gagniuc 提交于
      AER errors can be reported natively (Linux AER driver fields interrupts and
      reads error state directly from hardware) or via the ACPI/APEI/GHES/CPER
      path (platform firmware reads error state from hardware and sends it to
      Linux via ACPI interfaces).
      
      Previously the same error would produce different output depending on
      whether it was reported natively or via ACPI.  The CPER path resulted in
      hard-to-understand messages, without a prefix. Instead use
      __aer_print_error() for both native AER and CPER to provide a more
      consistent log format.
      Signed-off-by: NAlexandru Gagniuc <mr.nuke.me@gmail.com>
      [bhelgaas: changelog]
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      5d0b401f
  5. 13 4月, 2018 8 次提交
  6. 12 4月, 2018 24 次提交