linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yanteng Si <si.yanteng@linux.dev>
To: Kefan Bai <baikefan@leap-io-kernel.com>, alexs@kernel.org
Cc: dzm91@hust.edu.cn, corbet@lwn.net, linux-doc@vger.kernel.org,
	doubled@leap-io-kernel.com
Subject: Re: [PATCH v4 5/8] docs/zh_CN: Add dwc3.rst translation
Date: Thu, 4 Dec 2025 10:28:51 +0800	[thread overview]
Message-ID: <734e0a88-11d7-4871-a52f-d567cd970f63@linux.dev> (raw)
In-Reply-To: <f44f47ede4b63979b608b6d5c058442b1b5fa8d6.1764674650.git.baikefan@leap-io-kernel.com>


在 2025/12/2 19:56, Kefan Bai 写道:
> Translate .../usb/dwc3.rst into Chinese
>
> Update the translation through commit ecefae6db042
> ("docs: usb: rename files to .rst and add them to drivers-api")
>
> Signed-off-by: Kefan Bai <baikefan@leap-io-kernel.com>、

Reviewed-by: Yanteng Si <siyanteng@cqsoftware.com.cn>


Thanks,

Yanteng

> ---
>   Documentation/translations/zh_CN/usb/dwc3.rst | 60 +++++++++++++++++++
>   1 file changed, 60 insertions(+)
>   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..700aee545559
> --- /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命令大约需要~1ms才能完成。
> +  当前代码会一直自旋等待命令完成,这是不好的设计。
> +
> +  实现思路:
> +
> +  - DWC core实现了一个用于按端点解复用中断的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()返回后,确认事件计数器,最终完成中断处理。
> +
> +    - 设备的中断处理线程
> +      无
> +
> +    - EP中断的处理主程序
> +      读取事件并尝试处理它。所有需要休眠的操作都交给线程处理。
> +      事件保存在每个端点的数据结构中。
> +      需要注意:一旦把事件交给线程去处理,就要注意不要自己再去处理它,
> +      否则可能会导致低优先级的事件先于高优先级事件被处理。
> +
> +    - EP中断的处理线程
> +      处理剩余的EP工作,这些工作可能会导致休眠,例如等待命令完成。
> +
> +  延迟:
> +
> +   不应该增加延迟,因为中断线程具有较高优先级,会在用户空间普通任务之前运行
> +   (除非用户更改了调度优先级)。
> --
> 2.52.0
>

  reply	other threads:[~2025-12-04  2:29 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-02 11:56 [PATCH v4 0/8] Add Chinese translation for USB subsystem Kefan Bai
2025-12-02 11:56 ` [PATCH v4 1/8] docs/zh_CN: Add index.rst translation Kefan Bai
2025-12-03  2:34   ` Yanteng Si
2025-12-05  7:24     ` BaiKefan
2025-12-02 11:56 ` [PATCH v4 2/8] docs/zh_CN: Add acm.rst translation Kefan Bai
2025-12-02 11:56 ` [PATCH v4 3/8] docs/zh_CN: Add authorization.rst translation Kefan Bai
2025-12-03  2:29   ` Yanteng Si
2025-12-02 11:56 ` [PATCH v4 4/8] docs/zh_CN: Add chipidea.rst translation Kefan Bai
2025-12-03  5:31   ` Yanteng Si
2025-12-02 11:56 ` [PATCH v4 5/8] docs/zh_CN: Add dwc3.rst translation Kefan Bai
2025-12-04  2:28   ` Yanteng Si [this message]
2025-12-02 11:56 ` [PATCH v4 6/8] docs/zh_CN: Add ehci.rst translation Kefan Bai
2025-12-04  2:35   ` Yanteng Si
2025-12-02 11:56 ` [PATCH v4 7/8] docs/zh_CN: Add usbmon.rst translation Kefan Bai
2025-12-04  2:47   ` Yanteng Si
2025-12-02 11:56 ` [PATCH v4 8/8] docs/zh_CN: Add CREDITS translation Kefan Bai
2025-12-04  2:51   ` Yanteng Si
2025-12-04  2:41 ` [PATCH v4 0/8] Add Chinese translation for USB subsystem Yanteng Si
2025-12-05 10:01   ` BaiKefan
2025-12-05 12:10     ` Alex Shi

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=734e0a88-11d7-4871-a52f-d567cd970f63@linux.dev \
    --to=si.yanteng@linux.dev \
    --cc=alexs@kernel.org \
    --cc=baikefan@leap-io-kernel.com \
    --cc=corbet@lwn.net \
    --cc=doubled@leap-io-kernel.com \
    --cc=dzm91@hust.edu.cn \
    --cc=linux-doc@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).