* [PATCH V2] usb: dwc3: gadget: Let pm runtime get/put paired
@ 2023-08-01 1:15 Surong Pang
2023-08-01 1:33 ` Elson Serrao
0 siblings, 1 reply; 4+ messages in thread
From: Surong Pang @ 2023-08-01 1:15 UTC (permalink / raw)
To: Thinh.Nguyen, gregkh, felipe.balbi, linux-usb, linux-kernel
Cc: Orson.Zhai, Chunyan.Zhang, Zhiyong.liu, Surong.Pang, Surong.Pang
Pm_runtime_get is called when setting pending_events to true.
Pm_runtime_put is needed for pairing with pm_runtime_get.
Fixes: fc8bb91bc83e ("usb: dwc3: implement runtime PM")
Signed-off-by: Surong Pang <surong.pang@unisoc.com>
---
V2: add Fixes tag, fix Fixes tag
---
drivers/usb/dwc3/gadget.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index 5fd067151fbf..9c835c5f9928 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -4720,5 +4720,6 @@ void dwc3_gadget_process_pending_events(struct dwc3 *dwc)
dwc3_interrupt(dwc->irq_gadget, dwc->ev_buf);
dwc->pending_events = false;
enable_irq(dwc->irq_gadget);
+ pm_runtime_put(dwc->dev);
}
}
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH V2] usb: dwc3: gadget: Let pm runtime get/put paired
2023-08-01 1:15 [PATCH V2] usb: dwc3: gadget: Let pm runtime get/put paired Surong Pang
@ 2023-08-01 1:33 ` Elson Serrao
2023-08-01 4:43 ` Greg KH
0 siblings, 1 reply; 4+ messages in thread
From: Elson Serrao @ 2023-08-01 1:33 UTC (permalink / raw)
To: Surong Pang, Thinh.Nguyen, gregkh, felipe.balbi, linux-usb,
linux-kernel, rogerq
Cc: Orson.Zhai, Chunyan.Zhang, Zhiyong.liu, Surong.Pang
On 7/31/2023 6:15 PM, Surong Pang wrote:
> Pm_runtime_get is called when setting pending_events to true.
> Pm_runtime_put is needed for pairing with pm_runtime_get.
>
> Fixes: fc8bb91bc83e ("usb: dwc3: implement runtime PM")
> Signed-off-by: Surong Pang <surong.pang@unisoc.com>
>
> ---
> V2: add Fixes tag, fix Fixes tag
> ---
> drivers/usb/dwc3/gadget.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
> index 5fd067151fbf..9c835c5f9928 100644
> --- a/drivers/usb/dwc3/gadget.c
> +++ b/drivers/usb/dwc3/gadget.c
> @@ -4720,5 +4720,6 @@ void dwc3_gadget_process_pending_events(struct dwc3 *dwc)
> dwc3_interrupt(dwc->irq_gadget, dwc->ev_buf);
> dwc->pending_events = false;
> enable_irq(dwc->irq_gadget);
> + pm_runtime_put(dwc->dev);
> }
> }
I am already handling this change as part of below series. Will be
uploading a separate patch based on the feedback from Roger.
https://lore.kernel.org/all/be57511d-2005-a1f5-d5a5-809e71029aec@quicinc.com/
Thanks
Elson
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH V2] usb: dwc3: gadget: Let pm runtime get/put paired
2023-08-01 1:33 ` Elson Serrao
@ 2023-08-01 4:43 ` Greg KH
2023-08-01 19:41 ` Elson Serrao
0 siblings, 1 reply; 4+ messages in thread
From: Greg KH @ 2023-08-01 4:43 UTC (permalink / raw)
To: Elson Serrao
Cc: Surong Pang, Thinh.Nguyen, felipe.balbi, linux-usb, linux-kernel,
rogerq, Orson.Zhai, Chunyan.Zhang, Zhiyong.liu, Surong.Pang
On Mon, Jul 31, 2023 at 06:33:04PM -0700, Elson Serrao wrote:
>
>
> On 7/31/2023 6:15 PM, Surong Pang wrote:
> > Pm_runtime_get is called when setting pending_events to true.
> > Pm_runtime_put is needed for pairing with pm_runtime_get.
> >
> > Fixes: fc8bb91bc83e ("usb: dwc3: implement runtime PM")
> > Signed-off-by: Surong Pang <surong.pang@unisoc.com>
> >
> > ---
> > V2: add Fixes tag, fix Fixes tag
> > ---
> > drivers/usb/dwc3/gadget.c | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
> > index 5fd067151fbf..9c835c5f9928 100644
> > --- a/drivers/usb/dwc3/gadget.c
> > +++ b/drivers/usb/dwc3/gadget.c
> > @@ -4720,5 +4720,6 @@ void dwc3_gadget_process_pending_events(struct dwc3 *dwc)
> > dwc3_interrupt(dwc->irq_gadget, dwc->ev_buf);
> > dwc->pending_events = false;
> > enable_irq(dwc->irq_gadget);
> > + pm_runtime_put(dwc->dev);
> > }
> > }
>
> I am already handling this change as part of below series. Will be uploading
> a separate patch based on the feedback from Roger.
>
> https://lore.kernel.org/all/be57511d-2005-a1f5-d5a5-809e71029aec@quicinc.com/
But this should be fixed now, and properly backported to stable kernels.
There's no need to wait for a different patch series if this one is
correct, right?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH V2] usb: dwc3: gadget: Let pm runtime get/put paired
2023-08-01 4:43 ` Greg KH
@ 2023-08-01 19:41 ` Elson Serrao
0 siblings, 0 replies; 4+ messages in thread
From: Elson Serrao @ 2023-08-01 19:41 UTC (permalink / raw)
To: Greg KH
Cc: Surong Pang, Thinh.Nguyen, felipe.balbi, linux-usb, linux-kernel,
rogerq, Orson.Zhai, Chunyan.Zhang, Zhiyong.liu, Surong.Pang
On 7/31/2023 9:43 PM, Greg KH wrote:
> On Mon, Jul 31, 2023 at 06:33:04PM -0700, Elson Serrao wrote:
>>
>>
>> On 7/31/2023 6:15 PM, Surong Pang wrote:
>>> Pm_runtime_get is called when setting pending_events to true.
>>> Pm_runtime_put is needed for pairing with pm_runtime_get.
>>>
>>> Fixes: fc8bb91bc83e ("usb: dwc3: implement runtime PM")
>>> Signed-off-by: Surong Pang <surong.pang@unisoc.com>
>>>
>>> ---
>>> V2: add Fixes tag, fix Fixes tag
>>> ---
>>> drivers/usb/dwc3/gadget.c | 1 +
>>> 1 file changed, 1 insertion(+)
>>>
>>> diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
>>> index 5fd067151fbf..9c835c5f9928 100644
>>> --- a/drivers/usb/dwc3/gadget.c
>>> +++ b/drivers/usb/dwc3/gadget.c
>>> @@ -4720,5 +4720,6 @@ void dwc3_gadget_process_pending_events(struct dwc3 *dwc)
>>> dwc3_interrupt(dwc->irq_gadget, dwc->ev_buf);
>>> dwc->pending_events = false;
>>> enable_irq(dwc->irq_gadget);
>>> + pm_runtime_put(dwc->dev);
>>> }
>>> }
>>
>> I am already handling this change as part of below series. Will be uploading
>> a separate patch based on the feedback from Roger.
>>
>> https://lore.kernel.org/all/be57511d-2005-a1f5-d5a5-809e71029aec@quicinc.com/
>
> But this should be fixed now, and properly backported to stable kernels.
> There's no need to wait for a different patch series if this one is
> correct, right?
>
Hi Greg
I have separated this change from the series and have uploaded below
change as an independent fix. Based on the earlier feedback and
discussion, few additional modifications are needed to properly handle
pending events
https://lore.kernel.org/all/20230801192658.19275-1-quic_eserrao@quicinc.com/
Thanks
Elson
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-08-01 19:41 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-01 1:15 [PATCH V2] usb: dwc3: gadget: Let pm runtime get/put paired Surong Pang
2023-08-01 1:33 ` Elson Serrao
2023-08-01 4:43 ` Greg KH
2023-08-01 19:41 ` Elson Serrao
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox