Re: [PATCH v9 10/13] PCI: Give pci_intx() its own devres callback

2024-07-09 Thread Krzysztof Wilczyński
[...] > pci_intx() calls into pcim_intx() in managed mode, i.e., when > pcim_enable_device() had been called. This recursive call causes a bug > by re-registering the device resource in the release callback. > > This is the same phenomenon that made it necessary to implement some > functionality a

Re: [PATCH v9 10/13] PCI: Give pci_intx() its own devres callback

2024-07-09 Thread Krzysztof Wilczyński
Hello Ashish and Philipp, > I have reviewed and tested this patch, looks to be working fine and fixes the > issue. Great news! Ashish, thank you for taking the time to report the problem and then also testing the fix. Much appreciated. Philipp, I will take this patch and squash into the serie

Re: [PATCH v9 10/13] PCI: Give pci_intx() its own devres callback

2024-07-09 Thread Kalra, Ashish
Hello Philipp, I have reviewed and tested this patch, looks to be working fine and fixes the issue. Thanks, Ashish On 7/9/2024 3:56 AM, Philipp Stanner wrote: > From c24bd5b66e798a341caf183fb7cdbdf235502d90 Mon Sep 17 00:00:00 2001 > From: Philipp Stanner > Date: Tue, 9 Jul 2024 09:45:48 +0200

Re: [PATCH v9 10/13] PCI: Give pci_intx() its own devres callback

2024-07-09 Thread Philipp Stanner
>From c24bd5b66e798a341caf183fb7cdbdf235502d90 Mon Sep 17 00:00:00 2001 From: Philipp Stanner Date: Tue, 9 Jul 2024 09:45:48 +0200 Subject: [PATCH] PCI: Fix pcim_intx() recursive calls pci_intx() calls into pcim_intx() in managed mode, i.e., when pcim_enable_device() had been called. This recursi

Re: [PATCH v9 10/13] PCI: Give pci_intx() its own devres callback

2024-07-09 Thread Kalra, Ashish
Hello Philipp, On 7/9/2024 2:21 AM, Philipp Stanner wrote: > @Bjorn, @Krzysztof > > On Mon, 2024-07-08 at 21:46 +, Ashish Kalra wrote: >> With this patch applied, we are observing unloading and then >> reloading issues with the AMD Crypto (CCP) driver: > Thank you very much for digging into th

Re: [PATCH v9 10/13] PCI: Give pci_intx() its own devres callback

2024-07-09 Thread Philipp Stanner
@Bjorn, @Krzysztof On Mon, 2024-07-08 at 21:46 +, Ashish Kalra wrote: > With this patch applied, we are observing unloading and then > reloading issues with the AMD Crypto (CCP) driver: Thank you very much for digging into this, Ashish Could you give me some pointers how one could test CCP b

Re: [PATCH v9 10/13] PCI: Give pci_intx() its own devres callback

2024-07-08 Thread Ashish Kalra
With this patch applied, we are observing unloading and then reloading issues with the AMD Crypto (CCP) driver: with DEVRES logging enabled, we observe the following logs: [ 218.093588] ccp :a2:00.1: DEVRES REL c18c52fb 0x8d09dc1972c0 devm_kzalloc_release (152 bytes) [ 218.105

Re: [PATCH v9 10/13] PCI: Give pci_intx() its own devres callback

2024-06-18 Thread Philipp Stanner
On Mon, 2024-06-17 at 11:46 -0500, Bjorn Helgaas wrote: > On Mon, Jun 17, 2024 at 10:21:10AM +0200, Philipp Stanner wrote: > > On Fri, 2024-06-14 at 11:14 -0500, Bjorn Helgaas wrote: > > > On Fri, Jun 14, 2024 at 10:09:46AM +0200, Philipp Stanner wrote: > > ... > > > > > Apparently INTx is "old IR

Re: [PATCH v9 10/13] PCI: Give pci_intx() its own devres callback

2024-06-17 Thread Bjorn Helgaas
On Mon, Jun 17, 2024 at 10:21:10AM +0200, Philipp Stanner wrote: > On Fri, 2024-06-14 at 11:14 -0500, Bjorn Helgaas wrote: > > On Fri, Jun 14, 2024 at 10:09:46AM +0200, Philipp Stanner wrote: > ... > > > Apparently INTx is "old IRQ management" and should be done through > > > pci_alloc_irq_vectors

Re: [PATCH v9 10/13] PCI: Give pci_intx() its own devres callback

2024-06-17 Thread Philipp Stanner
On Fri, 2024-06-14 at 11:14 -0500, Bjorn Helgaas wrote: > On Fri, Jun 14, 2024 at 10:09:46AM +0200, Philipp Stanner wrote: > > On Thu, 2024-06-13 at 16:06 -0500, Bjorn Helgaas wrote: > > > On Thu, Jun 13, 2024 at 01:50:23PM +0200, Philipp Stanner wrote: > > > > pci_intx() is one of the functions th

Re: [PATCH v9 10/13] PCI: Give pci_intx() its own devres callback

2024-06-14 Thread Bjorn Helgaas
On Fri, Jun 14, 2024 at 10:09:46AM +0200, Philipp Stanner wrote: > On Thu, 2024-06-13 at 16:06 -0500, Bjorn Helgaas wrote: > > On Thu, Jun 13, 2024 at 01:50:23PM +0200, Philipp Stanner wrote: > > > pci_intx() is one of the functions that have "hybrid mode" (i.e., > > > sometimes managed, sometimes

Re: [PATCH v9 10/13] PCI: Give pci_intx() its own devres callback

2024-06-14 Thread Philipp Stanner
On Thu, 2024-06-13 at 16:06 -0500, Bjorn Helgaas wrote: > On Thu, Jun 13, 2024 at 01:50:23PM +0200, Philipp Stanner wrote: > > pci_intx() is one of the functions that have "hybrid mode" (i.e., > > sometimes managed, sometimes not). Providing a separate pcim_intx() > > function with its own device r

Re: [PATCH v9 10/13] PCI: Give pci_intx() its own devres callback

2024-06-13 Thread Bjorn Helgaas
On Thu, Jun 13, 2024 at 01:50:23PM +0200, Philipp Stanner wrote: > pci_intx() is one of the functions that have "hybrid mode" (i.e., > sometimes managed, sometimes not). Providing a separate pcim_intx() > function with its own device resource and cleanup callback allows for > removing further large

[PATCH v9 10/13] PCI: Give pci_intx() its own devres callback

2024-06-13 Thread Philipp Stanner
pci_intx() is one of the functions that have "hybrid mode" (i.e., sometimes managed, sometimes not). Providing a separate pcim_intx() function with its own device resource and cleanup callback allows for removing further large parts of the legacy PCI devres implementation. As in the region-request