Linux USB
 help / color / mirror / Atom feed
From: Minas Harutyunyan <Minas.Harutyunyan@synopsys.com>
To: Pavel Hofman <pavel.hofman@ivitera.com>
Cc: "linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>
Subject: Re: usb: gadget: dwc2: RK3308: Transmission to EP OUT stalls at larger packet size
Date: Mon, 5 Feb 2024 16:05:37 +0000	[thread overview]
Message-ID: <0efd145e-eacd-412d-a937-7c7a91790de7@synopsys.com> (raw)
In-Reply-To: <4c198e2b-72fe-f21c-77a0-7c011ace3c6d@ivitera.com>

Hi Pavel,

On 2/5/24 19:52, Pavel Hofman wrote:
> 
> 
> Dne 05. 02. 24 v 15:35 Pavel Hofman napsal(a):
>>
>>>
>> It really looks like some DMA performance issue. Stream 980 bytes/ 
>> 250us (bInterval=2) is bitperfect, no dropped packets. While 24 
>> bytes/125us (bInterval=1) gets stuck. IIUC the DMA is not capable of 
>> copying packets every 125us. Please is there any chance to tweak the 
>> performance to handle the 125us packets reliably?
>>
> 
> I tried increasing f_uac2 req_number/UAC2_DEF_REQ_NUM from 2 to 8 and 
> streaming seems to run stable at 125us microframes now (in both 
> directions simultaneously). Please is there any other gadget tweak which 
> could potentially reduce the risk of dropped packets? Something like 
> using plain DMA instead of desc DMA (no idea :-) )...
> 
> Thanks a lot for your expert opinion.


Yes, it's mandatory to increase f_uac2_req_number, at least 4. Obviously 
2 is not enough for descriptor list and main cause of BNA interrupt.
Another suggestion to change DMA mode from DDMA to BDMA as I suggested 
in previous email.

Thanks,
Minas

  reply	other threads:[~2024-02-05 16:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-05 13:43 usb: gadget: dwc2: RK3308: Transmission to EP OUT stalls at larger packet size Pavel Hofman
2024-02-05 14:35 ` Pavel Hofman
2024-02-05 15:40   ` Minas Harutyunyan
2024-02-05 16:12     ` Pavel Hofman
2024-02-05 15:52   ` Pavel Hofman
2024-02-05 16:05     ` Minas Harutyunyan [this message]
2024-02-05 16:20       ` Pavel Hofman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0efd145e-eacd-412d-a937-7c7a91790de7@synopsys.com \
    --to=minas.harutyunyan@synopsys.com \
    --cc=linux-usb@vger.kernel.org \
    --cc=pavel.hofman@ivitera.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox