Re: [PATCH v6 0/4] PCI: Add support for resetting the Root Ports in a platform specific way

2025-08-29 Thread Manivannan Sadhasivam
On Fri, Aug 15, 2025 at 11:07:42AM GMT, Niklas Cassel wrote: > Hello Mani, > > Sorry for the delayed reply. > I just came back from vacation. > > On Thu, Jul 24, 2025 at 11:00:05AM +0530, Manivannan Sadhasivam wrote: > > On Fri, Jul 18, 2025 at 12:39:50PM GMT, Niklas Ca

Re: [PATCH v6 0/4] PCI: Add support for resetting the Root Ports in a platform specific way

2025-08-29 Thread Manivannan Sadhasivam
On Thu, Aug 28, 2025 at 01:01:51PM GMT, Brian Norris wrote: > On Tue, Jul 15, 2025 at 07:51:03PM +0530, Manivannan Sadhasivam via B4 Relay > wrote: > > Hi, > > > > Currently, in the event of AER/DPC, PCI core will try to reset the slot > > (Root > > Port) and

Re: [PATCH v6 0/4] PCI: Add support for resetting the Root Ports in a platform specific way

2025-07-23 Thread Manivannan Sadhasivam
On Fri, Jul 18, 2025 at 12:39:50PM GMT, Niklas Cassel wrote: > On Fri, Jul 18, 2025 at 12:28:44PM +0200, Niklas Cassel wrote: > > On Tue, Jul 15, 2025 at 07:51:03PM +0530, Manivannan Sadhasivam via B4 > > Relay wrote: > > 2) Testing link down reset: > > > >

[PATCH v6 3/4] PCI: qcom: Add support for resetting the Root Port due to link down event

2025-07-15 Thread Manivannan Sadhasivam via B4 Relay
From: Manivannan Sadhasivam The PCIe link can go down under circumstances such as the device firmware crash, link instability, etc... When that happens, the PCIe Root Port needs to be reset to make it operational again. Currently, the driver is not handling the link down event, due to which the

[PATCH v6 0/4] PCI: Add support for resetting the Root Ports in a platform specific way

2025-07-15 Thread Manivannan Sadhasivam via B4 Relay
alling reset_slot() callback from pcie_do_recovery() to pcibios_reset_secondary_bus() - Link to v1: https://lore.kernel.org/r/20250404-pcie-reset-slot-v1-0-98952918b...@linaro.org Signed-off-by: Manivannan Sadhasivam --- Manivannan Sadhasivam (3): PCI/ERR: Add support for resetting the R

[PATCH v6 2/4] PCI: host-common: Add link down handling for Root Ports

2025-07-15 Thread Manivannan Sadhasivam via B4 Relay
From: Manivannan Sadhasivam The PCI link, when down, needs to be recovered to bring it back. But on some platforms, that cannot be done in a generic way as link recovery procedure is platform specific. So add a new API pci_host_handle_link_down() that could be called by the host bridge drivers

[PATCH v6 4/4] PCI: dw-rockchip: Add support to reset Root Port upon link down event

2025-07-15 Thread Manivannan Sadhasivam via B4 Relay
Mallawa [mani: rebased on top of the new version of reset_root_port series] Signed-off-by: Manivannan Sadhasivam --- drivers/pci/controller/dwc/Kconfig| 1 + drivers/pci/controller/dwc/pcie-dw-rockchip.c | 91 ++- 2 files changed, 90 insertions(+), 2 deletions

[PATCH v6 1/4] PCI/ERR: Add support for resetting the Root Ports in a platform specific way

2025-07-15 Thread Manivannan Sadhasivam via B4 Relay
From: Manivannan Sadhasivam Some host bridge devices require resetting the Root Ports in a platform specific way to recover them from error conditions such as Fatal AER errors, Link Down etc... So introduce pci_host_bridge::reset_root_port() callback and call it from pcibios_reset_secondary_bus

Re: [PATCH v5 1/4] PCI/ERR: Add support for resetting the Root Ports in a platform specific way

2025-07-15 Thread Manivannan Sadhasivam
On Tue, Jul 15, 2025 at 10:16:27AM GMT, Lukas Wunner wrote: > On Tue, Jul 15, 2025 at 01:29:18PM +0530, Manivannan Sadhasivam wrote: > > --- a/drivers/pci/pci.c > > +++ b/drivers/pci/pci.c > > @@ -4964,7 +4964,19 @@ void pci_reset_secondary_bus(struct pci_dev *dev) &

[PATCH v5 2/4] PCI: host-common: Add link down handling for Root Ports

2025-07-15 Thread Manivannan Sadhasivam
From: Manivannan Sadhasivam The PCI link, when down, needs to be recovered to bring it back. But on some platforms, that cannot be done in a generic way as link recovery procedure is platform specific. So add a new API pci_host_handle_link_down() that could be called by the host bridge drivers

[PATCH v5 4/4] PCI: dw-rockchip: Add support to reset Root Port upon link down event

2025-07-15 Thread Manivannan Sadhasivam
Mallawa [mani: rebased on top of the new version of reset_root_port series] Signed-off-by: Manivannan Sadhasivam --- drivers/pci/controller/dwc/Kconfig| 1 + drivers/pci/controller/dwc/pcie-dw-rockchip.c | 91 ++- 2 files changed, 90 insertions(+), 2 deletions

[PATCH v5 1/4] PCI/ERR: Add support for resetting the Root Ports in a platform specific way

2025-07-15 Thread Manivannan Sadhasivam
From: Manivannan Sadhasivam Some host bridge devices require resetting the Root Ports in a platform specific way to recover them from error conditions such as Fatal AER errors, Link Down etc... So introduce pci_host_bridge::reset_root_port callback and call it from pcibios_reset_secondary_bus

[PATCH v5 0/4] PCI: Add support for resetting the Root Ports in a platform specific way

2025-07-15 Thread Manivannan Sadhasivam
-pcie-reset-slot-v2-0-efe76b278...@linaro.org Changes in v2: - Moved calling reset_slot() callback from pcie_do_recovery() to pcibios_reset_secondary_bus() - Link to v1: https://lore.kernel.org/r/20250404-pcie-reset-slot-v1-0-98952918b...@linaro.org Signed-off-by: Manivannan Sadhasivam --- Maniva

