This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] TUSB7320:使用 USB 磁盘(USB3.0或 USB2.0)传输大尺寸文件(ex.32MByte)时、将出现一些错误

Guru**** 2390755 points
Other Parts Discussed in Thread: TUSB7320, TUSB7340

请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/interface-group/interface/f/interface-forum/1270174/tusb7320-when-transmitting-big-size-file-ex-32mbyte-with-usb-disk-usb3-0-or-usb2-0-there-will-be-some-errors

器件型号:TUSB7320
主题中讨论的其他器件: TUSB7340

大家好、

操作系统:Linux 内核
1) IC TUSB7320 (USB3.0主机)正被用于实现客户项目中 USB3.0主机的功能。 但是、当使用 USB Disk (USB3.0或 USB2.0)传输大尺寸文件(例如、128MByte)时、将发生错误(错误率约为95%)。 当使用 USB 磁盘(USB3.0或 USB2.0)传输大尺寸文件(ex.32MByte)时、将发生错误(错误率约为1%)。
错误消息 如下所示:
[ 166.871044] xhci_hcd 0000:01:00.0:xHCI 主机没有响应停止端点命令。
[ 166.878862] xhci_hcd 0000:01:00.0:USBSTS:0x00000000
[ 166.915898] xhci_hcd 0000:01:00.0:主机停止失败,-110
[ 166.921274] xhci_hcd 0000:01:00.0:xHCI 主机控制器没有响应,假定死机
[166.928912] xhci_hcd 0000:01:00.0:HC 死了;正在清理
因此客户想知道错误来自 TUSB7320和 USB Disk (USB3.0或 USB2.0)。
2) 2)检查后、发现了 TUSB73x0 USB3.0 xHCI 控制器勘误表。 TUSB73x0 USB3.0 xHCI 控制器勘误表(修订版 B)(TI.com.cn)、但无法找到勘误注释的源代码、您能帮助分享如何 获取源代码吗?
详细说明:
The error message is below.
-------------------------------------------------------------------------------------------------------
# ls /dev/sd*
/dev/sda   /dev/sda1  /dev/sdb   /dev/sdb1
# mount /dev/sda1 /mnt/usb1
[   60.201270] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null). Quota mode: disabled.
# mount /dev/sdb1 /mnt/usb2
[   66.303465] EXT4-fs (sdb1): mounted filesystem with ordered data mode. Opts: (null). Quota mode: disabled.
# dd if=/dev/random of=/mnt/usb1/usb1_32KB bs=1K count=32 conv=fsync
[   76.371056] random: crng init done
32+0 records in
32+0 records out
32768 bytes (32.0KB) copied, 0.348429 seconds, 91.8KB/s
# dd if=/dev/random of=/mnt/usb2/usb2_32KB bs=1K count=32 conv=fsync
32+0 records in
32+0 records out
32768 bytes (32.0KB) copied, 0.006364 seconds, 4.9MB/s
# dd if=/dev/random of=/mnt/usb1/usb1_128MB bs=1M count=128 conv=fsync
128+0 records in
128+0 records out
134217728 bytes (128.0MB) copied, 5.257318 seconds, 24.3MB/s
# dd if=/dev/random of=/mnt/usb2/usb2_128MB bs=1M count=128 conv=fsync
[  166.871044] xhci_hcd 0000:01:00.0: xHCI host not responding to stop endpoint command.
[  166.878862] xhci_hcd 0000:01:00.0: USBSTS: 0x00000000
[  166.915898] xhci_hcd 0000:01:00.0: Host halt failed, -110
[  166.921274] xhci_hcd 0000:01:00.0: xHCI host controller not responding, assume dead
[  166.928912] xhci_hcd 0000:01:00.0: HC died; cleaning up
[  166.934207] usb 3-1: USB disconnect, device number 2
[  166.971062] blk_update_request: I/O error, dev sda, sector 2056 op 0x1:(WRITE) flags 0x103000 phys_seg 1 prio class 0
[  166.981660] Buffer I/O error on dev sda1, logical block 1, lost async page write
[  166.989111] blk_update_request: I/O error, dev sda, sector 4112 op 0x1:(WRITE) flags 0x103000 phys_seg 2 prio class 0
[  166.999695] Buffer I/O error on dev sda1, logical block 258, lost async page write
[  167.007246] Buffer I/O error on dev sda1, logical block 259, lost async page write
[  167.014847] blk_update_request: I/O error, dev sda, sector 4232 op 0x1:(WRITE) flags 0x103000 phys_seg 1 prio class 0
[  167.025426] Buffer I/O error on dev sda1, logical block 273, lost async page write
[  167.033018] blk_update_request: I/O error, dev sda, sector 4360 op 0x1:(WRITE) flags 0x103000 phys_seg 1 prio class 0
[  167.043593] Buffer I/O error on dev sda1, logical block 289, lost async page write
[  167.051175] blk_update_request: I/O error, dev sda, sector 69896 op 0x1:(WRITE) flags 0x103000 phys_seg 1 prio class 0
[  167.061836] Buffer I/O error on dev sda1, logical block 8481, lost async page write
[  167.069539] blk_update_request: I/O error, dev sda, sector 0 op 0x1:(WRITE) flags 0x800 phys_seg 0 prio class 0
[  167.131317] sd 1:0:0:0: [sdb] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=DRIVER_OK cmd_age=35s
[  167.140958] sd 1:0:0:0: [sdb] tag#0 CDB: opcode=0x2a 2a 00 00 08 40 00 00 08 00 00
[  167.148527] blk_update_request: I/O error, dev sdb, sector 540672 op 0x1:(WRITE) flags 0x800 phys_seg 23 prio class 0
[  167.159113] EXT4-fs warning (device sdb1): ext4_end_bio:348: I/O error 10 writing to inode 14 starting block 67840)
[  167.211127] sd 0:0:0:0: [sda] Synchronizing SCSI cache
[  167.216371] sd 0:0:0:0: [sda] Synchronize Cache(10) failed: Result: hostbyte=0x01 driverbyte=DRIVER_OK
[  167.226804] usb 3-2: USB disconnect, device number 3
[  167.271126] blk_update_request: I/O error, dev sdb, sector 1050760 op 0x1:(WRITE) flags 0x800 phys_seg 2 prio class 0
[  167.281771] Aborting journal on device sdb1-8.
[  167.281806] Buffer I/O error on device sdb1, logical block 65536
[  167.286249] blk_update_request: I/O error, dev sdb, sector 1050624 op 0x1:(WRITE) flags 0x800 phys_seg 1 prio class 0
[  167.292221] Buffer I/O error on device sdb1, logical block 65537
[  167.302769] blk_update_request: I/O error, dev sdb, sector 1050624 op 0x1:(WRITE) flags 0x800 phys_seg 1 prio class 0
[  167.308742] Buffer I/O error on device sdb1, logical block 65538
[  167.319285] Buffer I/O error on dev sdb1, logical block 131072, lost sync page write
[  167.325268] Buffer I/O error on device sdb1, logical block 65539
[  167.333042] Buffer I/O error on dev sdb1, logical block 1, lost async page write
[  167.338947] Buffer I/O error on device sdb1, logical block 65540
[  167.346366] Buffer I/O error on dev sdb1, logical block 185, lost async page write
[  167.352297] Buffer I/O error on device sdb1, logical block 65541
[  167.359813] Buffer I/O error on dev sdb1, logical block 186, lost async page write
[  167.365789] Buffer I/O error on device sdb1, logical block 65542
[  167.373661] JBD2: Error -5 detected when updating journal superblock for sdb1-8.
[  167.379308] Buffer I/O error on device sdb1, logical block 65543
[  167.392652] Buffer I/O error on device sdb1, logical block 65544
[  167.398639] Buffer I/O error on device sdb1, logical block 65545
dd: /mnt/usb2/usb2_128MB: Input/output error
# [  167.441103] sd 1:0:0:0: [sdb] Synchronizing SCSI cache
[  167.446330] sd 1:0:0:0: [sdb] Synchronize Cache(10) failed: Result: hostbyte=0x01 driverbyte=DRIVER_OK
-------------------------------------------------------------------------------------------------------
Now I am debugging the error.Because the error has xHCI host not responding to stop endpoint command.I think the error is between the TUSB7320 and USB Disk(USB3.0 or USB2.0). Could you tell me why the error will happen?
--------------------------------------------------------------------------------------
[  166.871044] xhci_hcd 0000:01:00.0: xHCI host not responding to stop endpoint command.
[  166.878862] xhci_hcd 0000:01:00.0: USBSTS: 0x00000000
[  166.915898] xhci_hcd 0000:01:00.0: Host halt failed, -110
[  166.921274] xhci_hcd 0000:01:00.0: xHCI host controller not responding, assume dead
[  166.928912] xhci_hcd 0000:01:00.0: HC died; cleaning up
--------------------------------------------------------------------------------------
When the error happened,I use lspci command to access PCIe Configuration space.The TUSB7320 PCIe Configuration space can list.
--------------------------------------------------------------------------------------
01:00.0 USB controller: Texas Instruments TUSB73x0 SuperSpeed USB 3.0 xHCI Host Controller (rev 02) (prog-if 30 [XHCI])
        Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr+ Stepping- SERR+ FastB2B- DisINTx+
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0, Cache Line Size: 64 bytes
        Interrupt: pin A routed to IRQ 53
        Region 0: Memory at c0000000 (64-bit, non-prefetchable) [virtual] [size=64K]
        Region 2: Memory at c0010000 (64-bit, non-prefetchable) [virtual] [size=8K]
        Capabilities: [40] Power Management version 3
                Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=100mA PME(D0+,D1+,D2+,D3hot+,D3cold+)
                Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
        Capabilities: [48] MSI: Enable- Count=1/8 Maskable- 64bit+
                Address: 0000000000000000  Data: 0000
        Capabilities: [70] Express (v2) Endpoint, MSI 00
                DevCap: MaxPayload 1024 bytes, PhantFunc 0, Latency L0s unlimited, L1 unlimited
                        ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset- SlotPowerLimit 0.000W
                DevCtl: CorrErr- NonFatalErr- FatalErr- UnsupReq-
                        RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop-
                        MaxPayload 128 bytes, MaxReadReq 512 bytes
                DevSta: CorrErr- NonFatalErr- FatalErr- UnsupReq- AuxPwr+ TransPend-
                LnkCap: Port #0, Speed 5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s <2us, L1 <64us
                        ClockPM+ Surprise- LLActRep- BwNot- ASPMOptComp-
                LnkCtl: ASPM Disabled; RCB 64 bytes, Disabled- CommClk-
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
                LnkSta: Speed 5GT/s (ok), Width x1 (ok)
                        TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
                DevCap2: Completion Timeout: Not Supported, TimeoutDis+ NROPrPrP- LTR-
                         10BitTagComp- 10BitTagReq- OBFF Not Supported, ExtFmt- EETLPPrefix-
                         EmergencyPowerReduction Not Supported, EmergencyPowerReductionInit-
                         FRS- TPHComp- ExtTPHComp-
                         AtomicOpsCap: 32bit- 64bit- 128bitCAS-
                DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis- LTR- OBFF Disabled,
                         AtomicOpsCtl: ReqEn-
                LnkCtl2: Target Link Speed: 5GT/s, EnterCompliance- SpeedDis-
                         Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
                         Compliance De-emphasis: -6dB
                LnkSta2: Current De-emphasis Level: -6dB, EqualizationComplete- EqualizationPhase1-
                         EqualizationPhase2- EqualizationPhase3- LinkEqualizationRequest-
                         Retimer- 2Retimers- CrosslinkRes: unsupported
        Capabilities: [c0] MSI-X: Enable+ Count=8 Masked-
                Vector table: BAR=2 offset=00000000
                PBA: BAR=2 offset=00001000
        Capabilities: [100 v2] Advanced Error Reporting
                UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
                CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr-
                CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr+
                AERCap: First Error Pointer: 00, ECRCGenCap+ ECRCGenEn- ECRCChkCap+ ECRCChkEn-
                        MultHdrRecCap- MultHdrRecEn- TLPPfxPres- HdrLogCap-
                HeaderLog: 00000000 00000000 00000000 00000000
        Capabilities: [150 v1] Device Serial Number 08-00-28-00-00-20-00-00
        Kernel driver in use: xhci_hcd
