linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] usb: dwc3: gadget: let pm runtime get/put paired
@ 2023-07-27  0:51 Surong Pang
  2023-07-27  8:18 ` Greg KH
  0 siblings, 1 reply; 13+ messages in thread
From: Surong Pang @ 2023-07-27  0:51 UTC (permalink / raw)
  To: Thinh.Nguyen, gregkh, linux-usb, linux-kernel
  Cc: Orson.Zhai, 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.

Signed-off-by: Surong Pang <surong.pang@unisoc.com>
---
 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

________________________________
 This email (including its attachments) is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. Unauthorized use, dissemination, distribution or copying of this email or the information herein or taking any action in reliance on the contents of this email or the information herein, by anyone other than the intended recipient, or an employee or agent responsible for delivering the message to the intended recipient, is strictly prohibited. If you are not the intended recipient, please do not read, copy, use or disclose any part of this e-mail to others. Please notify the sender immediately and permanently delete this e-mail and any attachments if you received it in error. Internet communications cannot be guaranteed to be timely, secure, error-free or virus-free. The sender does not accept liability for any errors or omissions.
本邮件及其附件具有保密性质,受法律保护不得泄露,仅发送给本邮件所指特定收件人。严禁非经授权使用、宣传、发布或复制本邮件或其内容。若非该特定收件人,请勿阅读、复制、 使用或披露本邮件的任何内容。若误收本邮件,请从系统中永久性删除本邮件及所有附件,并以回复邮件的方式即刻告知发件人。无法保证互联网通信及时、安全、无误或防毒。发件人对任何错漏均不承担责任。

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [PATCH] usb: dwc3: gadget: let pm runtime get/put paired
  2023-07-27  0:51 Surong Pang
@ 2023-07-27  8:18 ` Greg KH
  0 siblings, 0 replies; 13+ messages in thread
From: Greg KH @ 2023-07-27  8:18 UTC (permalink / raw)
  To: Surong Pang
  Cc: Thinh.Nguyen, linux-usb, linux-kernel, Orson.Zhai, Zhiyong.liu,
	Surong.Pang

On Thu, Jul 27, 2023 at 08:51:50AM +0800, Surong Pang wrote:
> ________________________________
>  This email (including its attachments) is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. Unauthorized use, dissemination, distribution or copying of this email or the information herein or taking any action in reliance on the contents of this email or the information herein, by anyone other than the intended recipient, or an employee or agent responsible for delivering the message to the intended recipient, is strictly prohibited. If you are not the intended recipient, please do not read, copy, use or disclose any part of this e-mail to others. Please notify the sender immediately and permanently delete this e-mail and any attachments if you received it in error. Internet communications cannot be guaranteed to be timely, secure, error-free or virus-free. The sender does not accept liability for any errors or omissions.
> 本邮件及其附件具有保密性质,受法律保护不得泄露,仅发送给本邮件所指特定收件人。严禁非经授权使用、宣传、发布或复制本邮件或其内容。若非该特定收件人,请勿阅读、复制、 使用或披露本邮件的任何内容。若误收本邮件,请从系统中永久性删除本邮件及所有附件,并以回复邮件的方式即刻告知发件人。无法保证互联网通信及时、安全、无误或防毒。发件人对任何错漏均不承担责任。

Now deleted.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH] usb: dwc3: gadget: let pm runtime get/put paired
@ 2023-07-28  7:39 Surong Pang
  2023-07-28 10:45 ` Greg KH
  0 siblings, 1 reply; 13+ messages in thread
From: Surong Pang @ 2023-07-28  7:39 UTC (permalink / raw)
  To: Thinh.Nguyen, gregkh, linux-usb, linux-kernel
  Cc: Orson.Zhai, 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.

Signed-off-by: Surong Pang <surong.pang@unisoc.com>
---
 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] 13+ messages in thread

* Re: [PATCH] usb: dwc3: gadget: let pm runtime get/put paired
  2023-07-28  7:39 [PATCH] usb: dwc3: gadget: let " Surong Pang
@ 2023-07-28 10:45 ` Greg KH
  2023-07-29  8:43   ` surong pang
  0 siblings, 1 reply; 13+ messages in thread
From: Greg KH @ 2023-07-28 10:45 UTC (permalink / raw)
  To: Surong Pang
  Cc: Thinh.Nguyen, linux-usb, linux-kernel, Orson.Zhai, Zhiyong.liu,
	Surong.Pang

On Fri, Jul 28, 2023 at 03:39:19PM +0800, 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.
> 
> Signed-off-by: Surong Pang <surong.pang@unisoc.com>
> ---
>  drivers/usb/dwc3/gadget.c | 1 +
>  1 file changed, 1 insertion(+)

What commit id does this fix?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] usb: dwc3: gadget: let pm runtime get/put paired
  2023-07-28 10:45 ` Greg KH