Re: [PATCH v4 4/5] PCI: host-common: Add link down handling for host bridges

2025-07-09 Thread Manivannan Sadhasivam
On Mon, Jul 07, 2025 at 01:29:22PM GMT, Niklas Cassel wrote: > + Mani's kernel.org email. > > On Mon, Jul 07, 2025 at 01:05:39PM +0200, Niklas Cassel wrote: > > Hello Mani, > > > > On Fri, May 30, 2025 at 09:39:28PM +0530, Manivannan Sadhasivam wrote: > >

Re: [PATCH v2] PCI/AER: Use pci_clear_and_set_config_dword() to simplify mask updates

2025-06-19 Thread Manivannan Sadhasivam
ure atomicity. It just provides a helper to avoid code duplication for RMW kind of operations. Nothing guarantees the function to be atomic. > Signed-off-by: Hans Zhang <18255117...@163.com> But the change LGTM. With the above wording corrected, Acked-by: Manivannan Sadhasivam - Ma

Re: [PATCH 2/2] PCI/AER: Use bool for AER disable state tracking

2025-06-13 Thread Manivannan Sadhasivam
On Sat, May 17, 2025 at 12:52:23AM +0800, Hans Zhang wrote: > From: Hans Zhang > > Change pcie_aer_disable variable to bool and update pci_no_aer() > to set it to true. Improves code readability and aligns with modern > kernel practices. > > Signed-off-by: Hans Zhang Applied to pci/misc! - Ma

Re: [PATCH v4 3/3] PCI/AER: Report fatal errors of RCiEP and EP if link recoverd

2025-06-12 Thread Manivannan Sadhasivam
On Sun, Mar 02, 2025 at 07:43:41PM -0800, Sathyanarayanan Kuppuswamy wrote: > > On 2/16/25 6:42 PM, Shuai Xue wrote: > > The AER driver has historically avoided reading the configuration space of > > an endpoint or RCiEP that reported a fatal error, considering the link to > > that device unreliab

Re: [PATCH v4 2/3] PCI/DPC: Run recovery on device that detected the error

2025-06-12 Thread Manivannan Sadhasivam
On Mon, Feb 17, 2025 at 10:42:17AM +0800, Shuai Xue wrote: > The current implementation of pcie_do_recovery() assumes that the > recovery process is executed on the device that detected the error. s/on/for > However, the DPC driver currently passes the error port that experienced > the DPC event

Re: [PATCH] AER: PCIE CTO recovery handle fix

2025-06-11 Thread Manivannan Sadhasivam
On Tue, Mar 04, 2025 at 07:07:05AM +, 孙利斌_Dio wrote: > [EXTERNAL EMAIL] > > From 5fc7b1a9e0f0bcfa14068c6358019ed1e3ffc6c6 Mon Sep 17 00:00:00 2001 > From: "dio.sun" > Date: Wed, 26 Feb 2025 08:54:49 + > Subject: [PATCH] AER: PCIE CTO recovery handle fix > Looks like you forwarded this p

Re: [PATCH v4 4/5] PCI: host-common: Add link down handling for host bridges

2025-05-30 Thread Manivannan Sadhasivam
On Fri, May 30, 2025 at 06:34:04AM -0500, Bjorn Helgaas wrote: > On Fri, May 30, 2025 at 09:16:59AM +0530, Manivannan Sadhasivam wrote: > > On Wed, May 28, 2025 at 05:35:00PM -0500, Bjorn Helgaas wrote: > > > On Thu, May 08, 2025 at 12:40:33PM +0530, Manivannan Sadhasivam wrot

Re: [PATCH v4 4/5] PCI: host-common: Add link down handling for host bridges

2025-05-29 Thread Manivannan Sadhasivam
On Wed, May 28, 2025 at 05:35:00PM -0500, Bjorn Helgaas wrote: > On Thu, May 08, 2025 at 12:40:33PM +0530, Manivannan Sadhasivam wrote: > > The PCI link, when down, needs to be recovered to bring it back. But that > > cannot be done in a generic way as link recovery procedure

Re: [PATCH 0/4] pci: implement "pci=aer_panic"

2025-05-22 Thread Manivannan Sadhasivam
On Sat, May 17, 2025 at 12:55:14AM +0800, Hans Zhang wrote: > The following series introduces a new kernel command-line option aer_panic > to enhance error handling for PCIe Advanced Error Reporting (AER) in > mission-critical environments. This feature ensures deterministic recover > from fatal PC

Re: [PATCH v4 5/5] PCI: qcom: Add support for resetting the slot due to link down event

2025-05-14 Thread Manivannan Sadhasivam
On Wed, May 14, 2025 at 11:52:13AM +0530, Krishna Chaitanya Chundru wrote: > > > On 5/8/2025 12:40 PM, Manivannan Sadhasivam wrote: > > The PCIe link can go down under circumstances such as the device firmware > > crash, link instability, etc... When that happens, the PCIe

Re: [PATCH v4 4/5] PCI: host-common: Add link down handling for host bridges

2025-05-14 Thread Manivannan Sadhasivam
On Wed, May 14, 2025 at 12:00:11PM +0530, Krishna Chaitanya Chundru wrote: > > > On 5/8/2025 12:40 PM, Manivannan Sadhasivam wrote: > > The PCI link, when down, needs to be recovered to bring it back. But that > > cannot be done in a generic way as link recovery procedure is

Re: [PATCH v4 0/5] PCI: Add support for resetting the slots in a platform specific way

2025-05-14 Thread Manivannan Sadhasivam
On Thu, 08 May 2025 12:40:29 +0530, Manivannan Sadhasivam wrote: > Currently, in the event of AER/DPC, PCI core will try to reset the slot and > its > subordinate devices by invoking bridge control reset and FLR. But in some > cases like AER Fatal error, it might be necessary to res

Re: [PATCH v4 1/5] PCI/ERR: Remove misleading TODO regarding kernel panic

