- Aug 30, 2023
-
-
Bjorn Helgaas authored
- Configure controller so MHI bus master clock will be switched off while in ASPM L1.x states (Manivannan Sadhasivam) - Add sa8775p DT binding and driver support (Mrinmay Sarkar) - Fix broken DT SDX65 "compatible" property (Krzysztof Kozlowski) * pci/controller/qcom: dt-bindings: PCI: qcom: Fix SDX65 compatible PCI: qcom: Add support for sa8775p SoC dt-bindings: PCI: qcom: Add sa8775p compatible PCI: qcom-ep: Switch MHI bus master clock off during L1SS
-
Bjorn Helgaas authored
- Fix DED and SEC interrupt bit offsets so interrupt handlers work correctly (Daire McNamara) - Make driver buildable as a module (Daire McNamara) - Reorganize register #defines to align with hardware docs (Daire McNamara) - Tweak register accessors to simplify callers (Daire McNamara) - Refactor interrupt initialisation (Daire McNamara) - Read FPGA MSI configuration parameters from hardware instead of hard-coding them (Daire McNamara) - Re-partition code between probe() and init() (Daire McNamara) * pci/controller/microchip: PCI: microchip: Re-partition code between probe() and init() PCI: microchip: Gather MSI information from hardware config registers PCI: microchip: Clean up initialisation of interrupts PCI: microchip: Enable event handlers to access bridge and control pointers PCI: microchip: Align register, offset, and mask names with HW docs PCI: microchip: Enable building driver as a module PCI: microchip: Correct the DED and SEC interrupt bit offsets
-
Bjorn Helgaas authored
- Add support for link-down notification so the endpoint driver can process LINK_DOWN events (Frank Li) - Save Link Capabilities during probe so they can be restored when handling a link-up event, since the controller loses the Link Width and Link Speed values during reset (Xiaowei Bao) * pci/controller/layerscape: PCI: layerscape: Add workaround for lost link capabilities during reset PCI: layerscape: Add support for link-down notification
-
Bjorn Helgaas authored
- Use of_property_read_bool() instead of low-level accessors for boolean properties (Rob Herring) * pci/controller/iproc: PCI: iproc: Use of_property_read_bool() for boolean properties
-
Bjorn Helgaas authored
- To avoid a NULL pointer dereference, skip MSI restore after hibernate if MSI/MSI-X hasn't been enabled (Dexuan Cui) * pci/controller/hv: PCI: hv: Fix a crash in hv_pci_restore_msi_msg() during hibernation
-
Bjorn Helgaas authored
- Set the supported number of MSI vectors so we can use all available MSI interrupts (Yong-Xuan Wang) * pci/controller/fu740: PCI: fu740: Set the number of MSI vectors
-
Bjorn Helgaas authored
- Add an imx6 .host_deinit() callback so we can clean up things like regulators on probe failure or driver unload (Mark Brown) - Add PCIE_PME_TO_L2_TIMEOUT_US value for controller drivers that need to manually synchronize power removal (Frank Li) - Add generic dwc suspend/resume APIs (dw_pcie_suspend_noirq() and dw_pcie_resume_noirq()) to be called by controller driver suspend/resume ops, and a controller callback to send PME_Turn_Off (Frank Li) - Add layerscape suspend/resume support, including manual PME_Turn_off/PME_TO_Ack handshake (Hou Zhiqiang, Frank Li) * pci/controller/dwc: PCI: layerscape: Add power management support for ls1028a PCI: dwc: Implement generic suspend/resume functionality PCI: Add PCIE_PME_TO_L2_TIMEOUT_US L2 ready timeout value PCI: dwc: Provide deinit callback for i.MX
-
Bjorn Helgaas authored
- Assert PERST# when probing BCM2711 because some bootloaders don't do it (Jim Quinlan) * pci/controller/brcmstb: PCI: brcmstb: Remove stale comment PCI: brcmstb: Assert PERST# on BCM2711
-
Bjorn Helgaas authored
- Initialize pcie->nvecs (number of available MSIs) before use (Sven Peter) * pci/controller/apple: PCI: apple: Initialize pcie->nvecs before use
-
Bjorn Helgaas authored
- Ensure device is accessible before VPD access via sysfs (Alex Williamson) - Ensure device doesn't go to a low-power state while we're polling for PME (Alex Williamson) * pci/vpd: PCI: Fix runtime PM race with PME polling PCI/VPD: Add runtime power management to sysfs interface
-
Bjorn Helgaas authored
- Correct parameter types for vga_str_to_iostate() and vga_update_device_decodes() (Sui Jingfeng) - Simplify vga_arbiter_notify_clients() (Sui Jingfeng) - Simplify vga_client_register() (Sui Jingfeng) - Replace MIT license text with SPDX identifier (Sui Jingfeng) - Fix lots of comment typos (Sui Jingfeng) * pci/vga: PCI/VGA: Fix typos PCI/VGA: Replace full MIT license text with SPDX identifier PCI/VGA: Simplify vga_client_register() PCI/VGA: Simplify vga_arbiter_notify_clients() PCI/VGA: Correct vga_update_device_decodes() parameter type PCI/VGA: Correct vga_str_to_iostate() io_state parameter type
-
Bjorn Helgaas authored
- Avoid bus resets on NVIDIA T4 GPUs because they don't seem to recover (Wu Zongyong) * pci/virtualization: PCI: Mark NVIDIA T4 GPUs to avoid bus reset
-
Bjorn Helgaas authored
- Only read PCI_PM_CTRL register when available, to avoid reading the wrong register and corrupting dev->current_state (Feiyang Chen) * pci/pm: PCI/PM: Only read PCI_PM_CTRL register when available
-
Bjorn Helgaas authored
- Add locking for read/modify/write PCIe Capability Register accessors for Link Control and Root Control (Ilpo Järvinen) - Use PCIe RMW accessors for Link Control updates in PCI core, pciehp, amdgpu, radeon, mlx5, ath10k, ath11k, ath12k (Ilpo Järvinen) - Convert PCIBIOS error values in mlx5 to generic errnos (Ilpo Järvinen) - Simplify pcie_capability_clear_and_set_word() control flow (Bjorn Helgaas) * pci/pcie-rmw: PCI: Simplify pcie_capability_clear_and_set_word() control flow net/mlx5: Convert PCI error values to generic errnos PCI: Document the Capability accessor RMW improvements wifi: ath10k: Use RMW accessors for changing LNKCTL wifi: ath12k: Use RMW accessors for changing LNKCTL wifi: ath11k: Use RMW accessors for changing LNKCTL net/mlx5: Use RMW accessors for changing LNKCTL drm/radeon: Use RMW accessors for changing LNKCTL drm/amdgpu: Use RMW accessors for changing LNKCTL PCI/ASPM: Use RMW accessors for changing LNKCTL PCI: pciehp: Use RMW accessors for changing LNKCTL PCI: Make link retraining use RMW accessors for changing LNKCTL PCI: Add locking to RMW PCI Express Capability Register accessors
-
Bjorn Helgaas authored
- Make I/O resources depend on CONFIG_HAS_IOPORT so inw() and friends can be completely omitted on architectures without I/O port support (Niklas Schnelle) * pci/ioport: PCI/sysfs: Make I/O resource depend on HAS_IOPORT PCI: Make quirk using inw() depend on HAS_IOPORT
-
Bjorn Helgaas authored
- Make ibmphp read-only arrays static instead of putting them on the stack (Colin Ian King) * pci/hotplug: PCI: ibmphp: Make read-only arrays static
-
Bjorn Helgaas authored
- Remove pci_disable_pcie_error_reporting() (unused) and unexport pci_enable_pcie_error_reporting(). This all done by the PCI core now (Bjorn Helgaas) * pci/aer: PCI/AER: Unexport pci_enable_pcie_error_reporting() PCI/AER: Drop unused pci_disable_pcie_error_reporting()
-
- Aug 28, 2023
-
-
Krzysztof Kozlowski authored
Commit c0aba9f3 ("dt-bindings: PCI: qcom: Add SDX65 SoC") adding SDX65 was never tested and is clearly bogus. The qcom,sdx65-pcie-ep compatible is followed by a fallback in DTS, and there is no driver matched by this compatible. Driver matches by its fallback qcom,sdx55-pcie-ep. This also fixes dtbs_check warnings like: qcom-sdx65-mtp.dtb: pcie-ep@1c00000: compatible: ['qcom,sdx65-pcie-ep', 'qcom,sdx55-pcie-ep'] is too long [kwilczynski: commit log] Fixes: c0aba9f3 ("dt-bindings: PCI: qcom: Add SDX65 SoC") Link: https://lore.kernel.org/linux-pci/20230827085351.21932-1-krzysztof.kozlowski@linaro.org Signed-off-by:
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by:
Krzysztof Wilczyński <kwilczynski@kernel.org> Acked-by:
Conor Dooley <conor.dooley@microchip.com> Cc: stable@vger.kernel.org
-
- Aug 26, 2023
-
-
Feiyang Chen authored
For a device with no Power Management Capability, pci_power_up() previously returned 0 (success) if the platform was able to put the device in D0, which led to pci_set_full_power_state() trying to read PCI_PM_CTRL, even though it doesn't exist. Since dev->pm_cap == 0 in this case, pci_set_full_power_state() actually read the wrong register, interpreted it as PCI_PM_CTRL, and corrupted dev->current_state. This led to messages like this in some cases: pci 0000:01:00.0: Refused to change power state from D3hot to D0 To prevent this, make pci_power_up() always return a negative failure code if the device lacks a Power Management Capability, even if non-PCI platform power management has been able to put the device in D0. The failure will prevent pci_set_full_power_state() from trying to access PCI_PM_CTRL. Fixes: e200904b ("PCI/PM: Split pci_power_up()") Link: https://lore.kernel.org/r/20230824013738.1894965-1-chenfeiyang@loongson.cn Signed-off-by:
Feiyang Chen <chenfeiyang@loongson.cn> Signed-off-by:
Bjorn Helgaas <bhelgaas@google.com> Reviewed-by:
"Rafael J. Wysocki" <rafael@kernel.org> Cc: stable@vger.kernel.org # v5.19+
-
Mrinmay Sarkar authored
Add support for sa8775p SoC that uses controller version 5.90 reusing the 1.9.0 config. Link: https://lore.kernel.org/linux-pci/1689960276-29266-3-git-send-email-quic_msarkar@quicinc.com Signed-off-by:
Mrinmay Sarkar <quic_msarkar@quicinc.com> Signed-off-by:
Krzysztof Wilczyński <kwilczynski@kernel.org> Reviewed-by:
Bjorn Andersson <andersson@kernel.org> Reviewed-by:
Manivannan Sadhasivam <mani@kernel.org>
-
Mrinmay Sarkar authored
Add sa8775p platform to the binding. Link: https://lore.kernel.org/linux-pci/1689960276-29266-2-git-send-email-quic_msarkar@quicinc.com Signed-off-by:
Mrinmay Sarkar <quic_msarkar@quicinc.com> Signed-off-by:
Krzysztof Wilczyński <kwilczynski@kernel.org> Reviewed-by:
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Acked-by:
Manivannan Sadhasivam <mani@kernel.org>
-
- Aug 25, 2023
-
-
Bjorn Helgaas authored
Return early for errors in pcie_capability_clear_and_set_word_unlocked() and pcie_capability_clear_and_set_dword() to simplify the control flow. No functional change intended. Link: https://lore.kernel.org/r/20230824193712.542167-13-helgaas@kernel.org Signed-off-by:
Bjorn Helgaas <bhelgaas@google.com> Reviewed-by:
Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
-
Sui Jingfeng authored
Fix typos, rewrap to fill 78 columns, convert to conventional multi-line style. [bhelgaas: squash and add more fixes] Link: https://lore.kernel.org/r/20230808223412.1743176-7-sui.jingfeng@linux.dev Link: https://lore.kernel.org/r/20230808223412.1743176-9-sui.jingfeng@linux.dev Link: https://lore.kernel.org/r/20230808223412.1743176-10-sui.jingfeng@linux.dev Link: https://lore.kernel.org/r/20230808223412.1743176-11-sui.jingfeng@linux.dev Signed-off-by:
Sui Jingfeng <suijingfeng@loongson.cn> Signed-off-by:
Bjorn Helgaas <bhelgaas@google.com>
-
- Aug 24, 2023
-
-
Jim Quinlan authored
A comment says that Multi-MSI is not supported by the driver. A past commit [1] added this feature, so the comment is incorrect and is removed. [1] commit 198acab1 ("PCI: brcmstb: Enable Multi-MSI") Link: https://lore.kernel.org/r/20230623144100.34196-6-james.quinlan@broadcom.com Signed-off-by:
Jim Quinlan <james.quinlan@broadcom.com> Signed-off-by:
Lorenzo Pieralisi <lpieralisi@kernel.org> Acked-by:
Florian Fainelli <f.fainelli@gmail.com>
-
Jim Quinlan authored
The current PCIe driver assumes PERST# is asserted when probe() is invoked. Some older versions of the 2711/RPi bootloader left PERST# unasserted, as the Raspian OS does assert PERST# on probe(). For this reason, we assert PERST# for BCM2711 SOCs (i.e. RPi). Link: https://lore.kernel.org/r/20230623144100.34196-5-james.quinlan@broadcom.com Signed-off-by:
Jim Quinlan <james.quinlan@broadcom.com> Signed-off-by:
Lorenzo Pieralisi <lpieralisi@kernel.org>
-
Hou Zhiqiang authored
Add PME_Turn_off/PME_TO_Ack handshake sequence for ls1028a platform. Implemented on top of common dwc dw_pcie_suspend(resume)_noirq() functions to handle system enter/exit suspend states. Link: https://lore.kernel.org/r/20230821184815.2167131-4-Frank.Li@nxp.com Signed-off-by:
Hou Zhiqiang <Zhiqiang.Hou@nxp.com> Signed-off-by:
Frank Li <Frank.Li@nxp.com> Signed-off-by:
Lorenzo Pieralisi <lpieralisi@kernel.org> Acked-by:
Manivannan Sadhasivam <mani@kernel.org>
-
Frank Li authored
Introduce an helper function (dw_pcie_get_ltssm()) to retrieve SMLH_LTSS_STATE. Add common dw_pcie_suspend(resume)_noirq() API to implement the DWC controller generic suspend/resume functionality. Add a controller specific callback to send the PME_Turn_Off message (ie .pme_turn_off) for controller platform specific PME handling. Link: https://lore.kernel.org/r/20230821184815.2167131-3-Frank.Li@nxp.com Signed-off-by:
Frank Li <Frank.Li@nxp.com> [lpieralisi@kernel.org: commit log] Signed-off-by:
Lorenzo Pieralisi <lpieralisi@kernel.org> Acked-by:
Manivannan Sadhasivam <mani@kernel.org>
-
Frank Li authored
Add the PCIE_PME_TO_L2_TIMEOUT_US macro to define the L2 ready timeout as described in the PCI specifications. Link: https://lore.kernel.org/r/20230821184815.2167131-2-Frank.Li@nxp.com Signed-off-by:
Frank Li <Frank.Li@nxp.com> Signed-off-by:
Lorenzo Pieralisi <lpieralisi@kernel.org> Acked-by:
Manivannan Sadhasivam <mani@kernel.org>
-
Xiaowei Bao authored
The endpoint controller loses the Maximum Link Width and Supported Link Speed value from the Link Capabilities Register - initially configured by the Reset Configuration Word (RCW) - during a link-down or hot reset event. Address this issue in the endpoint event handler. Link: https://lore.kernel.org/r/20230720135834.1977616-2-Frank.Li@nxp.com Fixes: a805770d ("PCI: layerscape: Add EP mode support") Signed-off-by:
Xiaowei Bao <xiaowei.bao@nxp.com> Signed-off-by:
Hou Zhiqiang <Zhiqiang.Hou@nxp.com> Signed-off-by:
Frank Li <Frank.Li@nxp.com> Signed-off-by:
Lorenzo Pieralisi <lpieralisi@kernel.org> Acked-by:
Manivannan Sadhasivam <mani@kernel.org>
-
Frank Li authored
Add support to pass link-down notification to the endpoint function driver so that it can process the LINK_DOWN event. Link: https://lore.kernel.org/r/20230720135834.1977616-1-Frank.Li@nxp.com Signed-off-by:
Frank Li <Frank.Li@nxp.com> Signed-off-by:
Lorenzo Pieralisi <lpieralisi@kernel.org> Acked-by:
Manivannan Sadhasivam <mani@kernel.org>
-
Sui Jingfeng authored
Per Documentation/process/license-rules.rst, the SPDX MIT identifier is equivalent to including the entire MIT license text from LICENSES/preferred/MIT. Replace the MIT license text with the equivalent SPDX identifier. Link: https://lore.kernel.org/r/20230808223412.1743176-12-sui.jingfeng@linux.dev Signed-off-by:
Sui Jingfeng <suijingfeng@loongson.cn> Signed-off-by:
Bjorn Helgaas <bhelgaas@google.com> Reviewed-by:
Andi Shyti <andi.shyti@linux.intel.com>
-
Sui Jingfeng authored
Reorganize vga_client_register() to avoid the goto and the need to save the return value. Update the kernel-doc to reflect -ENODEV on failure. No functional change intended. [bhelgaas: drop "ret" variable, commit log] Link: https://lore.kernel.org/r/20230808223412.1743176-8-sui.jingfeng@linux.dev Signed-off-by:
Sui Jingfeng <suijingfeng@loongson.cn> Signed-off-by:
Bjorn Helgaas <bhelgaas@google.com>
-
Sui Jingfeng authored
In vga_arbiter_notify_clients(), "new_state" was computed during every loop iteration even though it doesn't depend on anything that changes during the loop. Move the computation outside the loop. [bhelgaas: drop renames that obscure the purpose, commit log] Link: https://lore.kernel.org/r/20230808223412.1743176-6-sui.jingfeng@linux.dev Signed-off-by:
Sui Jingfeng <suijingfeng@loongson.cn> Signed-off-by:
Bjorn Helgaas <bhelgaas@google.com>
-
Sui Jingfeng authored
Previously vga_update_device_decodes() took "int new_decodes", but the callers pass "unsigned int new_decodes". Correct the vga_update_device_decodes() parameter type to "unsigned int" to match. In vga_arbiter_notify_clients(), the return from vgadev->set_decode() is "unsigned int" but was stored as "uint32_t new_decodes". Correct the new_decodes type to "unsigned int". [bhelgaas: use correct type for ->set_decode() return, commit log] Link: https://lore.kernel.org/r/20230808223412.1743176-5-sui.jingfeng@linux.dev Signed-off-by:
Sui Jingfeng <suijingfeng@loongson.cn> Signed-off-by:
Bjorn Helgaas <bhelgaas@google.com>
-
Sui Jingfeng authored
Previously vga_str_to_iostate() took "int *io_state", but vga_arb_write() is the only caller and it passes "unsigned int *". Make the vga_str_to_iostate() parameter type "unsigned int *" to match. [bhelgaas: commit log] Link: https://lore.kernel.org/r/20230808223412.1743176-2-sui.jingfeng@linux.dev Signed-off-by:
Sui Jingfeng <suijingfeng@loongson.cn> Signed-off-by:
Bjorn Helgaas <bhelgaas@google.com> Reviewed-by:
Andi Shyti <andi.shyti@linux.intel.com> Reviewed-by:
Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
-
- Aug 23, 2023
-
-
Yong-Xuan Wang authored
The iMSI-RX module of the DW PCIe controller provides multiple sets of MSI_CTRL_INT_i_* registers, and each set is capable of handling 32 MSI interrupts. However, the fu740 PCIe controller driver only enabled one set of MSI_CTRL_INT_i_* registers, as the total number of supported interrupts was not specified. Set the supported number of MSI vectors to enable all the MSI_CTRL_INT_i_* registers on the fu740 PCIe core, allowing the system to fully utilize the available MSI interrupts. Link: https://lore.kernel.org/r/20230807055621.2431-1-yongxuan.wang@sifive.com Signed-off-by:
Yong-Xuan Wang <yongxuan.wang@sifive.com> Signed-off-by:
Lorenzo Pieralisi <lpieralisi@kernel.org> Reviewed-by:
Serge Semin <fancer.lancer@gmail.com>
-
- Aug 22, 2023
-
-
Dexuan Cui authored
When a Linux VM with an assigned PCI device runs on Hyper-V, if the PCI device driver is not loaded yet (i.e. MSI-X/MSI is not enabled on the device yet), doing a VM hibernation triggers a panic in hv_pci_restore_msi_msg() -> msi_lock_descs(&pdev->dev), because pdev->dev.msi.data is still NULL. Avoid the panic by checking if MSI-X/MSI is enabled. Link: https://lore.kernel.org/r/20230816175939.21566-1-decui@microsoft.com Fixes: dc2b4532 ("PCI: hv: Rework MSI handling") Signed-off-by:
Dexuan Cui <decui@microsoft.com> Signed-off-by:
Lorenzo Pieralisi <lpieralisi@kernel.org> Reviewed-by:
<sathyanarayanan.kuppuswamy@linux.intel.com> Reviewed-by:
Michael Kelley <mikelley@microsoft.com> Cc: stable@vger.kernel.org
-
Ilpo Järvinen authored
mlx5_pci_link_toggle() returns a mix of PCI-specific error codes and generic errnos. Convert the PCI-specific error values to generic errno using pcibios_err_to_errno() before returning them. Fixes: eabe8e5e ("net/mlx5: Handle sync reset now event") Fixes: 212b4d72 ("net/mlx5: Wait for firmware to enable CRS before pci_restore_state") Link: https://lore.kernel.org/r/20230814132721.26608-1-ilpo.jarvinen@linux.intel.com Signed-off-by:
Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> [bhelgaas: rebase to pci/pcie-rmw, also convert in mlx5_check_dev_ids()] Signed-off-by:
Bjorn Helgaas <bhelgaas@google.com>
-
Ilpo Järvinen authored
Documentation claims port service drivers should play nice with respect to PCIe Capability changes, but the concurrency control is now provided in the Capability accessors as long as the correct ones are used. Update the documention to match the RMW accessor behavior. Link: https://lore.kernel.org/r/20230717120503.15276-12-ilpo.jarvinen@linux.intel.com Signed-off-by:
Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by:
Bjorn Helgaas <bhelgaas@google.com>
-
Ilpo Järvinen authored
Don't assume that only the driver would be accessing LNKCTL. ASPM policy changes can trigger write to LNKCTL outside of driver's control. Use RMW capability accessors which does proper locking to avoid losing concurrent updates to the register value. On restore, clear the ASPMC field properly. Suggested-by:
Lukas Wunner <lukas@wunner.de> Fixes: 76d870ed ("ath10k: enable ASPM") Link: https://lore.kernel.org/r/20230717120503.15276-11-ilpo.jarvinen@linux.intel.com Signed-off-by:
Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by:
Bjorn Helgaas <bhelgaas@google.com> Reviewed-by:
Simon Horman <simon.horman@corigine.com> Acked-by:
Kalle Valo <kvalo@kernel.org>
-