Commit 00f89ae
PCI: Fix devres regression in pci_intx()
pci_intx() becomes managed if pcim_enable_device() has been called in
advance. Commit 25216af ("PCI: Add managed pcim_intx()") changed this
behavior so that pci_intx() always leads to creation of a separate device
resource for itself, whereas earlier, a shared resource was used for all
PCI devres operations.
Unfortunately, pci_intx() seems to be used in some drivers' remove() paths;
in the managed case this causes a device resource to be created on driver
detach, which causes .probe() to fail if the driver is reloaded:
pci 0000:00:1f.2: Resources present before probing
Fix the regression by only redirecting pci_intx() to its managed twin
pcim_intx() if the pci_command changes.
Link: https://lore.kernel.org/r/20240725120729.59788-2-pstanner@redhat.com
Fixes: 25216af ("PCI: Add managed pcim_intx()")
Reported-by: Damien Le Moal <dlemoal@kernel.org>
Closes: https://lore.kernel.org/all/b8f4ba97-84fc-4b7e-ba1a-99de2d9f0118@kernel.org/
Signed-off-by: Philipp Stanner <pstanner@redhat.com>
[bhelgaas: add error message to commit log]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Tested-by: Damien Le Moal <dlemoal@kernel.org>1 parent 8400291 commit 00f89ae
1 file changed
+8
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4477 | 4477 | | |
4478 | 4478 | | |
4479 | 4479 | | |
4480 | | - | |
4481 | | - | |
4482 | | - | |
4483 | | - | |
4484 | | - | |
4485 | | - | |
4486 | 4480 | | |
4487 | 4481 | | |
4488 | 4482 | | |
4489 | 4483 | | |
4490 | 4484 | | |
4491 | 4485 | | |
4492 | 4486 | | |
4493 | | - | |
| 4487 | + | |
| 4488 | + | |
| 4489 | + | |
| 4490 | + | |
| 4491 | + | |
| 4492 | + | |
| 4493 | + | |
4494 | 4494 | | |
| 4495 | + | |
4495 | 4496 | | |
4496 | 4497 | | |
4497 | 4498 | | |
| |||
0 commit comments