@ 2023-07-29  8:43   ` surong pang
  2023-07-30 11:24     ` Greg KH
  0 siblings, 1 reply; 13+ messages in thread
From: surong pang @ 2023-07-29  8:43 UTC (permalink / raw)
  To: Greg KH
  Cc: Surong Pang, Thinh.Nguyen, linux-usb, linux-kernel, Orson.Zhai,
	Zhiyong.liu

Dear Greg,
The commit id is aad1a9ff2f53b8d5cde9ea07e1fd7eb7c20171ce

On Fri, Jul 28, 2023 at 6:46 PM Greg KH <gregkh@linuxfoundation.org> wrote:
>
> On Fri, Jul 28, 2023 at 03:39:19PM +0800, 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.
> >
> > Signed-off-by: Surong Pang <surong.pang@unisoc.com>
> > ---
> >  drivers/usb/dwc3/gadget.c | 1 +
> >  1 file changed, 1 insertion(+)
>
> What commit id does this fix?
>
> thanks,
>
> greg k-h

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] usb: dwc3: gadget: let pm runtime get/put paired
  2023-07-29  8:43   ` surong pang
@ 2023-07-30 11:24     ` Greg KH
  0 siblings, 0 replies; 13+ messages in thread
From: Greg KH @ 2023-07-30 11:24 UTC (permalink / raw)
  To: surong pang
  Cc: Surong Pang, Thinh.Nguyen, linux-usb, linux-kernel, Orson.Zhai,
	Zhiyong.liu

On Sat, Jul 29, 2023 at 04:43:13PM +0800, surong pang wrote:
> Dear Greg,
> The commit id is aad1a9ff2f53b8d5cde9ea07e1fd7eb7c20171ce

Wonderful, please resend with the proper Fixes: tag in the patch and we
will be glad to queue it up.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH] usb: dwc3: gadget: Let pm runtime get/put paired
@ 2023-07-31  2:33 Surong Pang
  2023-08-01  0:49 ` Thinh Nguyen
  0 siblings, 1 reply; 13+ messages in thread
From: Surong Pang @ 2023-07-31  2:33 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: fc8bb91bc83ef ("usb: dwc3: implement runtime PM")
Signed-off-by: Surong Pang <surong.pang@unisoc.com>
---
 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] 13+ messages in thread

* Re: [PATCH] usb: dwc3: gadget: Let pm runtime get/put paired
  2023-07-31  2:33 [PATCH] usb: dwc3: gadget: Let pm runtime get/put paired Surong Pang
@ 2023-08-01  0:49 ` Thinh Nguyen
  2023-08-01  4:44   ` gregkh
  0 siblings, 1 reply; 13+ messages in thread
From: Thinh Nguyen @ 2023-08-01  0:49 UTC (permalink / raw)
  To: Surong Pang
  Cc: Thinh Nguyen, gregkh@linuxfoundation.org,
	felipe.balbi@linux.intel.com, linux-usb@vger.kernel.org,
	linux-kernel@vger.kernel.org, Orson.Zhai@unisoc.com,
	Chunyan.Zhang@unisoc.com, Zhiyong.liu@unisoc.com,
	Surong.Pang@gmail.com

Hi,

On Mon, Jul 31, 2023, 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: fc8bb91bc83ef ("usb: dwc3: implement runtime PM")

Please fix your Fixes tag. Run checkpatch.pl before submit.

Thanks,
Thinh

> Signed-off-by: Surong Pang <surong.pang@unisoc.com>
> ---
>  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	[flat|nested] 13+ messages in thread

* [PATCH] usb: dwc3: gadget: Let pm runtime get/put paired
@ 2023-08-01  0:56 Surong Pang
  2023-08-01  1:06 ` Thinh Nguyen
  0 siblings, 1 reply; 13+ messages in thread
From: Surong Pang @ 2023-08-01  0:56 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>
---
 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] 13+ messages in thread

* Re: [PATCH] usb: dwc3: gadget: Let pm runtime get/put paired
  2023-08-01  0:56 Surong Pang
@ 2023-08-01  1:06 ` Thinh Nguyen
  0 siblings, 0 replies; 13+ messages in thread
From: Thinh Nguyen @ 2023-08-01  1:06 UTC (permalink / raw)
  To: Surong Pang
  Cc: Thinh Nguyen, gregkh@linuxfoundation.org,
	felipe.balbi@linux.intel.com, linux-usb@vger.kernel.org,
	linux-kernel@vger.kernel.org, Orson.Zhai@unisoc.com,
	Chunyan.Zhang@unisoc.com, Zhiyong.liu@unisoc.com,
	Surong.Pang@gmail.com

On Tue, Aug 01, 2023, 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>
> ---
>  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
> 

You need to properly increment the patch version every new submission
and note what are the new changes. Otherwise Greg won't know which patch
to pick up. Please resubmit at least v2 with note of the changes.

Thanks,
Thinh

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] usb: dwc3: gadget: Let pm runtime get/put paired
  2023-08-01  0:49 ` Thinh Nguyen
