Re: usb: gadget: dwc2: RK3308: Transmission to EP OUT stalls at larger packet size

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





Dne 05. 02. 24 v 17:05 Minas Harutyunyan napsal(a):
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.

Interestingly, increasing req_number from 8 to 16 did not seem to have any effect on frequency of the BNAs:

[ 2444.657558] dwc2 ff400000.usb: dwc2_hsotg_epint: BNA interrupt
[ 2444.659406] dwc2 ff400000.usb: dwc2_hsotg_epint: BNA interrupt
[ 2444.683667] dwc2 ff400000.usb: dwc2_hsotg_epint: BNA interrupt
[ 2444.723693] dwc2 ff400000.usb: dwc2_hsotg_epint: BNA interrupt
[ 2444.725426] dwc2 ff400000.usb: dwc2_hsotg_epint: BNA interrupt
[ 2444.763671] dwc2 ff400000.usb: dwc2_hsotg_epint: BNA interrupt
[ 2444.783599] dwc2 ff400000.usb: dwc2_hsotg_epint: BNA interrupt
[ 2444.795679] dwc2 ff400000.usb: dwc2_hsotg_epint: BNA interrupt
[ 2444.833475] dwc2 ff400000.usb: dwc2_hsotg_epint: BNA interrupt
[ 2444.839453] dwc2 ff400000.usb: dwc2_hsotg_epint: BNA interrupt
[ 2444.917478] dwc2 ff400000.usb: dwc2_hsotg_epint: BNA interrupt
[ 2444.923416] dwc2 ff400000.usb: dwc2_hsotg_epint: BNA interrupt
[ 2444.935450] dwc2 ff400000.usb: dwc2_hsotg_epint: BNA interrupt


Another suggestion to change DMA mode from DDMA to BDMA as I suggested
in previous email.

Please what is the technical difference? I wonder why BDMA made it so worse than DDMA. Thanks!







[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux