LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* Re: [PATCH] usb: dwc2: gadget: fix missing process for isoc descriptor dma mode
2018-05-30 12:01 [PATCH] usb: dwc2: gadget: fix missing process for isoc descriptor dma mode Zeng Tao
@ 2018-05-30 7:16 ` Minas Harutyunyan
2018-05-31 1:17 ` Zengtao (B)
0 siblings, 1 reply; 3+ messages in thread
From: Minas Harutyunyan @ 2018-05-30 7:16 UTC (permalink / raw)
To: Zeng Tao, Minas.Harutyunyan; +Cc: Greg Kroah-Hartman, linux-usb, linux-kernel
Hi Zeng Tao,
On 5/30/2018 9:09 AM, Zeng Tao wrote:
> If it's the first request to queue, and we are using descriptor dma mode
> for isoc transfer, we only need to add the request to the queue, and it
> will be processed in the future nak interrupt handler.
>
> Signed-off-by: Zeng Tao <prime.zeng@hisilicon.com>
> ---
> drivers/usb/dwc2/gadget.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
> index f0d9ccf..48e3a48c 100644
> --- a/drivers/usb/dwc2/gadget.c
> +++ b/drivers/usb/dwc2/gadget.c
> @@ -1365,6 +1365,9 @@ static int dwc2_hsotg_ep_queue(struct usb_ep *ep, struct usb_request *req,
> return 0;
> }
>
> + if (using_desc_dma(hs))
> + return 0;
> +
> /* Update current frame number value. */
> hs->frame_number = dwc2_hsotg_read_frameno(hs);
> while (dwc2_gadget_target_frame_elapsed(hs_ep)) {
>
Actually it considered in "[PATCH] usb: dwc2: Change ISOC DDMA flow"
before checking is this request first or no:
+ if (using_desc_dma(hs) && hs_ep->isochronous) {
+ if (hs_ep->target_frame != TARGET_FRAME_INITIAL) {
+ dwc2_gadget_fill_isoc_desc(hs_ep, hs_req->req.dma,
+ hs_req->req.length);
+ }
return 0;
}
Thanks,
Minas
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] usb: dwc2: gadget: fix missing process for isoc descriptor dma mode
@ 2018-05-30 12:01 Zeng Tao
2018-05-30 7:16 ` Minas Harutyunyan
0 siblings, 1 reply; 3+ messages in thread
From: Zeng Tao @ 2018-05-30 12:01 UTC (permalink / raw)
To: hminas; +Cc: Zeng Tao, Greg Kroah-Hartman, linux-usb, linux-kernel
If it's the first request to queue, and we are using descriptor dma mode
for isoc transfer, we only need to add the request to the queue, and it
will be processed in the future nak interrupt handler.
Signed-off-by: Zeng Tao <prime.zeng@hisilicon.com>
---
drivers/usb/dwc2/gadget.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
index f0d9ccf..48e3a48c 100644
--- a/drivers/usb/dwc2/gadget.c
+++ b/drivers/usb/dwc2/gadget.c
@@ -1365,6 +1365,9 @@ static int dwc2_hsotg_ep_queue(struct usb_ep *ep, struct usb_request *req,
return 0;
}
+ if (using_desc_dma(hs))
+ return 0;
+
/* Update current frame number value. */
hs->frame_number = dwc2_hsotg_read_frameno(hs);
while (dwc2_gadget_target_frame_elapsed(hs_ep)) {
--
2.7.4
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH] usb: dwc2: gadget: fix missing process for isoc descriptor dma mode
2018-05-30 7:16 ` Minas Harutyunyan
@ 2018-05-31 1:17 ` Zengtao (B)
0 siblings, 0 replies; 3+ messages in thread
From: Zengtao (B) @ 2018-05-31 1:17 UTC (permalink / raw)
To: Minas Harutyunyan; +Cc: Greg Kroah-Hartman, linux-usb, linux-kernel
Hi Minus:
>-----Original Message-----
>From: Minas Harutyunyan [mailto:Minas.Harutyunyan@synopsys.com]
>Sent: Wednesday, May 30, 2018 3:17 PM
>To: Zengtao (B) <prime.zeng@hisilicon.com>;
>Minas.Harutyunyan@synopsys.com
>Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>;
>linux-usb@vger.kernel.org; linux-kernel@vger.kernel.org
>Subject: Re: [PATCH] usb: dwc2: gadget: fix missing process for isoc
>descriptor dma mode
>
>Hi Zeng Tao,
>
>On 5/30/2018 9:09 AM, Zeng Tao wrote:
>> If it's the first request to queue, and we are using descriptor dma
>> mode for isoc transfer, we only need to add the request to the queue,
>> and it will be processed in the future nak interrupt handler.
>>
>> Signed-off-by: Zeng Tao <prime.zeng@hisilicon.com>
>> ---
>> drivers/usb/dwc2/gadget.c | 3 +++
>> 1 file changed, 3 insertions(+)
>>
>> diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
>> index f0d9ccf..48e3a48c 100644
>> --- a/drivers/usb/dwc2/gadget.c
>> +++ b/drivers/usb/dwc2/gadget.c
>> @@ -1365,6 +1365,9 @@ static int dwc2_hsotg_ep_queue(struct
>usb_ep *ep, struct usb_request *req,
>> return 0;
>> }
>>
>> + if (using_desc_dma(hs))
>> + return 0;
>> +
>> /* Update current frame number value. */
>> hs->frame_number = dwc2_hsotg_read_frameno(hs);
>> while (dwc2_gadget_target_frame_elapsed(hs_ep)) {
>>
>
>Actually it considered in "[PATCH] usb: dwc2: Change ISOC DDMA flow"
>before checking is this request first or no:
Yes, it,s. Thank you for pointing it out.
>
>+ if (using_desc_dma(hs) && hs_ep->isochronous) {
>+ if (hs_ep->target_frame != TARGET_FRAME_INITIAL) {
>+ dwc2_gadget_fill_isoc_desc(hs_ep, hs_req->req.dma,
>+ hs_req->req.length);
>+ }
> return 0;
> }
>
>
>Thanks,
>Minas
Regards
Zengtao
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-05-31 1:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-30 12:01 [PATCH] usb: dwc2: gadget: fix missing process for isoc descriptor dma mode Zeng Tao
2018-05-30 7:16 ` Minas Harutyunyan
2018-05-31 1:17 ` Zengtao (B)
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).