From: Chen-Yu Yeh <chenyou910331@gmail.com>
To: Vadim Yuzifovich <vadim@yuzi.co>
Cc: gregkh@linuxfoundation.org, thinhnguyen@synopsys.com,
inochiama@gmail.com, linux-usb@vger.kernel.org,
sophgo@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 0/3] usb: dwc2: gadget: descriptor DMA fixes for BNA, found on Sophgo SG2002
Date: Thu, 26 Nov 2026 18:23:06 +0800 [thread overview]
Message-ID: <20261126102309.859777-1-chenyou910331@gmail.com> (raw)
In-Reply-To: <20261116070433.2813951-1-vadim@yuzi.co>
Hi Vadim,
I tested v2 on a Milk-V Duo 256M (SG2002), on top of 65e4fd942f72
(v7.4-rc3-406), with "p->g_dma = false;" removed from
dwc2_set_cv1800_params() and dr_mode set to "peripheral" in the board
DTS. The params file in debugfs shows g_dma 1 and g_dma_desc 1. The
gadget is a configfs composite of ECM, mass storage (a 16 MiB file) and
UAC1 with req_number 8, on an x86 host with xHCI, high speed.
Three kernels: A without the series, B with patches 1 and 2, C with all
three. On each:
- iperf3 over ECM, 60 s in each direction
- dd of the whole LUN with O_DIRECT, one write and 20 reads
- sg_turs -n 200000 on the LUN, while the board copies a 32 MiB file
in tmpfs to /dev/null in a loop
- speaker-test playing a 440 Hz sine into UAC1 for 5 minutes. After
30 s the board writes a 120-character KERN_ERR line to /dev/kmsg
every 2 s, so each line goes out on the 115200 baud serial console,
about 10 ms like the hold in your test.
A B C
iperf3 in/out Mbit/s 138/94.9 149/97.9 142/95.9
dd write/read MB/s 6.6/18.8 5.8/23.6 8.9/23.5
sg_turs per second 3432 3279 3359
UAC1 runs wedged 3 of 4 0 of 2 0 of 1
iperf3 is host to board / board to host. No retransmits, no sg_turs
errors and no dd errors on any kernel.
On A, two runs wedged within about 45 s of playback with the console
lines: speaker-test failed with -EBADFD and the host reset the port.
The third went through the 5 minutes and wedged when playback stopped.
The SET_INTERFACE to alt 0 timed out on the host (-110), and at the
port reset the board logged
dwc2_hsotg_ep_stop_xfr: timeout GINTSTS.GOUTNAKEFF
dwc2_hsotg_ep_stop_xfr: timeout DOEPCTL.EPDisable
after which the host could not enumerate the device again. Rebinding the
UDC on the board failed; only a reboot recovered it. This looks like
what you describe for patch 1, EP0 not answering after the stall, but I
cannot show the BNA itself: on A it is dev_dbg and my config has no
CONFIG_DYNAMIC_DEBUG, so the link to BNA is from the symptoms only.
On B and C no run wedged. After the console lines, arecord on the board
captured the sine, and after playback stopped the gadget was still
configured with no port reset.
On C I also ran everything together for 30 minutes: the sine, the
console lines, the copy loop, iperf3 -R for 1800 s and sg_turs
9 x 200000. iperf3 moved 11.0 GB at 52.3 Mbit/s on average with no
retransmits, sg_turs had no errors, and
the host logged no reset. Afterwards arecord on the board still
captured the sine.
The "BNA, DxEPINT" warning from patch 2 did not appear on B or C, and A
showed no bulk errors either. My copy loop is much lighter than your
H.264 encode, so patches 2 and 3 ran here without being exercised; for
those this shows only that nothing regressed. The UAC1 counts are also
small, 4, 2 and 1 runs plus the 30 minutes.
Tested-by: Chen-Yu Yeh <chenyou910331@gmail.com> # Milk-V Duo 256M
Thanks,
Chen-Yu
prev parent reply other threads:[~2026-11-26 10:23 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-16 7:04 [PATCH v2 0/3] usb: dwc2: gadget: descriptor DMA fixes for BNA, found on Sophgo SG2002 Vadim Yuzifovich
2026-11-16 7:04 ` [PATCH v2 1/3] usb: dwc2: gadget: restart descriptor DMA isochronous OUT endpoints after BNA Vadim Yuzifovich
2026-11-16 7:29 ` sashiko-bot
2026-11-16 7:04 ` [PATCH v2 2/3] usb: dwc2: gadget: restart descriptor DMA bulk and interrupt " Vadim Yuzifovich
2026-11-16 7:13 ` sashiko-bot
2026-11-16 7:04 ` [PATCH v2 3/3] usb: dwc2: gadget: make descriptors visible before the endpoint is enabled Vadim Yuzifovich
2026-11-16 7:27 ` sashiko-bot
2026-11-26 10:23 ` Chen-Yu Yeh [this message]
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=20261126102309.859777-1-chenyou910331@gmail.com \
--to=chenyou910331@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=inochiama@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=sophgo@lists.linux.dev \
--cc=thinhnguyen@synopsys.com \
--cc=vadim@yuzi.co \
/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