@ 2023-08-01  4:44   ` gregkh
  2023-08-01 23:56     ` Thinh Nguyen
  0 siblings, 1 reply; 13+ messages in thread
From: gregkh @ 2023-08-01  4:44 UTC (permalink / raw)
  To: Thinh Nguyen
  Cc: Surong Pang, felipe.balbi@linux.intel.com,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	Orson.Zhai@unisoc.com, Chunyan.Zhang@unisoc.com,
	Zhiyong.liu@unisoc.com, Surong.Pang@gmail.com

On Tue, Aug 01, 2023 at 12:49:24AM +0000, Thinh Nguyen wrote:
> Hi,
> 
> On Mon, Jul 31, 2023, 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: fc8bb91bc83ef ("usb: dwc3: implement runtime PM")
> 
> Please fix your Fixes tag. Run checkpatch.pl before submit.

I don't see what's wrong with it, one extra character is just fine.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] usb: dwc3: gadget: Let pm runtime get/put paired
  2023-08-01  4:44   ` gregkh
@ 2023-08-01 23:56     ` Thinh Nguyen
  2023-08-04 12:38       ` gregkh
  0 siblings, 1 reply; 13+ messages in thread
From: Thinh Nguyen @ 2023-08-01 23:56 UTC (permalink / raw)
  To: gregkh@linuxfoundation.org
  Cc: Thinh Nguyen, Surong Pang, felipe.balbi@linux.intel.com,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	Orson.Zhai@unisoc.com, Chunyan.Zhang@unisoc.com,
	Zhiyong.liu@unisoc.com, Surong.Pang@gmail.com

On Tue, Aug 01, 2023, gregkh@linuxfoundation.org wrote:
> On Tue, Aug 01, 2023 at 12:49:24AM +0000, Thinh Nguyen wrote:
> > Hi,
> > 
> > On Mon, Jul 31, 2023, 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: fc8bb91bc83ef ("usb: dwc3: implement runtime PM")
> > 
> > Please fix your Fixes tag. Run checkpatch.pl before submit.
> 
> I don't see what's wrong with it, one extra character is just fine.
> 

This inconsistency bugs me a bit. :)

It's noted in the kernel documentation that it should be tagged with the
first 12 char of the commit id, and the checkpatch also complaints when
it's not.

Just trying to be consistent and request to run for checkpatch and fix
these things. If these issues should be ignored, I'll keep it in mind...

BR,
Thinh

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] usb: dwc3: gadget: Let pm runtime get/put paired
  2023-08-01 23:56     ` Thinh Nguyen
@ 2023-08-04 12:38       ` gregkh
  0 siblings, 0 replies; 13+ messages in thread
From: gregkh @ 2023-08-04 12:38 UTC (permalink / raw)
  To: Thinh Nguyen
  Cc: Surong Pang, felipe.balbi@linux.intel.com,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	Orson.Zhai@unisoc.com, Chunyan.Zhang@unisoc.com,
	Zhiyong.liu@unisoc.com, Surong.Pang@gmail.com

On Tue, Aug 01, 2023 at 11:56:26PM +0000, Thinh Nguyen wrote:
> On Tue, Aug 01, 2023, gregkh@linuxfoundation.org wrote:
> > On Tue, Aug 01, 2023 at 12:49:24AM +0000, Thinh Nguyen wrote:
> > > Hi,
> > > 
> > > On Mon, Jul 31, 2023, 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: fc8bb91bc83ef ("usb: dwc3: implement runtime PM")
> > > 
> > > Please fix your Fixes tag. Run checkpatch.pl before submit.
> > 
> > I don't see what's wrong with it, one extra character is just fine.
> > 
> 
> This inconsistency bugs me a bit. :)
> 
> It's noted in the kernel documentation that it should be tagged with the
> first 12 char of the commit id, and the checkpatch also complaints when
> it's not.

Fair enough, consistency is good.

greg k-h

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2023-08-04 12:38 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-31  2:33 [PATCH] usb: dwc3: gadget: Let pm runtime get/put paired Surong Pang
2023-08-01  0:49 ` Thinh Nguyen
2023-08-01  4:44   ` gregkh
2023-08-01 23:56     ` Thinh Nguyen
2023-08-04 12:38       ` gregkh
  -- strict thread matches above, loose matches on Subject: below --
2023-08-01  0:56 Surong Pang
2023-08-01  1:06 ` Thinh Nguyen
2023-07-28  7:39 [PATCH] usb: dwc3: gadget: let " Surong Pang
2023-07-28 10:45 ` Greg KH
2023-07-29  8:43   ` surong pang
2023-07-30 11:24     ` Greg KH
2023-07-27  0:51 Surong Pang
2023-07-27  8:18 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).