2025-05-08 Thread Manivannan Sadhasivam
On Fri, May 09, 2025 at 02:11:00PM +0800, Ethan Zhao wrote: > > > On 5/8/2025 3:10 PM, Manivannan Sadhasivam wrote: > > A PCI device is just another peripheral in a system. So failure to > > recover it, must not result in a kernel panic. So remove the TODO which &g

Re: [PATCH v3 5/5] PCI: qcom: Add support for resetting the slot due to link down event

2025-05-08 Thread Manivannan Sadhasivam
On Thu, Apr 24, 2025 at 10:31:00AM +0530, Manivannan Sadhasivam wrote: > On Fri, Apr 18, 2025 at 08:11:47AM +0530, Krishna Chaitanya Chundru wrote: > > > > > > On 4/17/2025 10:46 PM, Manivannan Sadhasivam via B4 Relay wrote: > > > From: Manivannan Sadhasivam >

[PATCH v4 1/5] PCI/ERR: Remove misleading TODO regarding kernel panic

2025-05-08 Thread Manivannan Sadhasivam
A PCI device is just another peripheral in a system. So failure to recover it, must not result in a kernel panic. So remove the TODO which is quite misleading. Signed-off-by: Manivannan Sadhasivam --- drivers/pci/pcie/err.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/pci/pcie

[PATCH v4 5/5] PCI: qcom: Add support for resetting the slot due to link down event

2025-05-08 Thread Manivannan Sadhasivam
pci_host_bridge::reset_slot()' callback to reset the slot in a platform specific way. So implement the callback to reset the slot by first resetting the PCIe core, followed by reinitializing the resources and then finally starting the link again. Signed-off-by: Manivannan Sadhasivam --- driver

[PATCH v4 4/5] PCI: host-common: Add link down handling for host bridges

2025-05-08 Thread Manivannan Sadhasivam
ill be broadcasted to the bridge and the downstream devices indicating successful link recovery. In case if the AER support is not enabled in the kernel, only pci_bus_error_reset() will be called for each slots as there is no way we could inform the drivers about link recovery. Signed-off-

[PATCH v4 0/5] PCI: Add support for resetting the slots in a platform specific way

2025-05-08 Thread Manivannan Sadhasivam
register. For the error recovery to succeed (if AER is enabled), all the drivers in the bridge hierarchy should have the 'err_handlers' populated. Otherwise, the link recovery will fail. [1] https://lore.kernel.org/linux-pci/20250221172309.120009-1-manivannan.sadhasi...@linaro.org S

[PATCH v4 3/5] PCI: host-common: Make the driver as a common library for host controller drivers

2025-05-08 Thread Manivannan Sadhasivam
x86/ACPI platforms). Suggested-by: Lukas Wunner Signed-off-by: Manivannan Sadhasivam --- drivers/pci/controller/Kconfig| 8 drivers/pci/controller/dwc/pcie-hisi.c| 1 + drivers/pci/controller/pci-host-common.c | 6 -- drivers/pci/controller

[PATCH v4 2/5] PCI/ERR: Add support for resetting the slots in a platform specific way

2025-05-08 Thread Manivannan Sadhasivam
; callback is responsible for resetting the given slot referenced by the 'pci_dev' pointer in a platform specific way and bring it back to the working state if possible. If any error occurs during the slot reset operation, relevant errno should be returned. Signed-off-by: Manivannan Sadh

Re: [PATCH v3 5/5] PCI: qcom: Add support for resetting the slot due to link down event

