* [PATCH] can: m_can: pci: add missing pm_runtime_dont_use_autosuspend() call
@ 2026-09-16 12:42 Joshua Crofts
2026-09-18 9:24 ` Markus Schneider-Pargmann
0 siblings, 1 reply; 5+ messages in thread
From: Joshua Crofts @ 2026-09-16 12:42 UTC (permalink / raw)
To: Markus Schneider-Pargmann, Marc Kleine-Budde, Vincent Mailhol
Cc: linux-can, linux-kernel
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.
Signed-off-by: Joshua Crofts <joshua.crofts1@gmail.com>
---
Found using a Coccinelle script I'm currently working on [1].
[1] https://lore.kernel.org/cocci/20260916095616.1394-1-joshua.crofts1@gmail.com
---
drivers/net/can/m_can/m_can_pci.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/can/m_can/m_can_pci.c b/drivers/net/can/m_can/m_can_pci.c
index d11a7c88fc32..3c595749b5c7 100644
--- a/drivers/net/can/m_can/m_can_pci.c
+++ b/drivers/net/can/m_can/m_can_pci.c
@@ -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 */
--
2.47.3
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] can: m_can: pci: add missing pm_runtime_dont_use_autosuspend() call
2026-09-16 12:42 [PATCH] can: m_can: pci: add missing pm_runtime_dont_use_autosuspend() call Joshua Crofts
@ 2026-09-18 9:24 ` Markus Schneider-Pargmann
2026-09-18 11:15 ` Joshua Crofts
0 siblings, 1 reply; 5+ messages in thread
From: Markus Schneider-Pargmann @ 2026-09-18 9:24 UTC (permalink / raw)
To: Joshua Crofts, Markus Schneider-Pargmann, Marc Kleine-Budde,
Vincent Mailhol
Cc: linux-can, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 464 bytes --]
Hi Joshua,
On Wed Sep 16, 2026 at 2:42 PM CEST, Joshua Crofts wrote:
> 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.
>
Can you please add a Fixes: tag?
> Signed-off-by: Joshua Crofts <joshua.crofts1@gmail.com>
After that it looks good to me:
Acked-by: Markus Schneider-Pargmann <msp@baylibre.com>
Best
Markus
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 289 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] can: m_can: pci: add missing pm_runtime_dont_use_autosuspend() call
2026-09-18 9:24 ` Markus Schneider-Pargmann
@ 2026-09-18 11:15 ` Joshua Crofts
2026-09-23 7:06 ` Markus Schneider-Pargmann
0 siblings, 1 reply; 5+ messages in thread
From: Joshua Crofts @ 2026-09-18 11:15 UTC (permalink / raw)
To: Markus Schneider-Pargmann
Cc: Marc Kleine-Budde, Vincent Mailhol, linux-can, linux-kernel
On Fri, 18 Sep 2026 11:24:09 +0200
"Markus Schneider-Pargmann" <msp@baylibre.com> wrote:
> Hi Joshua,
>
> On Wed Sep 16, 2026 at 2:42 PM CEST, Joshua Crofts wrote:
> > 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.
> >
>
> 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?
--
Kind regards,
Joshua Crofts
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] can: m_can: pci: add missing pm_runtime_dont_use_autosuspend() call
2026-09-18 11:15 ` Joshua Crofts
@ 2026-09-23 7:06 ` Markus Schneider-Pargmann
2026-09-23 7:24 ` Joshua Crofts
0 siblings, 1 reply; 5+ messages in thread
From: Markus Schneider-Pargmann @ 2026-09-23 7:06 UTC (permalink / raw)
To: Joshua Crofts, Markus Schneider-Pargmann
Cc: Marc Kleine-Budde, Vincent Mailhol, linux-can, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 765 bytes --]
On Fri Sep 18, 2026 at 1:15 PM CEST, Joshua Crofts wrote:
> On Fri, 18 Sep 2026 11:24:09 +0200
> "Markus Schneider-Pargmann" <msp@baylibre.com> wrote:
>
>> Hi Joshua,
>>
>> On Wed Sep 16, 2026 at 2:42 PM CEST, Joshua Crofts wrote:
>> > 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.
>> >
>>
>> 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.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 289 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] can: m_can: pci: add missing pm_runtime_dont_use_autosuspend() call
2026-09-23 7:06 ` Markus Schneider-Pargmann
@ 2026-09-23 7:24 ` Joshua Crofts
0 siblings, 0 replies; 5+ messages in thread
From: Joshua Crofts @ 2026-09-23 7:24 UTC (permalink / raw)
To: Markus Schneider-Pargmann
Cc: Marc Kleine-Budde, Vincent Mailhol, linux-can, linux-kernel
On Wed, 23 Sep 2026 09:06:59 +0200
"Markus Schneider-Pargmann" <msp@baylibre.com> wrote:
> On Fri Sep 18, 2026 at 1:15 PM CEST, Joshua Crofts wrote:
> > On Fri, 18 Sep 2026 11:24:09 +0200
> > "Markus Schneider-Pargmann" <msp@baylibre.com> wrote:
> >
> >> Hi Joshua,
> >>
> >> On Wed Sep 16, 2026 at 2:42 PM CEST, Joshua Crofts wrote:
> >> > 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.
> >> >
> >>
> >> 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.
>
Fixes: cab7ffc0324f ("can: m_can: add PCI glue driver for Intel Elkhart Lake")
--
Kind regards,
Joshua Crofts
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-09-23 7:24 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-16 12:42 [PATCH] can: m_can: pci: add missing pm_runtime_dont_use_autosuspend() call Joshua Crofts
2026-09-18 9:24 ` Markus Schneider-Pargmann
2026-09-18 11:15 ` Joshua Crofts
2026-09-23 7:06 ` Markus Schneider-Pargmann
2026-09-23 7:24 ` Joshua Crofts
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®