1. 22 4月, 2017 1 次提交
  2. 21 4月, 2017 2 次提交
  3. 12 4月, 2017 1 次提交
    • S
      PCI: rockchip: Set PCI_EXP_LNKSTA_SLC in the Root Port · 64d6ea60
      Shawn Lin 提交于
      All platforms using Rockchip use a common clock for the Root Port and the
      slot connected to it. Indicate this by setting the Slot Clock Configuration
      (PCI_EXP_LNKSTA_SLC) bit in the Root Port's Link Status.
      
      Per the Implementation Note in the spec (PCIe r3.1, sec 7.8.7), if the
      downstream component also sets PCI_EXP_LNKSTA_SLC, software may set the
      Common Clock Configuration (PCI_EXP_LNKCTL_CCC) bits on both ends of the
      Link. This is done by pcie_aspm_configure_common_clock().
      Signed-off-by: NShawn Lin <shawn.lin@rock-chips.com>
      Cc: Brian Norris <briannorris@chromium.org>
      Cc: jeffy.chen <jeffy.chen@rock-chips.com>
      64d6ea60
  4. 04 4月, 2017 1 次提交
  5. 24 3月, 2017 3 次提交
  6. 02 3月, 2017 2 次提交
  7. 01 3月, 2017 1 次提交
  8. 28 2月, 2017 1 次提交
  9. 25 2月, 2017 1 次提交
    • G
      PCI: dwc: Fix crashes seen due to missing assignments · c0464062
      Guenter Roeck 提交于
      Fix the following crash, seen in dwc/pci-imx6.
      
        Unable to handle kernel NULL pointer dereference at virtual address 00000070
        pgd = c0004000
        [00000070] *pgd=00000000
        Internal error: Oops: 805 [#1] SMP ARM
        Modules linked in:
        CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.10.0-09686-g9e314890 #1
        Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
        task: cb850000 task.stack: cb84e000
        PC is at imx6_pcie_probe+0x2f4/0x414
        ...
      
      While at it, fix the same problem in various drivers instead of waiting for
      individual crash reports.
      
      The change in the imx6 driver was tested with qemu. The changes in other
      drivers are based on code inspection and have been compile tested only.
      
      Fixes: 442ec4c0 ("PCI: dwc: all: Split struct pcie_port into host-only and core structures")
      Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: Vivek Gautam <vivek.gautam@codeaurora.org>  # designware-plat
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Acked-by: NKishon Vijay Abraham I <kishon@ti.com>
      c0464062
  10. 22 2月, 2017 16 次提交
  11. 21 2月, 2017 1 次提交
  12. 18 2月, 2017 5 次提交
  13. 17 2月, 2017 3 次提交
    • G
      pci/hotplug/pnv-php: Disable MSI and PCI device properly · 49f4b08e
      Gavin Shan 提交于
      pnv_php_disable_irq() can be called in two paths: Bailing path in
      pnv_php_enable_irq() or releasing slot. The MSI (or MSIx) interrupts
      is disabled unconditionally in pnv_php_disable_irq(). It's wrong
      because that might be enabled by drivers other than pnv-php.
      
      This disables MSI (or MSIx) interrupts and the PCI device only if
      it was enabled by pnv-php. In the error path of pnv_php_enable_irq(),
      we rely on the newly added parameter @disable_device. In the path
      of releasing slot, @pnv_php->irq is checked.
      
      Cc: <stable@vger.kernel.org> # v4.9+
      Fixes: 360aebd8 ("drivers/pci/hotplug: Support surprise hotplug in powernv driver")
      Signed-off-by: NGavin Shan <gwshan@linux.vnet.ibm.com>
      Reviewed-by: NAndrew Donnellan <andrew.donnellan@au1.ibm.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      49f4b08e
    • G
      pci/hotplug/pnv-php: Disable surprise hotplug capability on conflicts · 303529d6
      Gavin Shan 提交于
      The root port or PCIe switch downstream port might have been associated
      with driver other than pnv-php. The MSI or MSIx might also have been
      enabled by that driver (e.g. pcieport_drv). Attempt to enable MSI incurs
      below backtrace:
      
       PowerPC PowerNV PCI Hotplug Driver version: 0.1
       ------------[ cut here ]------------
       WARNING: CPU: 19 PID: 1004 at drivers/pci/msi.c:1071 \
                                    __pci_enable_msi_range+0x84/0x4e0
       NIP [c000000000665c34] __pci_enable_msi_range+0x84/0x4e0
       LR [c000000000665c24] __pci_enable_msi_range+0x74/0x4e0
       Call Trace:
       [c000000384d67600] [c000000000665c24] __pci_enable_msi_range+0x74/0x4e0
       [c000000384d676e0] [d00000000aa31b04] pnv_php_register+0x564/0x5a0 [pnv_php]
       [c000000384d677c0] [d00000000aa31658] pnv_php_register+0xb8/0x5a0 [pnv_php]
       [c000000384d678a0] [d00000000aa31658] pnv_php_register+0xb8/0x5a0 [pnv_php]
       [c000000384d67980] [d00000000aa31dfc] pnv_php_init+0x60/0x98 [pnv_php]
       [c000000384d679f0] [c00000000000cfdc] do_one_initcall+0x6c/0x1d0
       [c000000384d67ab0] [c000000000b92354] do_init_module+0x94/0x254
       [c000000384d67b40] [c00000000019719c] load_module+0x258c/0x2c60
       [c000000384d67d30] [c000000000197bb0] SyS_finit_module+0xf0/0x170
       [c000000384d67e30] [c00000000000b184] system_call+0x38/0xe0
      
      This fixes the issue by skipping enabling the surprise hotplug
      capability if the MSI or MSIx on the PCI slot's upstream port has
      been enabled by other driver.
      
      Cc: <stable@vger.kernel.org> # v4.9+
      Fixes: 360aebd8 ("drivers/pci/hotplug: Support surprise hotplug in powernv driver")
      Signed-off-by: NGavin Shan <gwshan@linux.vnet.ibm.com>
      Reviewed-by: NAndrew Donnellan <andrew.donnellan@au1.ibm.com>
      Tested-by: NVaibhav Jain <vaibhav@linux.vnet.ibm.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      303529d6
    • G
      pci/hotplug/pnv-php: Remove WARN_ON() in pnv_php_put_slot() · 36c7c9da
      Gavin Shan 提交于
      The WARN_ON() causes unnecessary backtrace when putting the parent
      slot, which is likely to be NULL.
      
       WARNING: CPU: 2 PID: 1071 at drivers/pci/hotplug/pnv_php.c:85 \
                                    pnv_php_release+0xcc/0x150 [pnv_php]
          :
       Call Trace:
       [c0000003bc007c10] [d00000000ad613c4] pnv_php_release+0x144/0x150 [pnv_php]
       [c0000003bc007c40] [c0000000006641d8] pci_hp_deregister+0x238/0x330
       [c0000003bc007cd0] [d00000000ad61440] pnv_php_unregister_one+0x70/0xa0 [pnv_php]
       [c0000003bc007d10] [d00000000ad614c0] pnv_php_unregister+0x50/0x80 [pnv_php]
       [c0000003bc007d40] [d00000000ad61e84] pnv_php_exit+0x50/0xcb4 [pnv_php]
       [c0000003bc007d70] [c00000000019499c] SyS_delete_module+0x1fc/0x2a0
       [c0000003bc007e30] [c00000000000b184] system_call+0x38/0xe0
      
      Cc: <stable@vger.kernel.org> # v4.8+
      Fixes: 66725152 ("PCI/hotplug: PowerPC PowerNV PCI hotplug driver")
      Signed-off-by: NGavin Shan <gwshan@linux.vnet.ibm.com>
      Reviewed-by: NAndrew Donnellan <andrew.donnellan@au1.ibm.com>
      Tested-by: NVaibhav Jain <vaibhav@linux.vnet.ibm.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      36c7c9da
  14. 16 2月, 2017 1 次提交
  15. 15 2月, 2017 1 次提交
    • Y
      PCI/PME: Restore pcie_pme_driver.remove · afe3e4d1
      Yinghai Lu 提交于
      In addition to making PME non-modular, d7def204 ("PCI/PME: Make
      explicitly non-modular") removed the pcie_pme_driver .remove() method,
      pcie_pme_remove().
      
      pcie_pme_remove() freed the PME IRQ that was requested in pci_pme_probe().
      The fact that we don't free the IRQ after d7def204 causes the following
      crash when removing a PCIe port device via /sys:
      
        ------------[ cut here ]------------
        kernel BUG at drivers/pci/msi.c:370!
        invalid opcode: 0000 [#1] SMP
        Modules linked in:
        CPU: 1 PID: 14509 Comm: sh Tainted: G    W  4.8.0-rc1-yh-00012-gd29438d6
        RIP: 0010:[<ffffffff9758bbf5>]  free_msi_irqs+0x65/0x190
        ...
        Call Trace:
         [<ffffffff9758cda4>] pci_disable_msi+0x34/0x40
         [<ffffffff97583817>] cleanup_service_irqs+0x27/0x30
         [<ffffffff97583e9a>] pcie_port_device_remove+0x2a/0x40
         [<ffffffff97584250>] pcie_portdrv_remove+0x40/0x50
         [<ffffffff97576d7b>] pci_device_remove+0x4b/0xc0
         [<ffffffff9785ebe6>] __device_release_driver+0xb6/0x150
         [<ffffffff9785eca5>] device_release_driver+0x25/0x40
         [<ffffffff975702e4>] pci_stop_bus_device+0x74/0xa0
         [<ffffffff975704ea>] pci_stop_and_remove_bus_device_locked+0x1a/0x30
         [<ffffffff97578810>] remove_store+0x50/0x70
         [<ffffffff9785a378>] dev_attr_store+0x18/0x30
         [<ffffffff97260b64>] sysfs_kf_write+0x44/0x60
         [<ffffffff9725feae>] kernfs_fop_write+0x10e/0x190
         [<ffffffff971e13f8>] __vfs_write+0x28/0x110
         [<ffffffff970b0fa4>] ? percpu_down_read+0x44/0x80
         [<ffffffff971e53a7>] ? __sb_start_write+0xa7/0xe0
         [<ffffffff971e53a7>] ? __sb_start_write+0xa7/0xe0
         [<ffffffff971e1f04>] vfs_write+0xc4/0x180
         [<ffffffff971e3089>] SyS_write+0x49/0xa0
         [<ffffffff97001a46>] do_syscall_64+0xa6/0x1b0
         [<ffffffff9819201e>] entry_SYSCALL64_slow_path+0x25/0x25
        ...
         RIP  [<ffffffff9758bbf5>] free_msi_irqs+0x65/0x190
         RSP <ffff89ad3085bc48>
        ---[ end trace f4505e1dac5b95d3 ]---
        Segmentation fault
      
      Restore pcie_pme_remove().
      
      [bhelgaas: changelog]
      Fixes: d7def204 ("PCI/PME: Make explicitly non-modular")
      Signed-off-by: NYinghai Lu <yinghai@kernel.org>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Acked-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      CC: stable@vger.kernel.org	# v4.9+
      afe3e4d1