can: m_can: pci: add missing pm_runtime_dont_use_autosuspend() call
Subsystems (2)
PATCH 1/1 can: m_can: pci: add missing pm_runtime_dont_use_autosuspend() call
m_can_pci_remove() forgets to call pm_runtime_dont_use_autosuspend() on teardown, even though autosuspend is enabled in m_can_pci_probe().
Add the missing function call.
---
Found using a Coccinelle script I'm currently working on [1].
[1] https://lore.kernel.org/cocci/[email protected]
--- drivers/net/can/m_can/m_can_pci.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/can/m_can/m_can_pci.c +1 -0
@@ -159,6 +159,7 @@ static void m_can_pci_remove(struct pci_dev *pci)struct m_can_pci_priv *priv =cdev_to_priv (mcan_class);pm_runtime_forbid (&pci->dev); +pm_runtime_dont_use_autosuspend (&pci->dev);pm_runtime_get_noresume (&pci->dev);/* Disable interrupt control at CAN wrapper IP */
Signature · 1 line
2.47.3
Hi Joshua,
Quoted 5 lines · Joshua Crofts
m_can_pci_remove()forgets to callpm_runtime_dont_use_autosuspend()on teardown, even though autosuspend is enabled inm_can_pci_probe().Add the missing function call.
Can you please add a Fixes: tag?
Quoted 1 line
Signed-off-by Joshua Crofts <[email protected]>
After that it looks good to me:
Best
Markus
Quoted 10 lines · On Fri, 18 Sep 2026 11:24:09 +0200 "Markus Schneider-Pargmann"…
Hi Joshua,
Quoted 5 lines · Joshua Crofts
m_can_pci_remove()forgets to callpm_runtime_dont_use_autosuspend()on teardown, even though autosuspend is enabled inm_can_pci_probe().Add the missing function call.
Can you please add a Fixes: tag?
I guess it's not a problem, however we had a discussion in the USB subsystem whether this type of patch is a fix and ended up agreeing that it's more hardening, hence no Fixes tag.
Alright if I just append the tag here for b4 to collect?
Signature · 2 lines
Kind regards, Joshua Crofts
Markus Schneider-Pargmann
maintainerQuoted 12 lines · Joshua Crofts
Quoted 9 lines · On Fri, 18 Sep 2026 11:24:09 +0200 "Markus Schneider-Pargmann"…
Hi Joshua,
Quoted 5 lines · Joshua Crofts
m_can_pci_remove()forgets to callpm_runtime_dont_use_autosuspend()on teardown, even though autosuspend is enabled inm_can_pci_probe().Add the missing function call.
Quoted 7 lines
Quoted 1 line
Can you please add a Fixes: tag?
I guess it's not a problem, however we had a discussion in the USB subsystem whether this type of patch is a fix and ended up agreeing that it's more hardening, hence no Fixes tag.
Alright if I just append the tag here for b4 to collect?
Yes, that's ok for me.
Quoted 15 lines · On Wed, 23 Sep 2026 09:06:59 +0200 "Markus Schneider-Pargmann"…
Quoted 14 lines · Joshua Crofts
Quoted 10 lines · On Fri, 18 Sep 2026 11:24:09 +0200 "Markus Schneider-Pargmann"…
Hi Joshua,
Quoted 5 lines · Joshua Crofts
m_can_pci_remove()forgets to callpm_runtime_dont_use_autosuspend()on teardown, even though autosuspend is enabled inm_can_pci_probe().Add the missing function call.
Can you please add a Fixes: tag?
Quoted 8 lines
Quoted 5 lines
I guess it's not a problem, however we had a discussion in the USB subsystem whether this type of patch is a fix and ended up agreeing that it's more hardening, hence no Fixes tag.
Alright if I just append the tag here for b4 to collect?
Yes, that's ok for me.
Signature · 2 lines
Kind regards, Joshua Crofts
Quoted 23 lines · Joshua Crofts
Quoted 19 lines · On Wed, 23 Sep 2026 09:06:59 +0200 "Markus Schneider-Pargmann"…
Quoted 18 lines · Joshua Crofts
Quoted 10 lines · On Fri, 18 Sep 2026 11:24:09 +0200 "Markus Schneider-Pargmann"…
Hi Joshua,
Quoted 5 lines · Joshua Crofts
m_can_pci_remove()forgets to callpm_runtime_dont_use_autosuspend()on teardown, even though autosuspend is enabled inm_can_pci_probe().Add the missing function call.
Can you please add a Fixes: tag?
I guess it's not a problem, however we had a discussion in the USB subsystem whether this type of patch is a fix and ended up agreeing that it's more hardening, hence no Fixes tag.
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
Alright if I just append the tag here for b4 to collect?
Yes, that's ok for me.
Fixes cab7ffc0324f ("can: m_can: add PCI glue driver for Intel Elkhart Lake")
You can drop this patch, as I now have a patch queued for 7.4 that makes PM runtime call this automatically on driver unbind [1].
[1] https://lore.kernel.org/all/[email protected]/
--
Kind regards,
Joshua Crofts