Add Chinese translation for USB subsystem
Subsystems (3)
v5 cover Add Chinese translation for USB subsystem
This patch set adds Chinese translations for the USB documentation.
Changes in v5:
- Ensuring that the index.rst entries, including acm, authorization, chipidea, dwc3, ehci, and usbmon, are placed in the correct patches to prevent build errors when patches are applied individually.
- Remove extra spaces in chipidea.rst.
- Send these translation patches to [email protected] for review by Chinese-speaking developers, per Alex and Yanteng's recommendation.
Changes in v4:
- shorten those overlong title underline/overline symbols
- Remove CREDITS section from index.rst
- Link to v4: https://lore.kernel.org/all/[email protected]/
Changes in v3:
- Updated the signoff to my full legal name,
as requested by Jonathan Corbet.
- Reviewed and fixed the RST syntax to resolve the patch issues
noted by Alex Shi.
- Kept the number of translated files to eight
to make submission and review smoother.
- Link to v3: https://lore.kernel.org/all/[email protected]/
Changes in v2:
- Update [PATCH 01/25] docs/zh_CN: Add index.rst translation
to include corresponding updates in Documentation/translations/zh_CN/subsystem-apis.rst.
- Link to v2: https://lore.kernel.org/all/[email protected]/
v1:
- Link: https://lore.kernel.org/all/[email protected]/
Kefan Bai (8):
docs/zh_CN: Add index.rst translation
docs/zh_CN: Add acm.rst translation
docs/zh_CN: Add authorization.rst translation
docs/zh_CN: Add chipidea.rst translation
docs/zh_CN: Add dwc3.rst translation
docs/zh_CN: Add ehci.rst translation
docs/zh_CN: Add usbmon.rst translation
docs/zh_CN: Add CREDITS translation
.../translations/zh_CN/subsystem-apis.rst | 2 +- Documentation/translations/zh_CN/usb/CREDITS | 153 +++++++ Documentation/translations/zh_CN/usb/acm.rst | 137 +++++++ .../translations/zh_CN/usb/authorization.rst | 125 ++++++ .../translations/zh_CN/usb/chipidea.rst | 142 +++++++ Documentation/translations/zh_CN/usb/dwc3.rst | 60 +++ Documentation/translations/zh_CN/usb/ehci.rst | 216 ++++++++++ .../translations/zh_CN/usb/index.rst | 54 +++ .../translations/zh_CN/usb/usbmon.rst | 380 ++++++++++++++++++ 9 files changed, 1268 insertions(+), 1 deletion(-) create mode 100644 Documentation/translations/zh_CN/usb/CREDITS create mode 100644 Documentation/translations/zh_CN/usb/acm.rst create mode 100644 Documentation/translations/zh_CN/usb/authorization.rst create mode 100644 Documentation/translations/zh_CN/usb/chipidea.rst create mode 100644 Documentation/translations/zh_CN/usb/dwc3.rst create mode 100644 Documentation/translations/zh_CN/usb/ehci.rst create mode 100644 Documentation/translations/zh_CN/usb/index.rst create mode 100644 Documentation/translations/zh_CN/usb/usbmon.rst
--
2.52.0
PATCH v5 1/8 docs/zh_CN: Add index.rst translation
Translate .../usb/index.rst into Chinese and update subsystem-apis.rst
Update the translation through commit c26cee817f8b ("usb: gadget: f_fs: add capability for dfu functional descriptor")
--- .../translations/zh_CN/subsystem-apis.rst | 2 +- .../translations/zh_CN/usb/index.rst | 54 +++++++++++++++++++ 2 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 Documentation/translations/zh_CN/usb/index.rst
Documentation/translations/zh_CN/subsystem-apis.rst +1 -1
@@ -90,6 +90,7 @@ TODOList: security/index PCI/index peci/index + usb/index TODOList:
@@ -104,6 +105,5 @@ TODOList: * accel/index * crypto/index * bpf/index -* usb/index * misc-devices/index * wmi/index
Documentation/translations/zh_CN/usb/index.rst new file +54 -0
54 lines not on this page · raw message
--
2.52.0
Re: [PATCH v5 1/8] docs/zh_CN: Add index.rst translation
Quoted 6 lines · Kefan Bai
Translate
.../usb/index.rstinto Chinese and updatesubsystem-apis.rstUpdate the translation through commit
c26cee817f8b("usb: gadget:f_fs: add capability for dfu functional descriptor")Signed-off-by Kefan Bai <[email protected]>
Thanks,
Yanteng
Quoted 88 lines
--- .../translations/zh_CN/subsystem-apis.rst | 2 +- .../translations/zh_CN/usb/index.rst | 54 +++++++++++++++++++ 2 files changed, 55 insertions(+), 1 deletion(-)create mode 100644
Documentation/translations/zh_CN/usb/index.rstDocumentation/translations/zh_CN/subsystem-apis.rst +1
-1@@ -90,6 +90,7 @@ TODOList: security/index PCI/index peci/index + usb/index TODOList:@@ -104,6 +105,5 @@ TODOList: * accel/index * crypto/index * bpf/index -* usb/index * misc-devices/index * wmi/indexDocumentation/translations/zh_CN/usb/index.rst new file +54
-1@@ -0,0 +1,54 @@ +.. SPDX-License-Identifier: GPL-2.0 +.. include:: ../disclaimer-zh_CN.rst + +:Original: Documentation/usb/index.rst +:翻译: + + 白钶凡 Kefan Bai <[email protected]> + +:校译: + + + +=========== +USB 支持 +=========== + +.. toctree:: + :maxdepth: 1 + + +Todolist: + +* acm +* authorization +* chipidea +* dwc3 +* ehci +* usbmon +* functionfs +* functionfs-desc +* gadget_configfs +* gadget_hid +* gadget_multi +* gadget_printer +* gadget_serial +* gadget_uvc +* gadget-testing +* iuu_phoenix +* mass-storage +* misc_usbsevseg +* mtouchusb +* ohci +* raw-gadget +* usbip_protocol +* usb-serial +* usb-help +* text_files + +.. only:: subproject and html + + 索引 + ======= + + * :ref:`genindex` --2.52.0
PATCH v5 2/8 docs/zh_CN: Add acm.rst translation
In reply to Kefan BaiTranslate .../usb/acm.rst into Chinese
Update the translation through commit ecefae6db042 ("docs: usb: rename files to .rst and add them to drivers-api")
--- Documentation/translations/zh_CN/usb/acm.rst | 137 ++++++++++++++++++ .../translations/zh_CN/usb/index.rst | 2 +- 2 files changed, 138 insertions(+), 1 deletion(-) create mode 100644 Documentation/translations/zh_CN/usb/acm.rst
Documentation/translations/zh_CN/usb/acm.rst new file +137 -0
@@ -0,0 +1,137 @@ +.. SPDX-License-Identifier: GPL-2.0 +.. include:: ../disclaimer-zh_CN.rst + +:Original: Documentation/usb/acm.rst + +:翻译: + + 白钶凡 Kefan Bai <[email protected]> + +:校译: + + +====================== +Linux ACM驱动 v0.16 +====================== + +版权所有(c) 1999 Vojtech Pavlik <[email protected]> + +由SuSE赞助 + +0. 免责声明 +~~~~~~~~~~~~~ +本程序是自由软件;您可以使用自由软件基金会发布的第2版GNU通用公共许可证, +或由您选择任何更高版本的许可证,对本程序进行再发布和/或修改。 + +我们希望本程序有用,但不提供任何担保;甚至不包含对适销性或适用于特定目的的默示性担保。 +更多细节请参阅GNU通用公共许可证。 + +您应该已经随本程序收到GNU通用公共许可证副本; +如果没有,请写信至:Free Software Foundation, Inc., 59 +Temple Place, Suite 330, Boston, MA 02111-1307 USA。 + +如需联系作者,可通过电子邮件发送消息至 [email protected], +或通过纸质邮件寄至: +Vojtech Pavlik, Ucitelska 1576, Prague 8, 182 00, Czech Republic。 + +为方便起见,本软件包中已包含GNU通用公共许可证第2版:参见文件COPYING。 + +1. 使用方法 +~~~~~~~~~~~~~ +drivers/usb/class/cdc-acm.c驱动可用于USB调制解调器和USB ISDN终端适配器, +这些设备符合USB通用串行总线通信设备类(Universal Serial Bus +Communication Device Class)的抽象控制模型(Abstract Control Model, +USB CDC ACM)规范。 + +许多调制解调器支持此驱动,以下是我所知道的一些型号: + + - 3Com OfficeConnect 56k + - 3Com Voice FaxModem Pro + - 3Com Sportster + - MultiTech MultiModem 56k + - Zoom 2986L FaxModem + - Compaq 56k FaxModem + - ELSA Microlink 56k + +我知道有一款ISDN终端适配器可以与ACM驱动一起使用: + + - 3Com USR ISDN Pro TA + +一些手机也可以通过USB连接。我知道以下机型可以正常工作: + + - SonyEricsson K800i + +不幸的是,许多调制解调器以及大多数ISDN终端适配器使用专有接口, +因此无法与此驱动兼容。购买前请确认设备是否符合ACM规范。 + +要使用调制解调器,您需要加载以下模块: + + usbcore.ko + uhci-hcd.ko ohci-hcd.ko or ehci-hcd.ko + cdc-acm.ko + +之后,调制解调器应该可以正常访问。 +你应该能够使用minicom、ppp和mgetty与它们进行通信。 + +2. 验证驱动是否正常工作 +~~~~~~~~~~~~~~~~~~~~~~~~ + +第一步是检查/sys/kernel/debug/usb/devices,其内容应该和下面这些类似:: + + T: Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=12 MxCh= 2 + B: Alloc= 0/900 us ( 0%), #Int= 0, #Iso= 0 + D: Ver= 1.00 Cls=09(hub ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1 + P: Vendor=0000 ProdID=0000 Rev= 0.00 + S: Product=USB UHCI Root Hub + S: SerialNumber=6800 + C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr= 0mA + I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub + E: Ad=81(I) Atr=03(Int.) MxPS= 8 Ivl=255ms + T: Bus=01 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 2 Spd=12 MxCh= 0 + D: Ver= 1.00 Cls=02(comm.) Sub=00 Prot=00 MxPS= 8 #Cfgs= 2 + P: Vendor=04c1 ProdID=008f Rev= 2.07 + S: Manufacturer=3Com Inc. + S: Product=3Com U.S. Robotics Pro ISDN TA + S: SerialNumber=UFT53A49BVT7 + C: #Ifs= 1 Cfg#= 1 Atr=60 MxPwr= 0mA + I: If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=acm + E: Ad=85(I) Atr=02(Bulk) MxPS= 64 Ivl= 0ms + E: Ad=04(O) Atr=02(Bulk) MxPS= 64 Ivl= 0ms + E: Ad=81(I) Atr=03(Int.) MxPS= 16 Ivl=128ms + C:* #Ifs= 2 Cfg#= 2 Atr=60 MxPwr= 0mA + I: If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=02 Prot=01 Driver=acm + E: Ad=81(I) Atr=03(Int.) MxPS= 16 Ivl=128ms + I: If#= 1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=acm + E: Ad=85(I) Atr=02(Bulk) MxPS= 64 Ivl= 0ms + E: Ad=04(O) Atr=02(Bulk) MxPS= 64 Ivl= 0ms + +其中以下三行(以及 Cls= 'comm' 和 'data' 类)非常重要,它们表示这是一个ACM设备。 +Driver=acm表示acm驱动正在处理该设备。 +如果只看到Cls=ff(vend.),那么很不幸,这是一个厂商自定义接口设备:: + + D: Ver= 1.00 Cls=02(comm.) Sub=00 Prot=00 MxPS= 8 #Cfgs= 2 + I: If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=02 Prot=01 Driver=acm + I: If#= 1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=acm + +在系统日志中你应该看到:: + + usb.c: USB new device connect, assigned device number 2 + usb.c: kmalloc IF c7691fa0, numif 1 + usb.c: kmalloc IF c7b5f3e0, numif 2 + usb.c: skipped 4 class/vendor specific interface descriptors + usb.c: new device strings: Mfr=1, Product=2, SerialNumber=3 + usb.c: USB device number 2 default language ID 0x409 + Manufacturer: 3Com Inc. + Product: 3Com U.S. Robotics Pro ISDN TA + SerialNumber: UFT53A49BVT7 + acm.c: probing config 1 + acm.c: probing config 2 + ttyACM0: USB ACM device + acm.c: acm_control_msg: rq: 0x22 val: 0x0 len: 0x0 result: 0 + acm.c: acm_control_msg: rq: 0x20 val: 0x0 len: 0x7 result: 7 + usb.c: acm driver claimed interface c7b5f3e0 + usb.c: acm driver claimed interface c7b5f3f8 + usb.c: acm driver claimed interface c7691fa0 + +如果以上都正常,请启动minicom,将其设置为连接ttyACM设备,然后输入'at'。 +如果响应 "OK",则说明一切工作正常。
Documentation/translations/zh_CN/usb/index.rst +1 -1
@@ -17,10 +17,10 @@ USB 支持 .. toctree:: :maxdepth: 1 + acm Todolist: -* acm * authorization * chipidea * dwc3
--
2.52.0
PATCH v5 3/8 docs/zh_CN: Add authorization.rst translation
In reply to Kefan BaiTranslate .../usb/authorization.rst into Chinese
Update the translation through commit f176638af476 ("USB: Remove Wireless USB and UWB documentation")
--- .../translations/zh_CN/usb/authorization.rst | 125 ++++++++++++++++++ .../translations/zh_CN/usb/index.rst | 2 +- 2 files changed, 126 insertions(+), 1 deletion(-) create mode 100644 Documentation/translations/zh_CN/usb/authorization.rst
Documentation/translations/zh_CN/usb/authorization.rst new file +125 -0
@@ -0,0 +1,125 @@ +.. SPDX-License-Identifier: GPL-2.0 +.. include:: ../disclaimer-zh_CN.rst + +:Original: Documentation/usb/authorization.rst +:翻译: + + 白钶凡 Kefan Bai <[email protected]> + +:校译: + + +=========================== +授权或禁止USB设备连接到系统 +=========================== + +版权 (C) 2007 Inaky Perez-Gonzalez <[email protected]> 英特尔公司 + +此功能允许你控制系统中USB设备的使用权限。 +你可以借此实现USB设备的锁定,并由用户空间完全控制。 + +目前为止,当插入一个USB设备时,系统会配置该USB设备,其接口会立即对用户开放。 +通过此修改,只有在root授权配置设备后,用户才能使用它。 + + +使用方法 +========= + +授权设备连接:: + + $ echo 1 > /sys/bus/usb/devices/DEVICE/authorized + +禁止设备连接:: + $ echo 0 > /sys/bus/usb/devices/DEVICE/authorized + +将新连接到hostX的设备默认设置为未授权(即:锁定):: + + $ echo 0 > /sys/bus/usb/devices/usbX/authorized_default + +解除锁定:: + + $ echo 1 > /sys/bus/usb/devices/usbX/authorized_default + +默认情况下,所有USB设备都是授权的。 +向authorized_default属性写入 "2" 会使内核默认只授权连接到内部USB端口的设备。 + +系统锁定示例(简单示例) +------------------------ + +假设你想实现一个锁定功能,要求只有类型为XYZ的设备可以连接 +(例如,它是一个带有可见USB端口的自助服务终端):: + + 启动系统 + rc.local -> + + for host in /sys/bus/usb/devices/usb* + do + echo 0 > $host/authorized_default + done + +将一个脚本挂接到udev,当插入新的USB设备时,该脚本就会被自动触发:: + + if device_is_my_type $DEV + then + echo 1 > $device_path/authorized + done + + +这里的device_is_my_type()就是实现锁定的关键所在。 +仅仅检查class、type 和protocol是否匹配某个值, +是最差的安全验证方式(但对于想要破解的人却是最容易的)。 +如果你需要真正安全的方案,应使用加密、证书认证等手段。 +一个针对存储密钥的简单示例:: + + function device_is_my_type() + { + echo 1 > authorized # 暂时授权它 + # FIXME: 确保没有人能够挂载它 + mount DEVICENODE /mntpoint + sum=$(md5sum /mntpoint/.signature) + if [ $sum = $(cat /etc/lockdown/keysum) ] + then + echo "We are good, connected" + umount /mntpoint + # 添加一些额外的内容,以便其他人也可以使用它 + else + echo 0 > authorized + fi + } + + +当然,这种做法很简陋;实际上你应该使用基于PKI的真正证书验证, +这样就不会依赖共享密钥之类的东西。不过你明白我的意思。 +任何拿到设备仿真工具包的人都能伪造描述符和设备信息。 +所以千万不要信任这些信息。 + +接口授权 +-------- + +也有类似的方法用于允许或拒绝特定USB接口。这允许只阻止USB设备的一个子集。 + +授权接口:: + + $ echo 1 > /sys/bus/usb/devices/INTERFACE/authorized + +取消授权接口:: + + $ echo 0 > /sys/bus/usb/devices/INTERFACE/authorized + +也可以更改新接口在特定USB总线上的默认值。 + +默认允许接口:: + + $ echo 1 > /sys/bus/usb/devices/usbX/interface_authorized_default + +默认拒绝接口:: + $ echo 0 > /sys/bus/usb/devices/usbX/interface_authorized_default + +默认情况下,interface_authorized_default位为1。 +因此,所有接口默认都是授权的。 + +注意: + 如果要对一个未授权的接口进行授权,则必须通过将INTERFACE写入 + /sys/bus/usb/drivers_probe来手动触发驱动程序进行探测。 + 对于使用多个接口的驱动程序,需要先对所有使用的接口进行授权。 + 之后应探测驱动程序。这样做可以避免副作用。
Documentation/translations/zh_CN/usb/index.rst +1 -1
@@ -18,10 +18,10 @@ USB 支持 :maxdepth: 1 acm + authorization Todolist: -* authorization * chipidea * dwc3 * ehci
--
2.52.0
PATCH v5 4/8 docs/zh_CN: Add chipidea.rst translation
In reply to Kefan BaiTranslate .../usb/chipidea.rst into Chinese
Update the translation through commit e4157519ad46 ("Documentation: usb: correct spelling")
--- .../translations/zh_CN/usb/chipidea.rst | 142 ++++++++++++++++++ .../translations/zh_CN/usb/index.rst | 2 +- 2 files changed, 143 insertions(+), 1 deletion(-) create mode 100644 Documentation/translations/zh_CN/usb/chipidea.rst
Documentation/translations/zh_CN/usb/chipidea.rst new file +142 -0
@@ -0,0 +1,142 @@ +.. SPDX-License-Identifier: GPL-2.0 +.. include:: ../disclaimer-zh_CN.rst + +:Original: Documentation/usb/chipidea.rst +:翻译: + + 白钶凡 Kefan Bai <[email protected]> + +:校译: + + + +============================= +ChipIdea高速双角色控制器驱动 +============================= + +1. 如何测试OTG FSM(HNP 和 SRP) +-------------------------------- + +接下来我们在两块Freescale i.MX6Q Sabre SD开发板上,演示如何通过sys输入文件 +来测试OTG的HNP和SRP功能。 + +1.1 如何使能OTG FSM +-------------------- + +1.1.1 在menuconfig中选择CONFIG_USB_OTG_FSM,并重新编译内核 +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +重新编译镜像和模块。如果需要查看OTG FSM的内部变量,可以挂载debugfs, +会有两个文件用于显示OTG FSM变量和部分控制器寄存器值:: + + cat /sys/kernel/debug/ci_hdrc.0/otg + cat /sys/kernel/debug/ci_hdrc.0/registers + +1.1.2 在控制器节点的dts文件中添加以下条目 +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +:: + + otg-rev = <0x0200>; + adp-disable; + +1.2 测试步骤 +------------- + +1) 给两块Freescale i.MX6Q Sabre SD开发板上电, + 并加载gadget类驱动(例如 g_mass_storage)。 + +2) 用USB线连接两块开发板:一端是micro A插头,另一端是micro B插头。 + + 插入micro A插头的一端为A设备,它应当枚举另一端的B设备。 + +3) 角色切换 + + 在B设备上执行:: + + echo 1 > /sys/bus/platform/devices/ci_hdrc.0/inputs/b_bus_req + + B设备应切换为host并枚举A设备。 + +4) 把A设备切换为host + + 在B设备上执行:: + + echo 0 > /sys/bus/platform/devices/ci_hdrc.0/inputs/b_bus_req + + 或者通过HNP轮询机制:B-Host可以检测到A外设想成为host的意愿, + 从而由A外设触发角色切换。在A设备上执行:: + 或者通过HNP轮询机制:B-Host可以检测到A外设想切换为host角色的意愿, + 并通过A外设对轮询的响应来触发角色切换。 + 这可以通过在A设备上执行:: + + echo 1 > /sys/bus/platform/devices/ci_hdrc.0/inputs/a_bus_req + + A设备应切换回host并枚举B设备。 + +5) 拔掉B设备(拔掉micro B插头),在10秒内重新插入; + A设备应重新枚举B设备。 + +6) 拔掉B设备(拔掉micro B插头),在10秒后重新插入; + A设备不应重新枚举B设备。 + + 若A设备想使用总线: + + 在A设备上:: + + echo 0 > /sys/bus/platform/devices/ci_hdrc.0/inputs/a_bus_drop + echo 1 > /sys/bus/platform/devices/ci_hdrc.0/inputs/a_bus_req + + 若B设备想使用总线: + + 在B设备上:: + + echo 1 > /sys/bus/platform/devices/ci_hdrc.0/inputs/b_bus_req + +7) A设备关闭总线供电 + + 在A设备上:: + + echo 1 > /sys/bus/platform/devices/ci_hdrc.0/inputs/a_bus_drop + + A设备应断开与B设备的连接并关闭总线供电。 + +8) B设备进行SRP数据脉冲唤醒 + + 在B设备上:: + + echo 1 > /sys/bus/platform/devices/ci_hdrc.0/inputs/b_bus_req + + A设备应恢复usb总线并枚举B设备。 + +1.3 参考文档 +------------- +《On-The-Go and Embedded Host Supplement to the USB Revision 2.0 Specification +July 27, 2012 Revision 2.0 version 1.1a》 + +2. 如何使能USB作为系统唤醒源 +---------------------------- +下面是在imx6平台上使能USB作为系统唤醒源的示例。 + +2.1 使能核心控制器的唤醒功能:: + + echo enabled > /sys/bus/platform/devices/ci_hdrc.0/power/wakeup + +2.2 使能glue层的唤醒功能:: + echo enabled > /sys/bus/platform/devices/2184000.usb/power/wakeup + +2.3 使能PHY的唤醒功能(可选):: + + echo enabled > /sys/bus/platform/devices/20c9000.usbphy/power/wakeup + +2.4 使能根集线器的唤醒功能:: + echo enabled > /sys/bus/usb/devices/usb1/power/wakeup + +2.5 使能相关设备的唤醒功能:: + + echo enabled > /sys/bus/usb/devices/1-1/power/wakeup + +如果系统只有一个USB端口,并且你希望在这个端口上使能USB唤醒功能, +你可以使用下面的脚本来使能USB唤醒功能:: + + for i in $(find /sys -name wakeup | grep usb);do echo enabled > $i;done;
Documentation/translations/zh_CN/usb/index.rst +1 -1
@@ -19,10 +19,10 @@ USB 支持 acm authorization + chipidea Todolist: -* chipidea * dwc3 * ehci * usbmon
--
2.52.0
PATCH v5 5/8 docs/zh_CN: Add dwc3.rst translation
In reply to Kefan BaiTranslate .../usb/dwc3.rst into Chinese
Update the translation through commit ecefae6db042 ("docs: usb: rename files to .rst and add them to drivers-api")
--- 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
Documentation/translations/zh_CN/usb/dwc3.rst new file +60 -0
@@ -0,0 +1,60 @@ +.. SPDX-License-Identifier: GPL-2.0 +.. include:: ../disclaimer-zh_CN.rst + +:Original: Documentation/usb/dwc3.rst +:翻译: + + 白钶凡 Kefan Bai <[email protected]> + +:校译: + + + +========== +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工作,这些工作可能会导致休眠,例如等待命令完成。 + + 延迟: + + 不应该增加延迟,因为中断线程具有较高优先级,会在用户空间普通任务之前运行 + (除非用户更改了调度优先级)。
Documentation/translations/zh_CN/usb/index.rst +1 -1
@@ -20,10 +20,10 @@ USB 支持 acm authorization chipidea + dwc3 Todolist: -* dwc3 * ehci * usbmon * functionfs
--
2.52.0
PATCH v5 6/8 docs/zh_CN: Add ehci.rst translation
In reply to Kefan BaiTranslate .../usb/ehci.rst into Chinese
Update the translation through commit 570eb861243c ("docs: usb: replace some characters")
--- Documentation/translations/zh_CN/usb/ehci.rst | 216 ++++++++++++++++++ .../translations/zh_CN/usb/index.rst | 2 +- 2 files changed, 217 insertions(+), 1 deletion(-) create mode 100644 Documentation/translations/zh_CN/usb/ehci.rst
Documentation/translations/zh_CN/usb/ehci.rst new file +216 -0
@@ -0,0 +1,216 @@ +.. SPDX-License-Identifier: GPL-2.0 +.. include:: ../disclaimer-zh_CN.rst + +:Original: Documentation/usb/ehci.rst +:翻译: + + 白钶凡 Kefan Bai <[email protected]> + +:校译: + + + +========= +EHCI 驱动 +========= + +2002年12月27日 + +EHCI驱动用于支持USB 2.0的主机控制器硬件与高速USB 2.0设备通信。 +USB 2.0兼容USB 1.1标准,它定义了三种传输速率: + + - 高速 480 Mbit/sec (60 MByte/sec) + - 全速 12 Mbit/sec (1.5 MByte/sec) + - 低速 1.5 Mbit/sec + +USB 1.1仅支持全速与低速。高速设备可以在USB 1.1系统上使用, +但速度会下降到USB 1.1的速度。 + +USB 1.1设备也可以在USB 2.0系统上使用。 +当它们插入EHCI控制器时,会被交由USB 1.1的伴随(companion)控制器处理, +该控制器通常为OHCI或UHCI。 + +当USB 1.1设备插入USB 2.0集线器时, +它们通过集线器中的事务转换器(Transaction Translator,TT)与EHCI控制器交互, +该转换器将低速或全速事务转换为高速分割事务,从而避免浪费传输带宽。 + +截至本文撰写时,该驱动已在以下EHCI实现上成功运行(按字母顺序): +Intel、NEC、Philips 和 VIA。 +其他供应商的EHCI实现正在陆续问世; +预计该驱动在这些实现上也可正常运行。 + +自2001年年中开始,usb存储设备已可使用(在2.4版EHCI驱动下性能良好), +集线器从2001年底开始可用,而其他类型的高速设备似乎因USB 2.0原生硬件 +普及较慢而推迟上市。从2002年初开始,带USB 2.0的系统陆续上市, +并在2002年下半年变得更加普及。 + +注意:USB 2.0的支持不仅仅包含EHCI,还需要对Linux-USB核心API进行一些修改, +包括Hub驱动,但这些修改通常不会影响USB核心对USB设备驱动暴露的基本API。 + +- David Brownell + <[email protected]> + + +功能性 +====== + +该驱动会定期在x86硬件上进行测试,并已在PPC硬件上使用,因此大小端问题应已解决。 +相信它已经处理好所有PCI相关的细节, +因此在具有特殊DMA映射问题的系统上I/O也应能正常运行。 + +传输类型 +-------- + +截至本文撰写时,该驱动应该已经可以很好地处理所有的控制传输、批量传输和中断传输, +包括通过USB 2.0 Hub中的事务转换器与USB 1.1设备的通信,但仍可能存在bug。 + +已经实现对高速等时ISO传输的支持,但截至本文撰写时,还没有Linux驱动程序使用该支持。 + +通过事务转换器实现的全速等时传输目前尚未支持。 +需要注意的是,用于全速设备的等时拆分事务与高速等时传输 +在EHCI中采用完全不同的数据结构,因此相关代码几乎无 +法共用。因此,即使连接到高速总线,目前大多数USB音频和视频类设备 +也无法正常使用等时传输功能。 + +驱动行为 +-------- + +所有类型的传输都可以排队。 +这意味着来自不同接口(或通过 usbfs)的控制传输不会互相干扰, +并且中断传输可以使用1帧的周期,而无需担心由于中断处理成本导致的数据丢失。 + + +EHCI根集线器代码会将USB 1.1设备交给其伴随控制器处理。 +EHCI驱动无需了解其他控制器的驱动程序; +已经正常工作的OHCI或UHCI驱动,无需因为EHCI的存在而做任何修改。 + +存在一些电源管理相关的问题;挂起/恢复行为目前不太正确。 + +此外,在调度周期性事务(中断和等时传输)时采用了一些简化处理。 +这些简化会限制可调度的周期性传输数量,并且无法使用小于1帧的轮询间隔。 + +使用方式 +========= + +假设你有一个EHCI控制器,并且已将此驱动编译为模块,可如下加载:: + + # modprobe ehci-hcd + +卸载方式:: + + # rmmod ehci-hcd + +你还应加载一个伴随控制器的驱动,例如ohci-hcd或uhci-hcd。 +如果EHCI驱动出现问题,只需卸载对应模块, +伴随控制器驱动就会接手之前EHCI处理的所有设备(但速度更慢)。 + +传递给modprobe的模块参数: + + log2_irq_thresh (默认 0): + 控制默认中断延迟的对数值(以微帧为单位)。 + 默认值0表示1个微帧(125 微秒)。 + 最大值6表示2^6=64个微帧。 + 该值控制EHCI控制器发出中断的频率。 + +如果你在2.5内核上使用此驱动,并且启用了USB调试支持, +你将在任何EHCI控制器的sysfs目录中看到三个文件: + +"async" +输出异步调度队列,用于控制传输和批量传输。 +显示每个活动的qh和挂起的qtd,通常每个urb一个qtd。 +(对usb存储进行磁盘I/O时看看,可看到请求队列!) + +"periodic" +输出周期性调度队列,用于中断传输和等时传输。不显示qtd。 + +"registers" +显示控制器寄存器状态。 + + +设备驱动程序通常不需要关心自己是否运行在EHCI上, +但可能需要检查usb_device->speed是否是USB_SPEED_HIGH。 +高速设备可以执行全速(或低速)设备无法完成的操作, +例如高带宽的周期性传输(中断传输或等时传输)。 +此外,设备描述符中的某些值(如周期性传输的轮询间隔)在高速模式下使用不同的编码方式。 + +务必通过USB 2.0集线器测试设备驱动。 +当使用事务转换器时,这些集线器会以不同方式报告某些故障(如断开连接)。 +一些驱动在遇到与OHCI或UHCI报告不同的故障时可能会表现异常。 + +软件性能 +======== + +USB 2.0吞吐量受两个主要因素制约:主机控制器处理请求的速度,以及设备响应请求的速度。 +所有设备都遵循480Mbit/sec的原始传输速率, +但总吞吐量还会受到诸如单个高速数据包之间的延迟、驱动程序调度策略, +以及系统整体负载等因素的影响。 +延迟也是性能考量因素。 + +批量传输通常用于对吞吐量有严格要求的场景。 +需要注意的是,批量传输总是以512字节的数据包为单位, +并且在一个USB 2.0微帧中最多可容纳13个这样的数据包。 +八个USB 2.0微帧构成一个USB 1.1帧; +一个微帧的时间为1毫秒 ÷ 8 = 125微秒。 + +因此,当硬件和设备驱动软件都允许时, +批量传输可提供超过50 MByte/sec的带宽。 +周期性传输模式(等时传输和中断传输)允许使用更大的数据包, +从而使传输速率接近标称的480MBit/sec。 + +硬件性能 +-------- + +截至本文撰写时,单个USB 2.0设备的最大传输速率通常约为20 MByte/sec。 +这当然会随着时间改变:一些设备现在更快,一些更慢。 + +第一代NEC EHCI实现似乎存在约28 MByte/sec的硬件瓶颈。 +虽然这足以让单设备跑到20 MByte/sec, +但将三个此类设备放在同一总线上不能达到60 MByte/sec。 +问题似乎在于控制器硬件无法同时进行USB与PCI访问, +因此每个微帧中只尝试6或7次USB事务,而不是13次。 +(对一个比其他产品早上市一年的芯片来说,这是个合理的妥协!) + + +预计更新的实现会进一步优化这一点, +通过投入更多芯片面积来解决问题, +使新的主板芯片组更接近60 MByte/sec的目标。 +这包括NEC的更新实现,以及其他厂商的实现。 + + +主机接收来自EHCI控制器的请求,完成中断的最小延迟为一个微帧(125 微秒)。 +该延迟可以通过模块参数进行调整设置。 +默认情况下,ehci-hcd驱动使用最小延迟, +这意味着当你发出控制或批量请求时, +通常可以预期在不到250微秒内获知完成情况(具体取决于传输大小)。 + +软件性能 +-------- + +即使要达到20 MByte/sec的传输速率,Linux-USB设备驱动也必须保持EHCI队列满。 +这意味着发出较大的请求,或在需要发出一系列小请求时,使用批量排队(bulk queuing)。 +如果驱动未做到这一点,那么会直接从性能结果上表现出来。 + + +在典型场景下,使用usb_bulk_msg() 以4KB块循环写入, +会浪费超过一半的USB 2.0带宽。 +I/O完成与驱动发出下一次请求之间的延迟通常比一次I/O操作所需的时间更长。 +如果同样的循环改用16KB块,会有所改善;使用128KB块的序列则能大幅减少浪费。 + + +与其依赖如此大的I/O缓冲区来提高同步I/O的效率, +不如直接向主机控制器队列多个(批量)请求,并等待它们全部完成,或在出错时取消。 +这种URB排队方式对所有USB 1.1主机控制器驱动也适用。 + + +在Linux 2.5内核中,定义了新的 usb_sg_*() API 调用; +它们会将scatterlist中的所有缓冲区排入队列。 +它们还使用scatterlist的DMA映射(可能会使用IOMMU)并减少中断次数, +这些都有助于高速传输尽可能高效地运行。 + +待办: + 中断传输和等时(ISO)传输的性能问题。 + 这些周期性传输都是完全调度的,因此,主要问题可能在于如何触发高带宽模式。 + +待办: + 通过sysfs的uframe_periodic_max参数,可以分配超过标准80%的周期性带宽。 + 后续将对此进行说明。
Documentation/translations/zh_CN/usb/index.rst +1 -1
@@ -21,10 +21,10 @@ USB 支持 authorization chipidea dwc3 + ehci Todolist: -* ehci * usbmon * functionfs * functionfs-desc
--
2.52.0
PATCH v5 7/8 docs/zh_CN: Add usbmon.rst translation
In reply to Kefan BaiTranslate .../usb/usbmon.rst into Chinese
Update the translation through commit 788183a6e8b0
("docs: usb: fix literal block marker in usbmon verification example")
--- .../translations/zh_CN/usb/index.rst | 2 +- .../translations/zh_CN/usb/usbmon.rst | 380 ++++++++++++++++++ 2 files changed, 381 insertions(+), 1 deletion(-) create mode 100644 Documentation/translations/zh_CN/usb/usbmon.rst
Documentation/translations/zh_CN/usb/index.rst +1 -1
@@ -22,10 +22,10 @@ USB 支持 chipidea dwc3 ehci + usbmon Todolist: -* usbmon * functionfs * functionfs-desc * gadget_configfs
Documentation/translations/zh_CN/usb/usbmon.rst new file +380 -0
380 lines not on this page · raw message
--
2.52.0
PATCH v5 8/8 docs/zh_CN: Add CREDITS translation
In reply to Kefan BaiTranslate .../usb/CREDITS into Chinese
Update the translation through commit 7b2328c5a009 ("docs: Fix typo in usb/CREDITS")
--- Documentation/translations/zh_CN/usb/CREDITS | 153 +++++++++++++++++++ 1 file changed, 153 insertions(+) create mode 100644 Documentation/translations/zh_CN/usb/CREDITS
Documentation/translations/zh_CN/usb/CREDITS new file +153 -0
@@ -0,0 +1,153 @@ +.. SPDX-License-Identifier: GPL-2.0 +.. include:: ../disclaimer-zh_CN.rst + +:Original: Documentation/usb/CREDITS +:翻译: + + 白钶凡 Kefan Bai <[email protected]> + +:校译: + + + +简易版Linux USB驱动致谢名单: + +以下人员为USB驱动代码作出了贡献(按姓氏字母顺序排列)。 +我相信这份名单还应更长一些,但维护起来确实不易。 +如果你希望加入的话,请提交补丁。 + + Georg Acher <[email protected]> + David Brownell <[email protected]> + Alan Cox <[email protected]> + Randy Dunlap <[email protected]> + Johannes Erdfelt <[email protected]> + Deti Fliegl <[email protected]> + ham <[email protected]> + Bradley M Keryan <[email protected]> + Greg Kroah-Hartman <[email protected]> + Pavel Machek <[email protected]> + Paul Mackerras <[email protected]> + Petko Manlolov <[email protected]> + David E. Nelson <[email protected]> + Vojtech Pavlik <[email protected]> + Bill Ryder <[email protected]> + Thomas Sailer <[email protected]> + Gregory P. Smith <[email protected]> + Linus Torvalds <[email protected]> + Roman Weissgaerber <[email protected]> + <[email protected]> + +特别感谢: + + Inaky Perez Gonzalez <[email protected]> + 感谢他发起了Linux USB驱动的开发工作,并编写了 + 大部分早期的uusbd驱动。我们从那项工作中学到 + 了很多东西。 + + The NetBSD & FreeBSD的USB开发者们 + 感谢他们在Linux USB邮件列表中的建议与经验分享。 + +附加感谢: + 以下公司与个人在硬件、支持、开发上对我们进行过捐赠与帮助 + (摘自Inaky原始驱动中的THANKS文件): + + 以下公司曾帮助我们开发Linux USB / UUSBD: + + - 3Com GmbH捐赠了一台ISDN Pro TA,并在技术问题和测试设备上提供支持。 + 我从未想到能获得如此慷慨的帮助。 + + - USAR Systems提供了优秀的USB评估套件,使我们能够 + 测试Linux USB驱动与最新USB规范的兼容性。USAR Systems + 认识到开源操作系统的重要性,并提供了硬件支持,感谢他们! + + - 感谢英特尔提供的宝贵帮助。 + + - 我们与Cherry进行了合作,让Linux成为了第一个原生支持USB键盘的操作系统。 + Cherry是全球最大的键盘制造商之一。 + + - CMD Technology, Inc慷慨捐赠了一块CSA-6700 PCI-to-USB控制卡, + 用于测试OHCI实现。 + + - 感谢Keytronic的支持,使其键盘能够被数百万Linux用户使用。 + + - ing büro h doran [http://www.ibhdoran.com]! + 在欧洲几乎买不到后置USB接口面板的主板,而我自制的版本很糟糕 :)。 + 感谢他们提供了漂亮的USB配件! + + - Genius Germany捐赠了一只USB鼠标用于测试鼠标启动协议,并提供了 + F-23数字摇杆和NetMouse Pro。感谢! + + - AVM GmbH Berlin支持我们开发Linux下的AVM ISDN控制器B1 USB驱动。 + AVM是领先的ISDN控制器制造商,其主动式设计对包括Linux在内的 + 所有操作系统开放。 + + - 非常感谢Y-E Data, Inc捐赠的FlashBuster-U USB软驱, + 使我们能够测试bulk传输代码。 + + - 感谢Logitech捐赠了一只三轴USB鼠标。 + + Logitech设计、制造并销售各种人机接口设备, + 如键盘、鼠标、轨迹球、摄像头、扬声器及游戏控制设备。 + + 感谢他们捐赠了USB鼠标、摇杆和扫描仪, + 以支持Linux用户使用Logitech及其他USB设备。 + + Logitech亦是1999年2月11日维也纳Linux大会的官方赞助商, + 我们在会上展示了Linux USB的最新进展。 + + - 感谢CATC提供了USB Inspector,用于揭示UHCI实现的内部细节。 + + - 感谢Entrega提供了PCI-USB转换卡、集线器和转换器产品用于开发。 + + - 感谢ConnectTech提供了WhiteHEAT USB转串口转换器及相关文档, + 使得驱动得以编写。 + + - 感谢ADMtek提供了Pegasus与Pegasus II评估板、规格说明和开发建议。 + + 个人感谢名单(排名不分先后) + + - Oren Tirosh <[email protected]>, + 耐心解答了我关于USB的各种疑问,并提出了许多很棒的想法。 + + - Jochen Karrer <[email protected]>, + 找到了致命的bug并给予了宝贵建议。 + + - Edmund Humemberger <[email protected]>, 在公共关系与管理工作上,他 + 为Linux-USB项目付出了巨大的努力。 + + - Alberto Menegazzi <[email protected]>开始编写UUSBD文档,加油! + + - Ric Klaren <[email protected]>编写了优秀的入门文档, + 与Alberto的作品形成良性竞争:)。 + + - Christian Groessler <[email protected]>帮助解决了很多麻烦的小问题。 + + - Paul MacKerras改进了OHCI实现,推动了对iMac的支持, + 并提供了大量的改进意见。 + + - Fernando Herrera <[email protected]> + 负责撰写和维护期待已久的UUSBD FAQ! + + - Rasca Gmelch <[email protected]>重新启用了raw驱动, + 修复了错误并创建了uusbd-utils包。 + + - Peter Dettori <[email protected]>疯狂地挖掘bug并提出了 + 酷炫的改进建议,太棒了! + + - 自由软件与Linux社区的所有成员, + 包括FSF、GNU项目、MIT X联盟、TeX社区等等,谢谢你们! + + - 大大的感谢送给Richard Stallman和他的Emacs! + + - 感谢linux-usb邮件列表的所有成员,他们阅读了那么多邮件, + 并且提出了大量的建议! + + - 感谢USB Implementers论坛成员们的帮助与支持。 + + - Nathan Myers <[email protected]>,感谢他的建议!(希望你喜欢Cibeles的派对) + + - 感谢Linus Torvalds创建、开发并管理Linux。 + + - Mike Smith, Craig Keithley, Thierry Giron和Janet Schank + 感谢他们让我明白标准USB集线器其实并没有那么标准, + 这有助于我们在标准集线器驱动中加入厂商特定的特性。
--
2.52.0
Hi Kefan,
There are too much whitespace errors.
Please resolve the problem and send again.
Alex
$b4 shazam https://lore.kernel.org/linux-doc/[email protected]/
/home/alexshi/linux/.git/rebase-apply/patch:89: indent with spaces.
# FIXME: 确保没有人能够挂载它/home/alexshi/linux/.git/rebase-apply/patch:94: indent with spaces.
echo "We are good, connected"/home/alexshi/linux/.git/rebase-apply/patch:95: indent with spaces.
umount /mntpoint/home/alexshi/linux/.git/rebase-apply/patch:96: indent with spaces.
# 添加一些额外的内容,以便其他人也可以使用它/home/alexshi/linux/.git/rebase-apply/patch:98: indent with spaces.
echo 0 > authorized
warning: 5 lines add whitespace errors. /home/alexshi/linux/.git/rebase-apply/patch:395: indent with spaces.
hdr = (struct ubsmon_packet *) &mmap_area[vec[i]];
/home/alexshi/linux/.git/rebase-apply/patch:396: indent with spaces.
if (hdr->type == '@') // 填充包
/home/alexshi/linux/.git/rebase-apply/patch:397: indent with spaces.
continue;
/home/alexshi/linux/.git/rebase-apply/patch:398: indent with spaces.
caddr_t data = &mmap_area[vec[i]] + 64;
/home/alexshi/linux/.git/rebase-apply/patch:399: indent with spaces.
process_packet(hdr, data);warning: 5 lines add whitespace errors. /home/alexshi/linux/.git/rebase-apply/patch:67: indent with spaces.
- 3Com GmbH捐赠了一台ISDN Pro
TA,并在技术问题和测试设备上提供支持。 /home/alexshi/linux/.git/rebase-apply/patch:68: indent with spaces.
我从未想到能获得如此慷慨的帮助。/home/alexshi/linux/.git/rebase-apply/patch:70: indent with spaces.
- USAR Systems提供了优秀的USB评估套件,使我们能够/home/alexshi/linux/.git/rebase-apply/patch:71: indent with spaces.
测试Linux USB驱动与最新USB规范的兼容性。USAR Systems/home/alexshi/linux/.git/rebase-apply/patch:72: indent with spaces.
认识到开源操作系统的重要性,并提供了硬件支持,感谢他们!
warning: squelched 57 whitespace errors
warning: 62 lines add whitespace errors.
Quoted 69 lines · Kefan Bai
This patch set adds Chinese translations for the USB documentation.
Changes in v5:
- Ensuring that theindex.rstentries, including acm, authorization, chipidea, dwc3, ehci, and usbmon, are placed in the correct patches to prevent build errors when patches are applied individually.
- Remove extra spaces inchipidea.rst.
- Send these translation patches [email protected] for review by Chinese-speaking developers, per Alex and Yanteng's recommendation.Changes in v4:
- shorten those overlong title underline/overline symbols
- Remove CREDITS section fromindex.rst
- Link to v4:https://lore.kernel.org/all/cover.1764674650.git.baikefan@leap-io-
kernel.com/Changes in v3:
- Updated the signoff to my full legal name,
as requested by Jonathan Corbet.
- Reviewed and fixed the RST syntax to resolve the patch issues noted by Alex Shi.
- Kept the number of translated files to eight
to make submission and review smoother.
- Link to v3:https://lore.kernel.org/all/cover.1763984424.git.baikefan@leap-io-
kernel.com/Changes in v2:
- Update [PATCH 01/25] docs/zh_CN: Addindex.rsttranslation
to include corresponding updates inDocumentation/translations/zh_CN/subsystem-apis.rst.
- Link to v2:https://lore.kernel.org/all/cover.1763897036.git.baikefan@leap-io-
kernel.com/v1:
- Link:https://lore.kernel.org/all/20251123074540.34161-1-baikefan@leap-io-
kernel.com/Kefan Bai (8):
docs/zh_CN: Addindex.rsttranslation
docs/zh_CN: Addacm.rsttranslation
docs/zh_CN: Addauthorization.rsttranslation
docs/zh_CN: Addchipidea.rsttranslation
docs/zh_CN: Adddwc3.rsttranslation
docs/zh_CN: Addehci.rsttranslation
docs/zh_CN: Addusbmon.rsttranslation
docs/zh_CN: Add CREDITS translation.../translations/zh_CN/subsystem-apis.rst | 2 +- Documentation/translations/zh_CN/usb/CREDITS | 153 +++++++ Documentation/translations/zh_CN/usb/acm.rst | 137 +++++++ .../translations/zh_CN/usb/authorization.rst | 125 ++++++ .../translations/zh_CN/usb/chipidea.rst | 142 +++++++ Documentation/translations/zh_CN/usb/dwc3.rst | 60 +++ Documentation/translations/zh_CN/usb/ehci.rst | 216 ++++++++++ .../translations/zh_CN/usb/index.rst | 54 +++ .../translations/zh_CN/usb/usbmon.rst | 380 ++++++++++++++++++ 9 files changed, 1268 insertions(+), 1 deletion(-)create mode 100644
Documentation/translations/zh_CN/usb/CREDITScreate mode 100644Documentation/translations/zh_CN/usb/acm.rstcreate mode 100644Documentation/translations/zh_CN/usb/authorization.rstcreate mode 100644Documentation/translations/zh_CN/usb/chipidea.rstcreate mode 100644Documentation/translations/zh_CN/usb/dwc3.rstcreate mode 100644Documentation/translations/zh_CN/usb/ehci.rstcreate mode 100644Documentation/translations/zh_CN/usb/index.rstcreate mode 100644Documentation/translations/zh_CN/usb/usbmon.rst--
2.52.0
Quoted 31 lines · On Tue, 23 Dec 2025 21:39:41 +0800 Alex Shi <[email protected]> wrote:
Hi Kefan,
There are too much whitespace errors.
Please resolve the problem and send again.Alex
$b4 shazam
https://lore.kernel.org/linux-doc/[email protected]/
/home/alexshi/linux/.git/rebase-apply/patch:89: indent with spaces.
# FIXME: 确保没有人能够挂载它/home/alexshi/linux/.git/rebase-apply/patch:94: indent with spaces.
echo "We are good, connected"/home/alexshi/linux/.git/rebase-apply/patch:95: indent with spaces.
umount /mntpoint/home/alexshi/linux/.git/rebase-apply/patch:96: indent with spaces.
# 添加一些额外的内容,以便其他人也可以使用它/home/alexshi/linux/.git/rebase-apply/patch:98: indent with spaces.
echo 0 > authorized
warning: 5 lines add whitespace errors./home/alexshi/linux/.git/rebase-apply/patch:395: indent with spaces.hdr = (struct ubsmon_packet *) &mmap_area[vec[i]]; /home/alexshi/linux/.git/rebase-apply/patch:396: indent with spaces. if (hdr->type == '@') // 填充包 /home/alexshi/linux/.git/rebase-apply/patch:397: indent with spaces. continue; /home/alexshi/linux/.git/rebase-apply/patch:398: indent with spaces. caddr_t data = &mmap_area[vec[i]] + 64; /home/alexshi/linux/.git/rebase-apply/patch:399: indent with spaces. process_packet(hdr, data);
Quoted 15 lines
warning: 5 lines add whitespace errors.
/home/alexshi/linux/.git/rebase-apply/patch:67: indent with spaces.
- 3Com GmbH捐赠了一台ISDN Pro
TA,并在技术问题和测试设备上提供支持。/home/alexshi/linux/.git/rebase-apply/patch:68: indent with spaces.
我从未想到能获得如此慷慨的帮助。/home/alexshi/linux/.git/rebase-apply/patch:70: indent with spaces.
- USAR Systems提供了优秀的USB评估套件,使我们能够/home/alexshi/linux/.git/rebase-apply/patch:71: indent with spaces.
测试Linux USB驱动与最新USB规范的兼容性。USAR Systems/home/alexshi/linux/.git/rebase-apply/patch:72: indent with spaces.
认识到开源操作系统的重要性,并提供了硬件支持,感谢他们!
warning: squelched 57 whitespace errors
warning: 62 lines add whitespace errors.
Hi Alex,
Sorry for the late reply — I’ve been tied up with other work recently.
Thanks for pointing this out.
I tried to reproduce the whitespace warnings you mentioned, but unfortunately I’m not able to see them on my side.
I tested the patch set with:
1. linux-next with the latest mainline tree
2. b4 shazam
https://lore.kernel.org/linux-doc/[email protected]/
3. scripts/checkpatch.pl --strict run on all the patch files
Given that no "indent with spaces" or other whitespace warnings were reported, I suspect this may be environment- or tooling-related.
To help me narrow this down, could you please let me know:
1. the exact tree you are applying against (commit or branch)
2. the exact command sequence you used before running b4 shazam
3. whether any whitespace-related git config is set (e.g. core.whitespace, apply.whitespace)
Thanks for taking the time to review this.
Thanks again
Kefan
Quoted 81 lines · Kefan Bai
Quoted 76 lines
This patch set adds Chinese translations for the USB documentation.
Changes in v5:
- Ensuring that theindex.rstentries, including acm,
authorization, chipidea, dwc3, ehci, and usbmon, are placed in the correct patches to prevent build errors when patches are applied individually.
- Remove extra spaces inchipidea.rst.
- Send these translation patches [email protected] for
review by Chinese-speaking developers, per Alex and Yanteng's recommendation.Changes in v4:
- shorten those overlong title underline/overline symbols
- Remove CREDITS section fromindex.rst
- Link to
v4:https://lore.kernel.org/all/cover.1764674650.git.baikefan@leap-io- kernel.com/Changes in v3:
- Updated the signoff to my full legal name,
as requested by Jonathan Corbet.
- Reviewed and fixed the RST syntax to resolve the patch issues noted by Alex Shi.
- Kept the number of translated files to eight
to make submission and review smoother.
- Link to
v3:https://lore.kernel.org/all/cover.1763984424.git.baikefan@leap-io- kernel.com/Changes in v2:
- Update [PATCH 01/25] docs/zh_CN: Addindex.rsttranslation to include corresponding updates inDocumentation/translations/zh_CN/subsystem-apis.rst.
- Link to
v2:https://lore.kernel.org/all/cover.1763897036.git.baikefan@leap-io- kernel.com/v1:
-kernel.com/
Kefan Bai (8):
docs/zh_CN: Addindex.rsttranslation
docs/zh_CN: Addacm.rsttranslation
docs/zh_CN: Addauthorization.rsttranslation
docs/zh_CN: Addchipidea.rsttranslation
docs/zh_CN: Adddwc3.rsttranslation
docs/zh_CN: Addehci.rsttranslation
docs/zh_CN: Addusbmon.rsttranslation
docs/zh_CN: Add CREDITS translation.../translations/zh_CN/subsystem-apis.rst | 2 +- Documentation/translations/zh_CN/usb/CREDITS | 153 +++++++ Documentation/translations/zh_CN/usb/acm.rst | 137 +++++++ .../translations/zh_CN/usb/authorization.rst | 125 ++++++ .../translations/zh_CN/usb/chipidea.rst | 142 +++++++ Documentation/translations/zh_CN/usb/dwc3.rst | 60 +++ Documentation/translations/zh_CN/usb/ehci.rst | 216 ++++++++++ .../translations/zh_CN/usb/index.rst | 54 +++ .../translations/zh_CN/usb/usbmon.rst | 380++++++++++++++++++ 9 files changed, 1268 insertions(+), 1 deletion(-) create mode 100644
Documentation/translations/zh_CN/usb/CREDITScreate mode 100644Documentation/translations/zh_CN/usb/acm.rstcreate mode 100644Documentation/translations/zh_CN/usb/authorization.rstcreate mode 100644Documentation/translations/zh_CN/usb/chipidea.rstcreate mode 100644Documentation/translations/zh_CN/usb/dwc3.rstcreate mode 100644Documentation/translations/zh_CN/usb/ehci.rstcreate mode 100644Documentation/translations/zh_CN/usb/index.rstcreate mode 100644Documentation/translations/zh_CN/usb/usbmon.rst--
2.52.0
Hi Yanteng and Alexs,
A few months ago, I submitted a patch for the Chinese translation of the USB documentation.
Following your suggestion, I forwarded it to the USB subsystem maintainer for further review, but I haven’t received any response yet.
Could you please advise on the next steps? Should I follow up with the maintainer, or is there another recommended approach to help move this patch forward?
Thank you for your assistance!
Best regards,
Kefan
Quoted 73 lines · On Mon, 8 Dec 2025 17:25:30 +0800 Kefan Bai <[email protected]>…
This patch set adds Chinese translations for the USB documentation.
Changes in v5:
- Ensuring that theindex.rstentries, including acm, authorization, chipidea, dwc3, ehci, and usbmon, are placed in the correct patches to prevent build errors when patches are applied individually.
- Remove extra spaces inchipidea.rst.
- Send these translation patches to [email protected] for
review by Chinese-speaking developers, per Alex and Yanteng's recommendation.Changes in v4:
- shorten those overlong title underline/overline symbols
- Remove CREDITS section fromindex.rst
- Link to v4:
https://lore.kernel.org/all/[email protected]/Changes in v3:
- Updated the signoff to my full legal name,
as requested by Jonathan Corbet.
- Reviewed and fixed the RST syntax to resolve the patch issues noted by Alex Shi.
- Kept the number of translated files to eight
to make submission and review smoother.
- Link to v3:
https://lore.kernel.org/all/[email protected]/Changes in v2:
- Update [PATCH 01/25] docs/zh_CN: Addindex.rsttranslation to include corresponding updates inDocumentation/translations/zh_CN/subsystem-apis.rst.
- Link to v2:
https://lore.kernel.org/all/[email protected]/v1:
- Link:
https://lore.kernel.org/all/[email protected]/Kefan Bai (8):
docs/zh_CN: Addindex.rsttranslation
docs/zh_CN: Addacm.rsttranslation
docs/zh_CN: Addauthorization.rsttranslation
docs/zh_CN: Addchipidea.rsttranslation
docs/zh_CN: Adddwc3.rsttranslation
docs/zh_CN: Addehci.rsttranslation
docs/zh_CN: Addusbmon.rsttranslation
docs/zh_CN: Add CREDITS translation.../translations/zh_CN/subsystem-apis.rst | 2 +- Documentation/translations/zh_CN/usb/CREDITS | 153 +++++++ Documentation/translations/zh_CN/usb/acm.rst | 137 +++++++ .../translations/zh_CN/usb/authorization.rst | 125 ++++++ .../translations/zh_CN/usb/chipidea.rst | 142 +++++++ Documentation/translations/zh_CN/usb/dwc3.rst | 60 +++ Documentation/translations/zh_CN/usb/ehci.rst | 216 ++++++++++ .../translations/zh_CN/usb/index.rst | 54 +++ .../translations/zh_CN/usb/usbmon.rst | 380 ++++++++++++++++++ 9 files changed, 1268 insertions(+), 1 deletion(-) create mode 100644 Documentation/translations/zh_CN/usb/CREDITS create mode 100644 Documentation/translations/zh_CN/usb/acm.rst create mode 100644
Documentation/translations/zh_CN/usb/authorization.rstcreate mode 100644Documentation/translations/zh_CN/usb/chipidea.rstcreate mode 100644Documentation/translations/zh_CN/usb/dwc3.rstcreate mode 100644Documentation/translations/zh_CN/usb/ehci.rstcreate mode 100644Documentation/translations/zh_CN/usb/index.rstcreate mode 100644Documentation/translations/zh_CN/usb/usbmon.rst--
2.52.0
Greg KH
maintainerQuoted 7 lines · BaiKefan
Hi Yanteng and Alexs,
A few months ago, I submitted a patch for the Chinese translation of the USB documentation.
Following your suggestion, I forwarded it to the USB subsystem maintainer for further review, but I haven’t received any response yet.
I do not see the forward to the USB subsystem maintainer, where did that happen?
thanks,
greg k-h
Hi Baikefan,
Please rebase the patchset on latest Jon's tree (git://git.lwn.net/linux.git docs-next) and cc to USB maintainers with all testing you past.
Thanks
Alex
Quoted 14 lines · Greg KH
Quoted 7 lines · BaiKefan
Hi Yanteng and Alexs,
A few months ago, I submitted a patch for the Chinese translation of the USB documentation.
Following your suggestion, I forwarded it to the USB subsystem maintainer for further review, but I haven’t received any response yet.
I do not see the forward to the USB subsystem maintainer, where did that happen?
thanks,
greg k-h
Hi Greg, Alex,
To clarify, I did send this patchset to the USB subsystem maintainers in Dec 2025. At that time, I received Greg’s patch-bot auto-reply noting the tree was closed during the merge window, so no further review occurred, which made me assume it had been noted but was still pending.
Per Alex’s suggestion, I will rebase on the latest docs-next, retest, and resend to the USB maintainers.
Thanks for your guidance and patience.
Best regards,
Kefan
Quoted 28 lines · On Thu, 5 Mar 2026 09:36:39 +0800 Alex Shi <[email protected]> wrote:
Hi Baikefan,
Please rebase the patchset on latest Jon's tree
(git://git.lwn.net/linux.gitdocs-next) and cc to USB maintainers with all testing you past.Thanks
AlexQuoted 15 lines · Greg KH
Quoted 8 lines · BaiKefan
Hi Yanteng and Alexs,
A few months ago, I submitted a patch for the Chinese translation of the USB documentation.
Following your suggestion, I forwarded it to the USB subsystem maintainer for further review, but I haven’t received any response yet.
I do not see the forward to the USB subsystem maintainer, where did that happen?
thanks,
greg k-h