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: When transmitting big size file(Ex.32MByte) with USB Disk(USB3.0 or USB2.0), there will be some errors

Part Number: TUSB7320
Other Parts Discussed in Thread: TUSB7340

Hi Team,

OS:Linux kernel
1) IC TUSB7320 (USB3.0 Host )is being used to realize the function of USB3.0 HOST in customer's project. But when transmitting big size file(Ex.128MByte) with USB Disk(USB3.0 or USB2.0),error will happen(the error rate is about 95%). When transmitting big size file(Ex.32MByte) with USB Disk(USB3.0 or USB2.0),error will happen(the error rate is about 1%).
The error message is as follows:
[  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
So the customer wonders the error is from TUSB7320 and USB Disk(USB3.0 or USB2.0).
2) After checking, it was found the TUSB73x0 USB3.0 xHCI Controller Errata. TUSB73x0 USB3.0 xHCI Controller Errata (Rev. B) (ti.com.cn), But the source code that the errata comment cannot be found, could you help share how to get the source code?
Detailed description:
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
Could you help check this case? Thanks.
Best Regards,
Cherry
  • Cherry:

        For question 1: It's known issue to have errors when transferring balk files for Linux system. Can you check with linux community too?

        For question 2, I will check if we have any source code other than firmware on TI.com.

    Regards

    Brian

  • Hi Brian,

    Thank you for the support.

    When checking the MAX_PORTS of Host Controller Structural Parameters 1, for the TUSB7320, this field is 04h to indicate that 4 ports are supported. But the customer thinks TUSB7320 only supports 2 ports. Now I am debugging with the linux log,I guess the 2 ports for the USB3.0 HUB and the 2 ports for the USB2.0 HUB.
    2 ports for the USB3.0 HUB + the 2 ports for the USB2.0 HUB = 4 ports. Is it right?

    If so, I think it does not violate the errata. As the message of lspci command,the register 0xE0(USB Control Register Description) is 0x00. So the register bits( PORT3_DIS and PORT4_DIS) is 0x00.

    PORT4_DIS† USB Port 4 Disable. When this bit is set to ‘1’, port 4 of the TUSB73X0 is disabled. For the TUSB7320 Port 4 is not present and this bit has no effect.

    And the Linux source code does not set the 0xE0(USB Control Register Description). Because the errata is described below. So I think it does not violate the errata.
    Is it right?

    "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."

    Thanks and regards,

    Cherry

  • Cherry:

         TUSB7320 is the same design with TUSB7340 just removed port 3 and 4. I need to check with our design if port 3 and 4 got disabled or doing something else.

    Regards

    Brian

  • Hi Brian,

    For question 1: It's known issue to have errors when transferring balk files for Linux system.

    Could you help share when transferring big size file from which version of Linux kernel? And the file size when transferring?

    TUSB7320 is the same design with TUSB7340 just removed port 3 and 4. I need to check with our design if port 3 and 4 got disabled or doing something else.

     Thank you for the checking.

    Thanks and regards,

    Cherry

  • Cherry:

        Linux kernel is V5.10 , customer were transferring Video files from camera, but not sure what size of the file.

       For 2nd question, I will update next Monday.

    Best

    Brian

  • Cherry:

       For 2nd question, TUSB7320 is the same die of TUSB7340,justn different M&B. So the MAX_PORTS of Host Controller Structural Parameters is same for both devices. 04h mean real 4 ports. Either 4 USB3 ports or 4 USB2 ports.

    Regards

    Brian

  • Hi Brian,

    Thank you for the confirmation.

    TUSB7320 is the same die of TUSB7340,justn different M&B. So the MAX_PORTS of Host Controller Structural Parameters is same for both devices. 04h mean real 4 ports. Either 4 USB3 ports or 4 USB2 ports.

    Q2) The customer think that there are 2 USB3 ports and 2 USB2 ports in the TUSB7320. So does 04h mean 2 USB3 ports + 2 USB2 ports = 4 ports?

    Q3) Regarding the errata,

    As the message of lspci command,the register 0xE0(USB Control Register Description) is 0x00. So the register bits( PORT3_DIS and PORT4_DIS) is 0x00.

    PORT4_DIS† USB Port 4 Disable. When this bit is set to ‘1’, port 4 of the TUSB73X0 is disabled. For the TUSB7320 Port 4 is not present and this bit has no effect. And the Linux source code does not set the 0xE0(USB Control Register Description). Because the errata is described below. So I think it does not violate the errata. Is it right?  

      --------------------------------------------------------------------------------------------------------------------
       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.
      --------------------------------------------------------------------------------------------------------------------

    For question 2, I will check if we have any source code other than firmware on TI.com.

    Q4) May I know if there's anything can be shared?

    Thanks and regards,

    Cherry

  • Cherry:

        For Q2: 4 ports mean 4 physical ports from  port1 to port4, not 2 USB3 ports and 2 USB2 ports.

        for Q3: I agree with you, port 3 and port 4 are not disabled, it's not violate the errata.

        For Q4: We don't have source code to share.

    Best

    Brian

  • Hi Brian,

        For question 1: It's known issue to have errors when transferring balk files for Linux system. Can you check with linux community too?

    I have no experience about linux community. Could you help give any url about TSUB7320 about linux community?

        For Q2: 4 ports mean 4 physical ports from  port1 to port4, not 2 USB3 ports and 2 USB2 ports.

    But how about to explain the datasheet below about TUSB7340.(8 ports are supported.)

    [MAX_PORTS] is discribed in Table 6-6. HC Structural Parameters 1 Description as below.
    --------------------------------------------------------------------------------
    For the TUSB7340, this field is 08h to indicate that 8 ports are supported.
    For the TUSB7320, this field is 04h to indicate that 4 ports are supported.
    This field also indicates the number of sets of port registers that are addressable in the Operational Register Space.
    --------------------------------------------------------------------------------

      For Q4: We don't have source code to share.

    About the errata, TI-provided driver is metioned. Could you privode it to me? Is it windows driver?
    ---------------------------------------------------------------
    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.
    ---------------------------------------------------------------

    (Just to make sure on Q4, we don't have any source code that can share with the end customer right? )

    Thanks and regards,

    Cherry

  • Cherry:

         Q1:    this is a good source:

    Texas Instruments TUSB73x0 SuperSpeed USB 3.0 xHCI Host Controller (linux-hardware.org)

        Q2:  you are right, 4 ports means 2 USb3 ports and 2 USB2 ports.

        Q4:  yes, we don't have any source code that can share with the end customer.

    Regards

    Brian