1. Mar 13, 2024
  2. Mar 09, 2024
  3. Mar 08, 2024
  4. Mar 06, 2024
  5. Feb 29, 2024
    • Smita Koralahalli's avatar
      PCI/DPC: Ignore Surprise Down error on hot removal · 2ae8fbbe
      Smita Koralahalli authored
      According to PCIe r6.0 sec 6.7.6 [1], async removal with DPC may result in
      surprise down error. This error is expected and is just a side-effect of
      async remove.
      
      Ignore surprise down error generated as a side-effect of async remove.
      Typically, this error is benign as the pciehp handler invoked by PDC
      or/and DLLSC alongside DPC, de-enumerates and brings down the device
      appropriately, but the error messages might confuse users. Get rid of
      these irritating log messages with a 1s delay while pciehp waits for
      DPC recovery.
      
      The implementation is as follows: On an async remove a DPC is triggered
      along with a Presence Detect State change and/or DLL State Change.
      Determine it's an async remove by checking for DPC Trigger Status in DPC
      Status Register and Surprise Down Error Status in AER Uncorrected Error
      Status to be non-zero. If true, treat the DPC event as a side-effect of
      async remove, clear the error status registers and continue with hot-plug
      tear down routines. If not, follow the existing routine to handle AER and
      DPC errors.
      
      Masking Surprise Down Errors was explored as an alternative approach, but
      discarded due to the odd behavior that masking only avoids the interrupt,
      but still records an error per PCIe r6.0, sec 6.2.3.2.2. That stale error
      would be reported the next time some error other than Surprise Down is
      handled.
      
      Dmesg before:
      
        pcieport 0000:00:01.4: DPC: containment event, status:0x1f01 source:0x0000
        pcieport 0000:00:01.4: DPC: unmasked uncorrectable error detected
        pcieport 0000:00:01.4: PCIe Bus Error: severity=Uncorrected (Fatal), type=Transaction Layer, (Receiver ID)
        pcieport 0000:00:01.4:   device [1022:14ab] error status/mask=00000020/04004000
        pcieport 0000:00:01.4:    [ 5] SDES (First)
        nvme nvme2: frozen state error detected, reset controller
        pcieport 0000:00:01.4: DPC: Data Link Layer Link Active not set in 1000 msec
        pcieport 0000:00:01.4: AER: subordinate device reset failed
        pcieport 0000:00:01.4: AER: device recovery failed
        pcieport 0000:00:01.4: pciehp: Slot(16): Link Down
        nvme2n1: detected capacity change from 1953525168 to 0
        pci 0000:04:00.0: Removing from iommu group 49
      
      Dmesg after:
      
       pcieport 0000:00:01.4: pciehp: Slot(16): Link Down
       nvme1n1: detected capacity change from 1953525168 to 0
       pci 0000:04:00.0: Removing from iommu group 37
      
      [1] PCI Express Base Specification Revision 6.0, Dec 16 2021.
          https://members.pcisig.com/wg/PCI-SIG/document/16609
      
      Link: https://lore.kernel.org/r/20240207181854.121335-1-Smita.KoralahalliChannabasappa@amd.com
      
      
      Signed-off-by: default avatarSmita Koralahalli <Smita.KoralahalliChannabasappa@amd.com>
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      Reviewed-by: default avatarLukas Wunner <lukas@wunner.de>
      Reviewed-by: default avatarKuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
      Reviewed-by: default avatarIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
      2ae8fbbe
  6. Feb 21, 2024
  7. Feb 13, 2024
  8. Feb 09, 2024
  9. Feb 03, 2024
  10. Feb 01, 2024
  11. Jan 30, 2024
  12. Jan 23, 2024
  13. Jan 22, 2024