2025-05-05 Thread Manivannan Sadhasivam
On Mon, May 05, 2025 at 05:05:10PM +0200, Niklas Cassel wrote: > Hello Mani, > > On Thu, Apr 17, 2025 at 10:46:31PM +0530, Manivannan Sadhasivam via B4 Relay > wrote: > > @@ -1571,6 +1652,9 @@ static irqreturn_t qcom_pcie_global_irq_thread(int &

Re: [PATCH v3 5/5] PCI: qcom: Add support for resetting the slot due to link down event

2025-04-23 Thread Manivannan Sadhasivam
On Thu, Apr 24, 2025 at 10:41:24AM +0530, Krishna Chaitanya Chundru wrote: > > > On 4/24/2025 10:30 AM, Manivannan Sadhasivam wrote: > > On Fri, Apr 18, 2025 at 08:11:47AM +0530, Krishna Chaitanya Chundru wrote: > > > > > > > > > On 4/17/2025 10:46 PM

Re: [PATCH v3 5/5] PCI: qcom: Add support for resetting the slot due to link down event

2025-04-23 Thread Manivannan Sadhasivam
On Fri, Apr 18, 2025 at 08:11:47AM +0530, Krishna Chaitanya Chundru wrote: > > > On 4/17/2025 10:46 PM, Manivannan Sadhasivam via B4 Relay wrote: > > From: Manivannan Sadhasivam > > > > The PCIe link can go down under circumstances such as the device firmware >

[PATCH v3 5/5] PCI: qcom: Add support for resetting the slot due to link down event

2025-04-18 Thread Manivannan Sadhasivam via B4 Relay
From: Manivannan Sadhasivam The PCIe link can go down under circumstances such as the device firmware crash, link instability, etc... When that happens, the PCIe slot needs to be reset to make it operational again. Currently, the driver is not handling the link down event, due to which the users

[PATCH v3 3/5] PCI: host-common: Make the driver as a common library for host controller drivers

2025-04-18 Thread Manivannan Sadhasivam via B4 Relay
From: Manivannan Sadhasivam This common library will be used as a placeholder for helper functions shared by the host controller drivers. This avoids placing the host controller drivers specific helpers in drivers/pci/*.c, to avoid enlarging the kernel Image on platforms that do not use host

[PATCH v3 0/5] PCI: Add support for resetting the slots in a platform specific way

2025-04-17 Thread Manivannan Sadhasivam via B4 Relay
register. For the error recovery to succeed (if AER is enabled), all the drivers in the bridge hierarchy should have the 'err_handlers' populated. Otherwise, the link recovery will fail. [1] https://lore.kernel.org/linux-pci/20250221172309.120009-1-manivannan.sadhasi...@linaro.org Si

[PATCH v3 2/5] PCI/ERR: Add support for resetting the slots in a platform specific way

2025-04-17 Thread Manivannan Sadhasivam via B4 Relay
From: Manivannan Sadhasivam Some host bridge devices require resetting the slots in a platform specific way to recover them from error conditions such as Fatal AER errors, Link Down etc... So introduce pci_host_bridge::reset_slot callback and call it from pcibios_reset_secondary_bus() if

[PATCH v3 1/5] PCI/ERR: Remove misleading TODO regarding kernel panic

2025-04-17 Thread Manivannan Sadhasivam via B4 Relay
From: Manivannan Sadhasivam A PCI device is just another peripheral in a system. So failure to recover it, must not result in a kernel panic. So remove the TODO which is quite misleading. Signed-off-by: Manivannan Sadhasivam --- drivers/pci/pcie/err.c | 1 - 1 file changed, 1 deletion

[PATCH v3 4/5] PCI: host-common: Add link down handling for host bridges

2025-04-17 Thread Manivannan Sadhasivam via B4 Relay
From: Manivannan Sadhasivam The PCI link, when down, needs to be recovered to bring it back. But that cannot be done in a generic way as link recovery procedure is specific to host bridges. So add a new API pci_host_handle_link_down() that could be called by the host bridge drivers when the link

Re: [PATCH v2 3/4] PCI: Add link down handling for host bridges

2025-04-17 Thread Manivannan Sadhasivam
On Thu, Apr 17, 2025 at 02:41:55PM +0530, Krishna Chaitanya Chundru wrote: > > > On 4/17/2025 1:24 PM, Manivannan Sadhasivam wrote: > > On Wed, Apr 16, 2025 at 11:21:49PM +0530, Krishna Chaitanya Chundru wrote: > > > > > > > > > On 4/16/2025 9:59 PM

Re: [PATCH v2 3/4] PCI: Add link down handling for host bridges

2025-04-17 Thread Manivannan Sadhasivam
On Wed, Apr 16, 2025 at 11:21:49PM +0530, Krishna Chaitanya Chundru wrote: > > > On 4/16/2025 9:59 PM, Manivannan Sadhasivam via B4 Relay wrote: > > From: Manivannan Sadhasivam > > > > The PCI link, when down, needs to be recovered to bring it back. But that > >

Re: [PATCH v2 3/4] PCI: Add link down handling for host bridges

2025-04-17 Thread Manivannan Sadhasivam
On Wed, Apr 16, 2025 at 06:57:11PM +0200, Lukas Wunner wrote: > On Wed, Apr 16, 2025 at 09:59:05PM +0530, Manivannan Sadhasivam via B4 Relay > wrote: > > --- a/drivers/pci/pcie/err.c > > +++ b/drivers/pci/pcie/err.c > > @@ -270,3 +270,30 @@ pci_ers_result_t pcie_do_reco

Re: [PATCH 2/4] PCI/ERR: Add support for resetting the slot in a platforms specific way

2025-04-16 Thread Manivannan Sadhasivam
On Thu, Apr 17, 2025 at 02:23:26AM +0200, Lukas Wunner wrote: > On Wed, Apr 16, 2025 at 08:34:21PM +0530, Manivannan Sadhasivam wrote: > > I don't think it is possible to get rid of the powerpc version. It has > > its own pci_dev::sysdata pointing to 'struct pci_control

[PATCH v2 4/4] PCI: qcom: Add support for resetting the slot due to link down event

2025-04-16 Thread Manivannan Sadhasivam via B4 Relay
From: Manivannan Sadhasivam The PCIe link can go down under circumstances such as the device firmware crash, link instability, etc... When that happens, the PCIe slot needs to be reset to make it operational again. Currently, the driver is not handling the link down event, due to which the users

[PATCH v2 3/4] PCI: Add link down handling for host bridges

2025-04-16 Thread Manivannan Sadhasivam via B4 Relay
From: Manivannan Sadhasivam The PCI link, when down, needs to be recovered to bring it back. But that cannot be done in a generic way as link recovery procedure is specific to host bridges. So add a new API pci_host_handle_link_down() that could be called by the host bridge drivers when the link

[PATCH v2 1/4] PCI/ERR: Remove misleading TODO regarding kernel panic

2025-04-16 Thread Manivannan Sadhasivam via B4 Relay
From: Manivannan Sadhasivam A PCI device is just another peripheral in a system. So failure to recover it, must not result in a kernel panic. So remove the TODO which is quite misleading. Signed-off-by: Manivannan Sadhasivam --- drivers/pci/pcie/err.c | 1 - 1 file changed, 1 deletion

[PATCH v2 2/4] PCI/ERR: Add support for resetting the slots in a platform specific way

2025-04-16 Thread Manivannan Sadhasivam via B4 Relay
From: Manivannan Sadhasivam Some host bridge devices require resetting the slots in a platform specific way to recover them from error conditions such as Fatal AER errors, Link Down etc... So introduce pci_host_bridge::reset_slot callback and call it from pcibios_reset_secondary_bus() if

[PATCH v2 0/4] PCI: Add support for resetting the slots in a platform specific way

2025-04-16 Thread Manivannan Sadhasivam via B4 Relay
register. For the error recovery to succeed (if AER is enabled), all the drivers in the bridge hierarchy should have the 'err_handlers' populated. Otherwise, the link recovery will fail. [1] https://lore.kernel.org/linux-pci/20250221172309.120009-1-manivannan.sadhasi...@linaro.org

Re: [PATCH 2/4] PCI/ERR: Add support for resetting the slot in a platforms specific way

2025-04-16 Thread Manivannan Sadhasivam
On Wed, Apr 16, 2025 at 04:38:01PM +0200, Lukas Wunner wrote: > On Tue, Apr 15, 2025 at 07:03:17PM +0530, Manivannan Sadhasivam wrote: > > On Fri, Apr 04, 2025 at 10:46:27AM +0200, Lukas Wunner wrote: > > > On Fri, Apr 04, 2025 at 01:52:22PM +0530, Manivannan Sadhasivam via B4

Re: [PATCH 2/4] PCI/ERR: Add support for resetting the slot in a platforms specific way

2025-04-15 Thread Manivannan Sadhasivam
On Fri, Apr 04, 2025 at 10:46:27AM +0200, Lukas Wunner wrote: > On Fri, Apr 04, 2025 at 01:52:22PM +0530, Manivannan Sadhasivam via B4 Relay > wrote: > > When the PCI error handling requires resetting the slot, reset it using the > > host bridge specific 'reset_slot'

[PATCH 3/4] PCI: Add link down handling for host bridges

2025-04-05 Thread Manivannan Sadhasivam via B4 Relay
From: Manivannan Sadhasivam The PCI link, when down, needs to be recovered to bring it back. But that cannot be done in a generic way as link recovery procedure is specific to host bridges. So add a new API pci_host_handle_link_down() that could be called by the host bridge drivers when the link

[PATCH 2/4] PCI/ERR: Add support for resetting the slot in a platforms specific way

2025-04-04 Thread Manivannan Sadhasivam via B4 Relay
From: Manivannan Sadhasivam When the PCI error handling requires resetting the slot, reset it using the host bridge specific 'reset_slot' callback if available before calling the 'slot_reset' callback of the PCI drivers. The 'reset_slot' callback is responsibl

[PATCH 4/4] PCI: qcom: Add support for resetting the slot due to link down event

2025-04-04 Thread Manivannan Sadhasivam via B4 Relay
From: Manivannan Sadhasivam The PCIe link can go down under circumstances such as the device firmware crash, link instability, etc... When that happens, the PCIe slot needs to be reset to make it operational again. Currently, the driver is not handling the link down event, due to which the users

[PATCH 1/4] PCI/ERR: Remove misleading TODO regarding kernel panic

2025-04-04 Thread Manivannan Sadhasivam via B4 Relay
From: Manivannan Sadhasivam A PCI device is just another peripheral in a system. So failure to recover it, must not result in a kernel panic. So remove the TODO which is quite misleading. Signed-off-by: Manivannan Sadhasivam --- drivers/pci/pcie/err.c | 1 - 1 file changed, 1 deletion

[PATCH 0/4] PCI: Add support for resetting the slots in a platform specific way

2025-04-04 Thread Manivannan Sadhasivam via B4 Relay
register. For the error recovery to succeed (if AER is enabled), all the drivers in the bridge hierarchy should have the 'err_handlers' populated. Otherwise, the link recovery will fail. [1] https://lore.kernel.org/linux-pci/20250221172309.120009-1-manivannan.sadhasi...@linaro.org S

Re: [PATCH 2/5] PCI: endpoint: Introduce 'epc_deinit' event and notify the EPF drivers

2024-06-11 Thread Manivannan Sadhasivam
On Tue, Jun 11, 2024 at 05:06:40PM -0500, Bjorn Helgaas wrote: > On Thu, Jun 06, 2024 at 12:56:35PM +0530, Manivannan Sadhasivam wrote: > > As like the 'epc_init' event, that is used to signal the EPF drivers about > > the EPC initialization, let's introduce 

Re: [PATCH 0/5] PCI: endpoint: Add EPC 'deinit' event and dw_pcie_ep_linkdown() API

2024-06-09 Thread Manivannan Sadhasivam
On Thu, Jun 06, 2024 at 12:56:33PM +0530, Manivannan Sadhasivam wrote: > Hi, > > This series includes patches that were left over from previous series [1] for > making the host reboot handling robust in endpoint framework. > > When the above mentioned series got merged to pci/

Re: [PATCH 0/5] PCI: endpoint: Add EPC 'deinit' event and dw_pcie_ep_linkdown() API

2024-06-07 Thread Manivannan Sadhasivam
On Fri, Jun 07, 2024 at 11:31:28AM +0200, Niklas Cassel wrote: > On Thu, Jun 06, 2024 at 12:56:33PM +0530, Manivannan Sadhasivam wrote: > > Hi, > > > > This series includes patches that were left over from previous series [1] > > for > > making the host r

[PATCH 5/5] PCI: layerscape-ep: Use the generic dw_pcie_ep_linkdown() API to handle Link Down event

2024-06-06 Thread Manivannan Sadhasivam
ff-by: Manivannan Sadhasivam --- drivers/pci/controller/dwc/pci-layerscape-ep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/controller/dwc/pci-layerscape-ep.c b/drivers/pci/controller/dwc/pci-layerscape-ep.c index 35bb481564c7..a4a800699f89 100644 --- a/driver

[PATCH 3/5] PCI: dwc: ep: Add a generic dw_pcie_ep_linkdown() API to handle Link Down event

2024-06-06 Thread Manivannan Sadhasivam
y the drivers supporting PERST# to handle the scenario (2) mentioned above. NOTE: For the sake of code organization, move the dw_pcie_ep_linkup() definition just above dw_pcie_ep_linkdown(). Reviewed-by: Niklas Cassel Signed-off-by: Manivannan Sadhasivam --- drivers/pci/controller/dwc/pcie-desig

[PATCH 4/5] PCI: qcom-ep: Use the generic dw_pcie_ep_linkdown() API to handle Link Down event

2024-06-06 Thread Manivannan Sadhasivam
Now that the API is available, let's make use of it. It also handles the reinitialization of DWC non-sticky registers in addition to sending the notification to EPF drivers. Reviewed-by: Niklas Cassel Signed-off-by: Manivannan Sadhasivam --- drivers/pci/controller/dwc/pcie-qcom-ep.c | 2

[PATCH 2/5] PCI: endpoint: Introduce 'epc_deinit' event and notify the EPF drivers

2024-06-06 Thread Manivannan Sadhasivam
nups in unbind() if already done in epc_deinit(). Reviewed-by: Niklas Cassel Signed-off-by: Manivannan Sadhasivam --- drivers/pci/controller/dwc/pcie-designware-ep.c | 1 - drivers/pci/controller/dwc/pcie-qcom-ep.c | 1 + drivers/pci/controller/dwc/pcie-tegra194.c | 1 + drivers/p

[PATCH 1/5] PCI: dwc: ep: Remove dw_pcie_ep_init_notify() wrapper

2024-06-06 Thread Manivannan Sadhasivam
Currently dw_pcie_ep_init_notify() wrapper just calls pci_epc_init_notify() directly. So this wrapper provides no benefit to the glue drivers. So let's remove it and call pci_epc_init_notify() directly from glue drivers. Suggested-by: Bjorn Helgaas Signed-off-by: Manivannan Sadha

[PATCH 0/5] PCI: endpoint: Add EPC 'deinit' event and dw_pcie_ep_linkdown() API

2024-06-06 Thread Manivannan Sadhasivam
://lore.kernel.org/linux-pci/20240430-pci-epf-rework-v4-0-22832d0d4...@linaro.org/ [2] https://lore.kernel.org/linux-pci/202405130815.bwbriepl-...@intel.com/ [3] https://lore.kernel.org/linux-pci/20240529141614.GA3293@thinkpad/ Signed-off-by: Manivannan Sadhasivam --- Manivannan Sadhasivam (5

Re: [PATCH v12 2/8] PCI: dwc: ep: Add Kernel-doc comments for APIs

2024-04-15 Thread Manivannan Sadhasivam
On Fri, Apr 12, 2024 at 02:58:36PM -0500, Bjorn Helgaas wrote: > On Wed, Mar 27, 2024 at 02:43:31PM +0530, Manivannan Sadhasivam wrote: > > All of the APIs are missing the Kernel-doc comments. Hence, add them. > > > + * dw_pcie_ep_reset_bar - Reset endpoint BAR > > App

Re: [PATCH v12 8/8] PCI: endpoint: Remove "core_init_notifier" flag

2024-04-14 Thread Manivannan Sadhasivam
On Fri, Apr 12, 2024 at 03:22:16PM -0500, Bjorn Helgaas wrote: > On Wed, Mar 27, 2024 at 02:43:37PM +0530, Manivannan Sadhasivam wrote: > > "core_init_notifier" flag is set by the glue drivers requiring refclk from > > the host to complete the DWC core initialization.

[PATCH v12 8/8] PCI: endpoint: Remove "core_init_notifier" flag

2024-03-27 Thread Manivannan Sadhasivam
in 'init_complete' flag and pci-ep-cfs driver sends the notification to EPF drivers based on that after each EPF driver bind. Tested-by: Niklas Cassel Signed-off-by: Manivannan Sadhasivam --- drivers/pci/controller/cadence/pcie-cadence-ep.c | 2 ++ drivers/pci/controller/dw

[PATCH v12 7/8] PCI: dwc: ep: Call dw_pcie_ep_init_registers() API directly from all glue drivers

2024-03-27 Thread Manivannan Sadhasivam
s to remove the 'core_init_notifier' flag completely in the later commits. Reviewed-by: Yoshihiro Shimoda Reviewed-by: Niklas Cassel Signed-off-by: Manivannan Sadhasivam --- drivers/pci/controller/dwc/pci-dra7xx.c | 7 +++ drivers/pci/controller/dwc/pci-imx6.c

[PATCH v12 6/8] PCI: dwc: ep: Rename dw_pcie_ep_init_complete() to dw_pcie_ep_init_registers()

2024-03-27 Thread Manivannan Sadhasivam
ar that it initializes the DWC specific registers. Reviewed-by: Frank Li Reviewed-by: Niklas Cassel Signed-off-by: Manivannan Sadhasivam --- drivers/pci/controller/dwc/pcie-designware-ep.c | 14 +++--- drivers/pci/controller/dwc/pcie-designware.h| 4 ++-- drivers/pci/controller/dwc/pcie

[PATCH v12 5/8] PCI: dwc: ep: Introduce dw_pcie_ep_cleanup() API for drivers supporting PERST#

2024-03-27 Thread Manivannan Sadhasivam
y, it just removes eDMA. Reported-by: Niklas Cassel Closes: https://lore.kernel.org/linux-pci/ZWYmX8Y%2F7Q9WMxES@x1-carbon Reviewed-by: Frank Li Reviewed-by: Niklas Cassel Signed-off-by: Manivannan Sadhasivam --- drivers/pci/controller/dwc/pcie-designware-ep.c | 19 +-- driver

[PATCH v12 4/8] PCI: dwc: ep: Rename dw_pcie_ep_exit() to dw_pcie_ep_deinit()

2024-03-27 Thread Manivannan Sadhasivam
iewed-by: Frank Li Reviewed-by: Niklas Cassel Reviewed-by: Yoshihiro Shimoda Signed-off-by: Manivannan Sadhasivam --- drivers/pci/controller/dwc/pcie-designware-ep.c | 6 +++--- drivers/pci/controller/dwc/pcie-designware.h| 4 ++-- drivers/pci/controller/dwc/pcie-rcar-gen4.c | 2 +- 3

[PATCH v12 3/8] PCI: dwc: ep: Remove deinit() callback from struct dw_pcie_ep_ops

2024-03-27 Thread Manivannan Sadhasivam
Reviewed-by: Yoshihiro Shimoda Signed-off-by: Manivannan Sadhasivam --- drivers/pci/controller/dwc/pcie-designware-ep.c | 9 + drivers/pci/controller/dwc/pcie-designware.h| 1 - drivers/pci/controller/dwc/pcie-rcar-gen4.c | 14 -- 3 files changed, 9 insertions(+), 15

[PATCH v12 2/8] PCI: dwc: ep: Add Kernel-doc comments for APIs

2024-03-27 Thread Manivannan Sadhasivam
All of the APIs are missing the Kernel-doc comments. Hence, add them. Reviewed-by: Frank Li Reviewed-by: Niklas Cassel Signed-off-by: Manivannan Sadhasivam --- drivers/pci/controller/dwc/pcie-designware-ep.c | 77 + 1 file changed, 77 insertions(+) diff --git a

[PATCH v12 1/8] PCI: dwc: ep: Fix DBI access failure for drivers requiring refclk from host

2024-03-27 Thread Manivannan Sadhasivam
(). Fixes: e966f7390da9 ("PCI: dwc: Refactor core initialization code for EP mode") Co-developed-by: Vidya Sagar Signed-off-by: Vidya Sagar Reviewed-by: Frank Li Reviewed-by: Niklas Cassel Signed-off-by: Manivannan Sadhasivam --- drivers/pci/controller/dwc/pcie-designware-ep.c | 120 ++

[PATCH v12 0/8] PCI: dwc: ep: Fix DBI access failure for drivers requiring refclk from host

2024-03-27 Thread Manivannan Sadhasivam
e heavily modified. Changes in v6: - Rebased on top of pci/next (6e2fca71e187) - removed ep_init_late() callback as it is no longer necessary For previous changelog, please refer [1]. Signed-off-by: Manivannan Sadhasivam --- Manivannan Sadhasivam (8): PCI: dwc: ep: Fix DBI access fail

Re: [PATCH v11 8/8] PCI: endpoint: Remove "core_init_notifier" flag

2024-03-27 Thread Manivannan Sadhasivam
On Wed, Mar 27, 2024 at 09:24:05AM +0100, Niklas Cassel wrote: > Hello Mani, > > On Wed, Mar 27, 2024 at 12:05:54PM +0530, Manivannan Sadhasivam wrote: > > "core_init_notifier" flag is set by the glue drivers requiring refclk from > > the host to complete the DWC c

[PATCH v11 8/8] PCI: endpoint: Remove "core_init_notifier" flag

2024-03-26 Thread Manivannan Sadhasivam
in 'init_complete' flag and pci-ep-cfs driver sends the notification to EPF drivers based on that after each EPF driver bind. Tested-by: Niklas Cassel Signed-off-by: Manivannan Sadhasivam --- drivers/pci/controller/cadence/pcie-cadence-ep.c | 2 ++ drivers/pci/controller/dw

[PATCH v11 7/8] PCI: dwc: ep: Call dw_pcie_ep_init_registers() API directly from all glue drivers

2024-03-26 Thread Manivannan Sadhasivam
s to remove the 'core_init_notifier' flag completely in the later commits. Reviewed-by: Yoshihiro Shimoda Reviewed-by: Niklas Cassel Signed-off-by: Manivannan Sadhasivam --- drivers/pci/controller/dwc/pci-dra7xx.c | 7 +++ drivers/pci/controller/dwc/pci-imx6.c

[PATCH v11 6/8] PCI: dwc: ep: Rename dw_pcie_ep_init_complete() to dw_pcie_ep_init_registers()

2024-03-26 Thread Manivannan Sadhasivam
ar that it initializes the DWC specific registers. Reviewed-by: Frank Li Reviewed-by: Niklas Cassel Signed-off-by: Manivannan Sadhasivam --- drivers/pci/controller/dwc/pcie-designware-ep.c | 14 +++--- drivers/pci/controller/dwc/pcie-designware.h| 4 ++-- drivers/pci/controller/dwc/pcie

[PATCH v11 5/8] PCI: dwc: ep: Introduce dw_pcie_ep_cleanup() API for drivers supporting PERST#

2024-03-26 Thread Manivannan Sadhasivam
y, it just removes eDMA. Reported-by: Niklas Cassel Closes: https://lore.kernel.org/linux-pci/ZWYmX8Y%2F7Q9WMxES@x1-carbon Reviewed-by: Frank Li Reviewed-by: Niklas Cassel Signed-off-by: Manivannan Sadhasivam --- drivers/pci/controller/dwc/pcie-designware-ep.c | 19 +-- driver

[PATCH v11 4/8] PCI: dwc: ep: Rename dw_pcie_ep_exit() to dw_pcie_ep_deinit()

2024-03-26 Thread Manivannan Sadhasivam
iewed-by: Frank Li Reviewed-by: Niklas Cassel Reviewed-by: Yoshihiro Shimoda Signed-off-by: Manivannan Sadhasivam --- drivers/pci/controller/dwc/pcie-designware-ep.c | 6 +++--- drivers/pci/controller/dwc/pcie-designware.h| 4 ++-- drivers/pci/controller/dwc/pcie-rcar-gen4.c | 2 +- 3

[PATCH v11 3/8] PCI: dwc: ep: Remove deinit() callback from struct dw_pcie_ep_ops

2024-03-26 Thread Manivannan Sadhasivam
Reviewed-by: Yoshihiro Shimoda Signed-off-by: Manivannan Sadhasivam --- drivers/pci/controller/dwc/pcie-designware-ep.c | 9 + drivers/pci/controller/dwc/pcie-designware.h| 1 - drivers/pci/controller/dwc/pcie-rcar-gen4.c | 14 -- 3 files changed, 9 insertions(+), 15

[PATCH v11 2/8] PCI: dwc: ep: Add Kernel-doc comments for APIs

2024-03-26 Thread Manivannan Sadhasivam
All of the APIs are missing the Kernel-doc comments. Hence, add them. Reviewed-by: Frank Li Reviewed-by: Niklas Cassel Signed-off-by: Manivannan Sadhasivam --- drivers/pci/controller/dwc/pcie-designware-ep.c | 77 + 1 file changed, 77 insertions(+) diff --git a

[PATCH v11 1/8] PCI: dwc: ep: Fix DBI access failure for drivers requiring refclk from host

2024-03-26 Thread Manivannan Sadhasivam
(). Fixes: e966f7390da9 ("PCI: dwc: Refactor core initialization code for EP mode") Co-developed-by: Vidya Sagar Signed-off-by: Vidya Sagar Reviewed-by: Frank Li Reviewed-by: Niklas Cassel Signed-off-by: Manivannan Sadhasivam --- drivers/pci/controller/dwc/pcie-designware-ep.c | 120 ++

[PATCH v11 0/8] PCI: dwc: ep: Fix DBI access failure for drivers requiring refclk from host

2024-03-26 Thread Manivannan Sadhasivam
ok over the authorship and dropped the previous Ack as the patches are heavily modified. Changes in v6: - Rebased on top of pci/next (6e2fca71e187) - removed ep_init_late() callback as it is no longer necessary For previous changelog, please refer [1]. Signed-off-by: Manivannan Sadhasivam --- Man

Re: [PATCH v10 8/8] PCI: dwc: ep: Remove "core_init_notifier" flag

2024-03-25 Thread Manivannan Sadhasivam
On Fri, Mar 22, 2024 at 12:53:50PM +0100, Niklas Cassel wrote: > On Thu, Mar 14, 2024 at 01:18:06PM +0530, Manivannan Sadhasivam wrote: > > "core_init_notifier" flag is set by the glue drivers requiring refclk from > > the host to complete the DWC core initialization.

[PATCH v10 8/8] PCI: dwc: ep: Remove "core_init_notifier" flag

2024-03-14 Thread Manivannan Sadhasivam
in 'init_complete' flag and pci-ep-cfs driver sends the notification to EPF drivers based on that after each EPF driver bind. Signed-off-by: Manivannan Sadhasivam --- drivers/pci/controller/dwc/pci-dra7xx.c | 2 ++ drivers/pci/controller/dwc/pci-imx6.c | 2

[PATCH v10 7/8] PCI: dwc: ep: Call dw_pcie_ep_init_registers() API directly from all glue drivers

2024-03-14 Thread Manivannan Sadhasivam
s to remove the 'core_init_notifier' flag completely in the later commits. Reviewed-by: Yoshihiro Shimoda Signed-off-by: Manivannan Sadhasivam --- drivers/pci/controller/dwc/pci-dra7xx.c | 7 +++ drivers/pci/controller/dwc/pci-imx6.c | 8 drive

[PATCH v10 6/8] PCI: dwc: ep: Rename dw_pcie_ep_init_complete() to dw_pcie_ep_init_registers()

2024-03-14 Thread Manivannan Sadhasivam
ar that it initializes the DWC specific registers. Reviewed-by: Frank Li Reviewed-by: Niklas Cassel Signed-off-by: Manivannan Sadhasivam --- drivers/pci/controller/dwc/pcie-designware-ep.c | 14 +++--- drivers/pci/controller/dwc/pcie-designware.h| 4 ++-- drivers/pci/controller/dwc/pcie

[PATCH v10 5/8] PCI: dwc: ep: Introduce dw_pcie_ep_cleanup() API for drivers supporting PERST#

2024-03-14 Thread Manivannan Sadhasivam
y, it just removes eDMA. Reported-by: Niklas Cassel Closes: https://lore.kernel.org/linux-pci/ZWYmX8Y%2F7Q9WMxES@x1-carbon Reviewed-by: Frank Li Reviewed-by: Niklas Cassel Signed-off-by: Manivannan Sadhasivam --- drivers/pci/controller/dwc/pcie-designware-ep.c | 19 +-- driver

[PATCH v10 4/8] PCI: dwc: ep: Rename dw_pcie_ep_exit() to dw_pcie_ep_deinit()

2024-03-14 Thread Manivannan Sadhasivam
iewed-by: Frank Li Reviewed-by: Niklas Cassel Reviewed-by: Yoshihiro Shimoda Signed-off-by: Manivannan Sadhasivam --- drivers/pci/controller/dwc/pcie-designware-ep.c | 6 +++--- drivers/pci/controller/dwc/pcie-designware.h| 4 ++-- drivers/pci/controller/dwc/pcie-rcar-gen4.c | 2 +- 3

[PATCH v10 3/8] PCI: dwc: ep: Remove deinit() callback from struct dw_pcie_ep_ops

2024-03-14 Thread Manivannan Sadhasivam
Reviewed-by: Yoshihiro Shimoda Signed-off-by: Manivannan Sadhasivam --- drivers/pci/controller/dwc/pcie-designware-ep.c | 9 + drivers/pci/controller/dwc/pcie-designware.h| 1 - drivers/pci/controller/dwc/pcie-rcar-gen4.c | 14 -- 3 files changed, 9 insertions(+), 15

[PATCH v10 2/8] PCI: dwc: ep: Add Kernel-doc comments for APIs

2024-03-14 Thread Manivannan Sadhasivam
All of the APIs are missing the Kernel-doc comments. Hence, add them. Reviewed-by: Frank Li Signed-off-by: Manivannan Sadhasivam --- drivers/pci/controller/dwc/pcie-designware-ep.c | 78 + 1 file changed, 78 insertions(+) diff --git a/drivers/pci/controller/dwc/pcie

[PATCH v10 1/8] PCI: dwc: ep: Fix DBI access failure for drivers requiring refclk from host

2024-03-14 Thread Manivannan Sadhasivam
(). Fixes: e966f7390da9 ("PCI: dwc: Refactor core initialization code for EP mode") Co-developed-by: Vidya Sagar Signed-off-by: Vidya Sagar Reviewed-by: Frank Li Reviewed-by: Niklas Cassel Signed-off-by: Manivannan Sadhasivam --- drivers/pci/controller/dwc/pcie-designware-ep.c | 120 ++

[PATCH v10 0/8] PCI: dwc: ep: Fix DBI access failure for drivers requiring refclk from host

2024-03-14 Thread Manivannan Sadhasivam
Changes in v6: - Rebased on top of pci/next (6e2fca71e187) - removed ep_init_late() callback as it is no longer necessary For previous changelog, please refer [1]. Signed-off-by: Manivannan Sadhasivam --- Manivannan Sadhasivam (8): PCI: dwc: ep: Fix DBI access failure for drivers requiring refclk

Re: [PATCH v9 06/10] PCI: dwc: ep: Call dw_pcie_ep_init_registers() API directly from all glue drivers

2024-03-14 Thread Manivannan Sadhasivam
On Fri, Mar 08, 2024 at 11:22:52AM +0100, Niklas Cassel wrote: > On Fri, Mar 08, 2024 at 03:19:47PM +0530, Manivannan Sadhasivam wrote: > > > > > > @@ -467,6 +467,13 @@ static int dra7xx_add_pcie_ep(struct > > > > > > dra7xx_pcie *dra

Re: [PATCH v9 07/10] PCI: dwc: ep: Remove "core_init_notifier" flag

2024-03-13 Thread Manivannan Sadhasivam
On Mon, Mar 11, 2024 at 10:54:28PM +0100, Niklas Cassel wrote: > On Mon, Mar 11, 2024 at 08:15:59PM +0530, Manivannan Sadhasivam wrote: > > > > > > I would say that it is the following change that breaks things: > > > > > > > - if (!core_in

  1   2   >