1. May 14, 2019
    • Bjorn Helgaas's avatar
      Merge branch 'pci/misc' · 09fdd75c
      Bjorn Helgaas authored
        - Mark expected switch fall-throughs (Gustavo A. R. Silva)
      
        - Remove unused pci_request_region_exclusive() (Johannes Thumshirn)
      
        - Fix x86 PCI IRQ routing table memory leak (Wenwen Wang)
      
        - Reset Lenovo ThinkPad P50 if firmware didn't do it on reboot (Lyude
          Paul)
      
        - Add and use pci_dev_id() helper to simplify PCI_DEVID() usage (touches
          several places outside drivers/pci/) (Heiner Kallweit)
      
        - Transition Mobiveil PCI maintenance to Karthikeyan M and Hou Zhiqiang
          (Subrahmanya Lingappa)
      
      * pci/misc:
        MAINTAINERS: Add Karthikeyan Mitran and Hou Zhiqiang for Mobiveil PCI
        platform/chrome: chromeos_laptop: use pci_dev_id() helper
        stmmac: pci: Use pci_dev_id() helper
        iommu/vt-d: Use pci_dev_id() helper
        iommu/amd: Use pci_dev_id() helper
        drm/amdkfd: Use pci_dev_id() helper
        powerpc/powernv/npu: Use pci_dev_id() helper
        r8169: use pci_dev_id() helper
        PCI: Add pci_dev_id() helper
        PCI: Reset Lenovo ThinkPad P50 nvgpu at boot if necessary
        x86/PCI: Fix PCI IRQ routing table memory leak
        PCI: Remove unused pci_request_region_exclusive()
        PCI: Mark expected switch fall-throughs
      09fdd75c
    • Bjorn Helgaas's avatar
      Merge branch 'pci/msi' · 33987fd1
      Bjorn Helgaas authored
        - Remove unused mask_msi_irq(), unmask_msi_irq(), write_msi_msg(),
          __write_msi_msg() (Bjorn Helgaas)
      
      * pci/msi:
        PCI/MSI: Remove unused mask_msi_irq() and unmask_msi_irq()
        PCI/MSI: Remove unused __write_msi_msg() and write_msi_msg()
      33987fd1
    • Bjorn Helgaas's avatar
      Merge branch 'pci/hotplug' · 3ea6f739
      Bjorn Helgaas authored
        - Fix RPA and RPA DLPAR refcount issues (Tyrel Datwyler)
      
        - Stop exporting pci_get_hp_params() (Alexandru Gagniuc)
      
        - Simplify _HPP, _HPX parsing (Alexandru Gagniuc)
      
        - Add support for _HPX Type 3 settings (Alexandru Gagniuc)
      
        - Tell firmware we support _HPX Type 3 via _OSC (Alexandru Gagniuc)
      
      * pci/hotplug:
        PCI/ACPI: Advertise _HPX Type 3 support via _OSC
        PCI/ACPI: Implement _HPX Type 3 Setting Record
        PCI/ACPI: Remove the need for 'struct hotplug_params'
        PCI/ACPI: Do not export pci_get_hp_params()
        PCI: rpaphp: Get/put device node reference during slot alloc/dealloc
        PCI: rpadlpar: Fix leaked device_node references in add/remove paths
      3ea6f739
    • Bjorn Helgaas's avatar
      Merge branch 'pci/enumeration' · 178901bf
      Bjorn Helgaas authored
        - Enable PCIe services for host controller drivers that use managed host
          bridge alloc (Jean-Philippe Brucker)
      
        - Add quirk to clear PCIe Retrain Link bit to work around Pericom bridge
          erratum (Stefan Mätje)
      
        - Add "external-facing" DT property to identify cases where we require
          IOMMU protection from untrusted devices (Jean-Philippe Brucker)
      
        - Support fixed bus numbers from bridge Enhanced Allocation capabilities
          (Subbaraya Sundeep)
      
      * pci/enumeration:
        PCI: Assign bus numbers present in EA capability for bridges
        PCI: OF: Support "external-facing" property
        dt-bindings: Add "external-facing" PCIe port property
        PCI: Rework pcie_retrain_link() wait loop
        PCI: Work around Pericom PCIe-to-PCI bridge Retrain Link erratum
        PCI: Factor out pcie_retrain_link() function
        PCI: Init PCIe feature bits for managed host bridge alloc
      178901bf
    • Bjorn Helgaas's avatar
      Merge branch 'pci/aer' · 15675281
      Bjorn Helgaas authored
        - Fix pci_aer_init() stub prototype for non-CONFIG_PCIEAER case (Jisheng
          Zhang)
      
      * pci/aer:
        PCI/AER: Change pci_aer_init() stub to return void
      15675281
  2. May 13, 2019
  3. Apr 30, 2019
  4. Apr 25, 2019
    • Lyude Paul's avatar
      PCI: Reset Lenovo ThinkPad P50 nvgpu at boot if necessary · e0547c81
      Lyude Paul authored
      On ThinkPad P50 SKUs with an Nvidia Quadro M1000M instead of the M2000M
      variant, the BIOS does not always reset the secondary Nvidia GPU during
      reboot if the laptop is configured in Hybrid Graphics mode.  The reason is
      unknown, but the following steps and possibly a good bit of patience will
      reproduce the issue:
      
        1. Boot up the laptop normally in Hybrid Graphics mode
        2. Make sure nouveau is loaded and that the GPU is awake
        3. Allow the Nvidia GPU to runtime suspend itself after being idle
        4. Reboot the machine, the more sudden the better (e.g. sysrq-b may help)
        5. If nouveau loads up properly, reboot the machine again and go back to
           step 2 until you reproduce the issue
      
      This results in some very strange behavior: the GPU will be left in exactly
      the same state it was in when the previously booted kernel started the
      reboot.  This has all sorts of bad side effects: for starters, this
      completely breaks nouveau starting with a mysterious EVO channel failure
      that happens well before we've actually used the EVO channel for anything:
      
        nouveau 0000:01:00.0: disp: chid 0 mthd 0000 data 00000400 00001000 00000002
      
      This causes a timeout trying to bring up the GR ctx:
      
        nouveau 0000:01:00.0: timeout
        WARNING: CPU: 0 PID: 12 at drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf100.c:1547 gf100_grctx_generate+0x7b2/0x850 [nouveau]
        Hardware name: LENOVO 20EQS64N0B/20EQS64N0B, BIOS N1EET82W (1.55 ) 12/18/2018
        Workqueue: events_long drm_dp_mst_link_probe_work [drm_kms_helper]
        ...
        nouveau 0000:01:00.0: gr: wait for idle timeout (en: 1, ctxsw: 0, busy: 1)
        nouveau 0000:01:00.0: gr: wait for idle timeout (en: 1, ctxsw: 0, busy: 1)
        nouveau 0000:01:00.0: fifo: fault 01 [WRITE] at 0000000000008000 engine 00 [GR] client 15 [HUB/SCC_NB] reason c4 [] on channel -1 [0000000000 unknown]
      
      The GPU never manages to recover.  Booting without loading nouveau causes
      issues as well, since the GPU starts sending spurious interrupts that cause
      other device's IRQs to get disabled by the kernel:
      
        irq 16: nobody cared (try booting with the "irqpoll" option)
        ...
        handlers:
        [<000000007faa9e99>] i801_isr [i2c_i801]
        Disabling IRQ #16
        ...
        serio: RMI4 PS/2 pass-through port at rmi4-00.fn03
        i801_smbus 0000:00:1f.4: Timeout waiting for interrupt!
        i801_smbus 0000:00:1f.4: Transaction timeout
        rmi4_f03 rmi4-00.fn03: rmi_f03_pt_write: Failed to write to F03 TX register (-110).
        i801_smbus 0000:00:1f.4: Timeout waiting for interrupt!
        i801_smbus 0000:00:1f.4: Transaction timeout
        rmi4_physical rmi4-00: rmi_driver_set_irq_bits: Failed to change enabled interrupts!
      
      This causes the touchpad and sometimes other things to get disabled.
      
      Since this happens without nouveau, we can't fix this problem from nouveau
      itself.
      
      Add a PCI quirk for the specific P50 variant of this GPU.  Make sure the
      GPU is advertising NoReset- so we don't reset the GPU when the machine is
      in Dedicated graphics mode (where the GPU being initialized by the BIOS is
      normal and expected).  Map the GPU MMIO space and read the magic 0x2240c
      register, which will have bit 1 set if the device was POSTed during a
      previous boot.  Once we've confirmed all of this, reset the GPU and
      re-disable it - bringing it back to a healthy state.
      
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=203003
      Link: https://lore.kernel.org/lkml/20190212220230.1568-1-lyude@redhat.com
      
      
      Signed-off-by: default avatarLyude Paul <lyude@redhat.com>
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      Cc: nouveau@lists.freedesktop.org
      Cc: dri-devel@lists.freedesktop.org
      Cc: Karol Herbst <kherbst@redhat.com>
      Cc: Ben Skeggs <skeggsb@gmail.com>
      Cc: stable@vger.kernel.org
      e0547c81
  5. Apr 24, 2019
  6. Apr 18, 2019
  7. Apr 12, 2019
  8. Apr 11, 2019
  9. Apr 06, 2019
  10. Mar 22, 2019
  11. Mar 21, 2019
    • Gustavo A. R. Silva's avatar
      PCI: Mark expected switch fall-throughs · 296bd5ae
      Gustavo A. R. Silva authored
      
      
      In preparation to enabling -Wimplicit-fallthrough, mark switch
      cases where we are expecting to fall through.
      
      This patch fixes the following warnings:
      
        drivers/pci/proc.c: In function ‘proc_bus_pci_ioctl’:
        drivers/pci/proc.c:216:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
           if (arch_can_pci_mmap_wc()) {
              ^
        drivers/pci/proc.c:225:2: note: here
          default:
          ^~~~~~~
      
        drivers/pci/xen-pcifront.c: In function ‘pcifront_backend_changed’:
        drivers/pci/xen-pcifront.c:1105:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
           if (xdev->state == XenbusStateClosed)
              ^
        drivers/pci/xen-pcifront.c:1108:2: note: here
          case XenbusStateClosing:
          ^~~~
      
      Notice that, in this particular case, the /* fall through */
      comment is placed at the very bottom of the case statement,
      which is what GCC is expecting to find.
      
      Warning level 3 was used: -Wimplicit-fallthrough=3
      
      This patch is part of the ongoing efforts to enable
      -Wimplicit-fallthrough.
      
      Signed-off-by: default avatarGustavo A. R. Silva <gustavo@embeddedor.com>
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      296bd5ae
  12. Mar 18, 2019