From: Kefan Bai <baikefan@leap-io-kernel.com>
To: linux-usb@vger.kernel.org, si.yanteng@linux.dev
Cc: gregkh@linuxfoundation.org, seakeel@gmail.com, alexs@kernel.org,
dzm91@hust.edu.cn, corbet@lwn.net, skhan@linuxfoundation.org,
linux-doc@vger.kernel.org, doubled@leap-io-kernel.com
Subject: [PATCH v6 5/8] docs/zh_CN: Add dwc3.rst translation
Date: Sun, 10 May 2026 21:53:36 +0800 [thread overview]
Message-ID: <3c577322de70e143a6e57d60be7199f3b50d8a78.1778415392.git.baikefan@leap-io-kernel.com> (raw)
In-Reply-To: <cover.1778415392.git.baikefan@leap-io-kernel.com>
Translate .../usb/dwc3.rst into Chinese
Update the translation through commit ecefae6db042
("docs: usb: rename files to .rst and add them to drivers-api")
Reviewed-by: Yanteng Si <siyanteng@cqsoftware.com.cn>
Signed-off-by: Kefan Bai <baikefan@leap-io-kernel.com>
---
Documentation/translations/zh_CN/usb/dwc3.rst | 60 +++++++++++++++++++
.../translations/zh_CN/usb/index.rst | 2 +-
2 files changed, 61 insertions(+), 1 deletion(-)
create mode 100644 Documentation/translations/zh_CN/usb/dwc3.rst
diff --git a/Documentation/translations/zh_CN/usb/dwc3.rst b/Documentation/translations/zh_CN/usb/dwc3.rst
new file mode 100644
index 000000000000..92108ff8cc80
--- /dev/null
+++ b/Documentation/translations/zh_CN/usb/dwc3.rst
@@ -0,0 +1,60 @@
+.. SPDX-License-Identifier: GPL-2.0
+.. include:: ../disclaimer-zh_CN.rst
+
+:Original: Documentation/usb/dwc3.rst
+:翻译:
+
+ 白钶凡 Kefan Bai <baikefan@leap-io-kernel.com>
+
+:校译:
+
+
+
+===========
+DWC3 驱动
+===========
+
+
+待办
+~~~~~~
+
+阅读时如果想顺手认领点任务,可以从下面挑一项 :)
+
+- 将中断处理程序改为每个端点各自使用线程化 IRQ
+
+ 事实证明,有些 DWC3 命令大约需要 ``~1 ms`` 才能完成。
+ 当前代码会一直自旋等待命令完成,这种设计并不好。
+
+ 实现思路:
+
+ - DWC 核心实现了一个按端点对中断进行解复用的 IRQ 控制器。中断号在
+ 探测(``probe``)阶段分配,并归属于该设备。如果硬件通过 ``MSI`` 为每个端点
+ 提供独立中断,那么这个“虚拟”IRQ 控制器就可以被真实的端点中断取代。
+
+ - 在调用 ``usb_ep_enable()`` 时请求并分配中断资源,
+ 在调用 ``usb_ep_disable()`` 时释放中断资源。
+ 最坏情况下需要 32 个中断,最少是 ``ep0/1`` 的两个中断。
+ - ``dwc3_send_gadget_ep_cmd()`` 将在 ``wait_for_completion_timeout()``
+ 中休眠,直到命令完成。
+ - 中断处理程序分为以下几个部分:
+
+ - 设备级主中断处理程序
+ 遍历每个事件,并对其调用 ``generic_handle_irq()``。
+ 从 ``generic_handle_irq()`` 返回后,确认事件计数器,使中断最终消失。
+
+ - 设备级线程化处理程序
+ 无。
+
+ - 端点中断的主处理程序
+ 读取事件并尽量处理它。凡是需要睡眠的操作都交给线程处理。
+ 事件保存在每个端点的数据结构中。
+ 还要注意,一旦把某项工作交给线程处理,就不要再在主处理程序里处理它,
+ 以免出现优先级反转之类的问题。
+
+ - 端点中断的线程化处理程序
+ 处理剩余的端点工作,这些工作可能会睡眠,例如等待命令完成。
+
+ 延迟:
+
+ 不应增加延迟,因为中断线程具有较高优先级,会在普通用户态任务之前运行
+ (除非用户更改了调度优先级)。
diff --git a/Documentation/translations/zh_CN/usb/index.rst b/Documentation/translations/zh_CN/usb/index.rst
index 70fe33fc37d9..6d669c41d1cd 100644
--- a/Documentation/translations/zh_CN/usb/index.rst
+++ b/Documentation/translations/zh_CN/usb/index.rst
@@ -20,10 +20,10 @@ USB 支持
acm
authorization
chipidea
+ dwc3
Todolist:
-* dwc3
* ehci
* usbmon
* functionfs
--
2.54.0
next prev parent reply other threads:[~2026-05-10 14:09 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-10 13:53 [PATCH v6 0/8] Add Chinese translation for USB subsystem Kefan Bai
2026-05-10 13:53 ` [PATCH v6 1/8] docs/zh_CN: Add index.rst translation Kefan Bai
2026-05-10 13:53 ` [PATCH v6 2/8] docs/zh_CN: Add acm.rst translation Kefan Bai
2026-05-10 13:53 ` [PATCH v6 3/8] docs/zh_CN: Add authorization.rst translation Kefan Bai
2026-05-10 13:53 ` [PATCH v6 4/8] docs/zh_CN: Add chipidea.rst translation Kefan Bai
2026-05-10 13:53 ` Kefan Bai [this message]
2026-05-10 13:53 ` [PATCH v6 6/8] docs/zh_CN: Add ehci.rst translation Kefan Bai
2026-05-10 13:53 ` [PATCH v6 7/8] docs/zh_CN: Add usbmon.rst translation Kefan Bai
2026-05-10 13:53 ` [PATCH v6 8/8] docs/zh_CN: Add CREDITS translation Kefan Bai
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=3c577322de70e143a6e57d60be7199f3b50d8a78.1778415392.git.baikefan@leap-io-kernel.com \
--to=baikefan@leap-io-kernel.com \
--cc=alexs@kernel.org \
--cc=corbet@lwn.net \
--cc=doubled@leap-io-kernel.com \
--cc=dzm91@hust.edu.cn \
--cc=gregkh@linuxfoundation.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=seakeel@gmail.com \
--cc=si.yanteng@linux.dev \
--cc=skhan@linuxfoundation.org \
/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