00: 4c 10 41 82 46 05 10 00 02 30 03 0c 10 00 00 00
10: 04 00 00 00 00 00 00 00 04 00 01 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
30: 00 00 00 00 40 00 00 00 00 00 00 00 35 01 00 00
40: 01 48 83 fe 08 00 00 00 05 70 86 00 00 00 00 00
50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
60: 30 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00
70: 10 c0 02 00 c3 8f 00 00 10 20 10 00 12 5c 07 00
80: 00 00 12 10 00 00 00 00 00 00 00 00 00 00 00 00
90: 00 00 00 00 10 00 00 00 00 00 00 00 00 00 00 00
a0: 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b0: 00 00 00 00 00 00 0f 00 00 00 00 00 00 00 00 00
c0: 11 00 07 80 02 00 00 00 02 10 00 00 00 00 00 00
d0: 00 00 00 00 ab 0d 00 00 1b 00 00 00 3f 00 00 00
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
--------------------------------------------------------------------------------------
And use devmem command to access the TUSB7320 PCIe memory space(BAR0 and BAR2) . It can also list.
--------------------------------------------------------------------------------------
# devmem 0xc0000000 64
0x0400084000960020
--------------------------------------------------------------------------------------
※7-132. Host Controller Capability Register Map
您能帮助检查这个问题吗? 谢谢。
此致、
切里
  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    樱桃:

      对于问题1:已知问题是在为  Linux 系统传输 bark 文件时出现错误。 您 还可以向 Linux 社区咨询吗?

      对于问题2、我将检查 TI.com 上是否有除固件之外的任何源代码。

    此致

    布赖恩

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、Brian、

    感谢您的支持。

    在检查 TUSB7320的主机控制器结构参数1的 MAX_PORTS 时、此字段为04h、表示支持4个端口。 但客户认为 TUSB7320仅支持2个端口。 现在我要使用 Linux 日志进行调试、我想2个端口用于 USB3.0集线器、2个端口用于 USB2.0集线器。
    2个用于 USB3.0集线器的端口+ 2个用于 USB2.0集线器的端口= 4个端口。 对吗?

    如果是、我认为这不违反勘误表。 作为 lspci 命令的消息、寄存器0xE0 (USB 控制寄存器说明)为0x00。 因此、寄存器位(PORT3_DIS 和 PORT4_DIS)为0x00。

    PORT4_DIS†USB 端口4禁用。 当‘位设置为"1"时、TUSB73X0的端口4会被禁用。 对于 TUSB7320、端口4不存在且该位无效。

    Linux 源代码不会设置0xE0 (USB 控制寄存器说明)。 因为下面介绍了勘误表。 因此、我认为这不违反勘误表。
    对吗?

    "问题:对已通过 PCI 配置地址0xE0的 PORT(x)_DIS 位禁用的端口的 PORTSC 或 PORTPMSC 寄存器的访问可能导致控制器无响应。

    权变措施:客户应确保没有尝试访问通过 PORT (x)_DIS 位禁用的端口的 PORTSC 或 PORTPMSC 寄存器。 TI 为此器件提供的驱动程序不会尝试访问禁用的端口、但自定义 xHCI 驱动程序和支持 xHCI 的 BIOS 实现也不会尝试访问禁用的端口、这一点很重要。"

    谢谢。此致、

    切里

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    樱桃:

       TUSB7320与设计相同、TUSB7340刚刚移除了端口3和4。 我需要根据我们的设计检查端口3和4是否被禁用或进行其他操作。

    此致

    布赖恩

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、Brian、

    对于问题1:已知问题是在为  Linux 系统传输 bark 文件时出现错误。 [/报价]

    在从哪个版本的 Linux 内核传输大文件时、您能帮助分享吗? 和文件大小?

    TUSB7320与 TUSB7340相同、只需移除端口3和4。 我需要检查我们的设计、查看端口3和4是否被禁用或执行其他操作。

     感谢您的检查。

    谢谢。此致、

    切里

    [/quote]
  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    樱桃:

       Linux 内核是 v5.10,客户正在从相机传输视频文件,但不能确定文件的大小。

      关于第二个问题、我将在下周一更新。

    最佳

    布赖恩

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    樱桃:

      第二个问题是、TUSB7320与 TUSB7340相同、justn 不同的 M&B 裸片。 因此、 两种器件的主机控制器结构参数 MAX_PORTS 相同。 04h 表示实际4个端口。 4个 USB3端口或4个 USB2端口。

    此致

    布赖恩

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、Brian、

    感谢您的确认。

    TUSB7320是 TUSB7340的同一颗芯片,justn 不同的 M&B。 因此、 两种器件的主机控制器结构参数 MAX_PORTS 相同。 04h 表示实际4个端口。 4个 USB3端口或4个 USB2端口。

    Q2)客户认为 TUSB7320中有2个 USB3端口和2个 USB2端口。 那么04h 意味着2个 USB3端口+ 2个 USB2端口= 4个端口吗?

    Q3) 有关 勘误表、

    作为 lspci 命令的消息、寄存器0xE0 (USB 控制寄存器说明)为0x00。 因此、寄存器位(PORT3_DIS 和 PORT4_DIS)为0x00。

    PORT4_DIS†USB 端口4禁用。 当‘位设置为"1"时、TUSB73X0的端口4会被禁用。 对于 TUSB7320、端口4不存在且该位无效。 Linux 源代码不会设置0xE0 (USB 控制寄存器说明)。 因为下面介绍了勘误表。 因此、我认为这不违反勘误表。 对吗?  

      --------------------------------------------------------------------------------------------------------------------
       Problem: Accesses to the PORTSC or PORTPMSC registers of a port that has been disabled
        via the PORT(x)_DIS bit at PCI configuration address 0xE0 may cause the
        controller to become unresponsive.
        Work Around: Customers should ensure that no access is attempted to the PORTSC or PORTPMSC
        registers of ports that have been disabled via the PORT(x)_DIS bits. The TI-provided
        driver for this device will not attempt to access disabled ports, but it is important that
        custom xHCI drivers and xHCI-aware BIOS implementations also do not attempt to
        access disabled ports.
      --------------------------------------------------------------------------------------------------------------------

    关于问题2,我会检查 TI.com.
    上是否有除固件之外的其他源代码

    Q4)我是否知道是否可以分享任何内容?

    谢谢。此致、

    切里

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    樱桃:

      对于 Q2:4个端口意味着从 端口1到端口4的4个物理端口,而不是2个 USB3端口和2个 USB2端口。

      对于问题3:我同意您的观点、端口3和端口4未禁用、这不 违反勘误表。

      对于 Q4:我们没有要共享的源代码。

    最佳

    布赖恩

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、Brian、

      对于问题1:已知问题是在为  Linux 系统传输 bark 文件时出现错误。 您 也可以向 Linux 社区查询吗?

    我对 Linux 社区没有任何经验。 您能帮助提供有关 Linux 社区的任何 TSUB7320 URL 吗?

      对于 Q2:4个 端口意味着从端口1到端口4的4个物理端口,而不是2个 USB3端口和2个 USB2端口。

    但如何解释下面有关 TUSB7340的数据表。(支持8个端口。)

    [MAX_PORTS]已在表6-6中取消。 HC 结构参数1说明如下。
    ------------------
    对于 TUSB7340、该字段为08h、表示支持8个端口。
    对于 TUSB7320、此字段为04h、表示支持4个端口。
    该字段还指示可在操作寄存器空间中寻址的端口寄存器组的数量。
    ------------------

     对于第4季度:我们没有可共享的源代码。

    关于勘误表、测试了 TI 提供的驱动程序。 你能不能让我知道?" 是 Windows 驱动程序吗?
    -------------------------------------------------------
    TI 为此器件提供的驱动程序不会尝试访问禁用的端口、但自定义 xHCI 驱动程序和支持 xHCI 的 BIOS 实现也不会尝试访问禁用的端口、这一点很重要。
    -------------------------------------------------------

    (只是为了确保在第4季度,我们没有任何可以与最终客户共享的源代码?)

    谢谢。此致、

    切里

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    樱桃:

       问题1:  这是一个很好的来源:

    德州仪器(TI) TUSB73x0超高速 USB 3.0 xHCI 主机控制器(linux-hardware.org)

      问题2: 您是对的,4个端口意味着2个 USB3端口和2个 USB2端口。

      Q4: 是的、 我们没有任何可以与终端客户共享的源代码。

    此致

    布赖恩