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.

TUSB7340: TUSB73x0 SuperSpeed USB 3.0 xHCI Bulk/isochronous error

Part Number: TUSB7340

Hi 

We are using Texas Instruments TUSB73x0 SuperSpeed USB 3.0 xHCI Host Controller (rev 02). each xHCI HC connect to 3 USB camera directly. 

Camera 1:  1200*1200*16*30 = 691200000b/s ~ 700Mb/s

Camera 2:  1200*1200*16*30  = 691200000b/s ~ 700Mb/s

Camera 3: 1920*1200*16*20 = 737280000b/s ~ 740Mb/s

1200 x 1200 or 1920 x 1200 are picture resolution(number of pixel for each picture).

16 is  YUV encoding, each pixel needs 16bit. 

30/20 are frame rate.

if we using bulk transaction.  some times we got following error from kernel message, it is not easy to reproduce, but we got those error from time to time.

[Thu Apr 6 20:28:53 2023] uvcvideo: Non-zero status (-71) in video completion handler.
[Thu Apr 6 20:28:53 2023] xhci_hcd 0000:77:00.0: Transfer error for slot 2 ep 6 on endpoint
[Thu Apr 6 20:28:53 2023] uvcvideo: Non-zero status (-71) in video completion handler.
[Thu Apr 6 20:28:53 2023] xhci_hcd 0000:77:00.0: Transfer error for slot 2 ep 6 on endpoint
those error msg from this kernel code:
Do you have any idea what this error means?  what can we do to avoid those errors?
If we change camera to use isochronous transaction.  we can only enable one isochronous camera.
from 2nd USB camera, will get following error.
usb 10-2: Not enough bandwidth for new device state.
usb 10-2: Not enough bandwidth for altsetting 1
Detail logs.
[176505.200808] uvcvideo: Device requested 46080 B/frame bandwidth.
[176505.200811] uvcvideo: Selecting alternate setting 1 (46080 B/frame bandwidth).
[176505.200812] uvcvideo: Device requested 46080 B/frame bandwidth.
[176505.200814] uvcvideo: Selecting alternate setting 1 (46080 B/frame bandwidth).
[176505.200860] xhci_hcd 0000:49:00.0: add ep 0x83, slot id 3, new drop flags = 0x0, new add flags = 0x81
[176505.200864] xhci_hcd 0000:49:00.0: xhci_check_bandwidth called for udev 00000000dfb1a7cc
[176505.200876] xhci_hcd 0000:49:00.0: // Ding dong!
[176505.201309] xhci_hcd 0000:49:00.0: Successful Endpoint Configure command
[176505.201469] xhci_hcd 0000:49:00.0: add ep 0x83, slot id 2, new drop flags = 0x0, new add flags = 0x81
[176505.201473] xhci_hcd 0000:49:00.0: xhci_check_bandwidth called for udev 000000004bbf2dcd
[176505.201483] xhci_hcd 0000:49:00.0: // Ding dong!
[176505.201542] usb 10-2: Not enough bandwidth for new device state.
[176505.201547] xhci_hcd 0000:49:00.0: xhci_reset_bandwidth called for udev 000000004bbf2dcd
[176505.201620] usb 10-2: Not enough bandwidth for altsetting 1
[176505.201625] xhci_hcd 0000:49:00.0: xhci_check_bandwidth called for udev 000000004bbf2dcd
[176505.330084] xhci_hcd 0000:49:00.0: xhci_hub_status_data: stopping port polling.
[176505.687380] uvcvideo: Allocated 64 URB buffers of 8x46080 bytes each.
[176505.687615] xhci_hcd 0000:49:00.0: ERROR no room on ep ring, try ring expansion
[176505.687629] xhci_hcd 0000:49:00.0: ring expansion succeed, now has 4 segments
I attached lsusb -v result here: 
lsusb -d 04b4:1103 -v
Bus 012 Device 040: ID 04b4:1103 Cypress Semiconductor Corp.
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               3.10
  bDeviceClass          239 Miscellaneous Device
  bDeviceSubClass         2 ?
  bDeviceProtocol         1 Interface Association
  bMaxPacketSize0         9
  idVendor           0x04b4 Cypress Semiconductor Corp.
  idProduct          0x1103
  bcdDevice            0.00
  iManufacturer           1
  iProduct                2
  iSerial                 0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength          218
    bNumInterfaces          2
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              100mA
    Interface Association:
      bLength                 8
      bDescriptorType        11
      bFirstInterface         0
      bInterfaceCount         2
      bFunctionClass         14 Video
      bFunctionSubClass       3 Video Interface Collection
      bFunctionProtocol       0
      iFunction               2
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass        14 Video
      bInterfaceSubClass      1 Video Control
      bInterfaceProtocol      0
      iInterface              2
      VideoStreaming Interface Descriptor:
        bLength                            30
        bDescriptorType                    36
        bDescriptorSubtype                  5 (FRAME_UNCOMPRESSED)
        bFrameIndex                         1
        bmCapabilities                   0x01
          Still image supported
        wWidth                           1920
        wHeight                          1200
        dwMinBitRate                737280000
        dwMaxBitRate                737280000
        dwMaxVideoFrameBufferSize     4608000
        dwDefaultFrameInterval        1000000
        bFrameIntervalType                  1
        dwFrameInterval( 0)           1000000
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       1
      bNumEndpoints           1
      bInterfaceClass        14 Video
      bInterfaceSubClass      2 Video Streaming
      bInterfaceProtocol      0
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 1024 bytes
        bInterval               1
        bMaxBurst              14
        Mult                    2
my question is: 
USB 3.0 theoretical  bandwidth is 5.0Gb/s,  10b/8b encoding, it's 4.0Gb/s.  I understand there are some protocol overhead, 
but each camera cost ~ 700Mbps,  3 camera total is < 3Gbps. 
why we can not using isochronous for 3 camera?
is there any suggestion for improve stability of those 3 camera?
do you happen to have any benchmark result for TUSB73x0 that can share with us?  thanks.
  • could be limited by PCIe. let me check with system guy.

    Regards

    Brian

  • HI Brian

    Thanks for response. do you get any feedback from system team? I attached lspci info for TUSB73x0  here.  Link speed is 5GT/s.

    ~$ sudo lspci -s 75:00.0 -vvv
    [sudo] password for dev:
    75: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 26
    	Region 0: Memory at c5e00000 (64-bit, non-prefetchable) [size=64K]
    	Region 2: Memory at c5e10000 (64-bit, non-prefetchable) [size=8K]
    	Capabilities: [40] Power Management version 3
    		Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA 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-
    		DevCtl:	Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
    			RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop-
    			MaxPayload 256 bytes, MaxReadReq 512 bytes
    		DevSta:	CorrErr+ UncorrErr- FatalErr- UnsuppReq+ AuxPwr- TransPend-
    		LnkCap:	Port #0, Speed 5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s <512ns, L1 <64us
    			ClockPM+ Surprise- LLActRep- BwNot- ASPMOptComp-
    		LnkCtl:	ASPM Disabled; RCB 64 bytes Disabled- CommClk+
    			ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
    		LnkSta:	Speed 5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
    		DevCap2: Completion Timeout: Not Supported, TimeoutDis+, LTR-, OBFF Not Supported
    		DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR-, OBFF Disabled
    		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-
    	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- NonFatalErr-
    		CEMsk:	RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
    		AERCap:	First Error Pointer: 00, GenCap+ CGenEn- ChkCap+ ChkEn-
    	Capabilities: [150 v1] Device Serial Number 08-00-28-00-00-20-00-00
    	Kernel driver in use: xhci_hcd

  • our System guy suggest to ask admin@usb.org, they may have better explanation.

    regards

    Brian

  • HI Brain

    I have sent email to admin@usb.org and techadmin@usb.org, but haven't got any response yet? 

    not sure if you system team have any other suggestion? thanks

  • He has no other suggestion, let's wait and see what USB.org says.

    Regadrs

    Brian

  • Hi Brain

    I got response from usb.org. and they said: "Unfortunately, I must refer to back to TI.". looks it a dead loop.  what's the next step we can do? thanks.

  • ok, let me dig it  out.

    regards

    Brian

  • HI brain

    We use a USB 3.0 protocol analyzer in between, for bulk transaction, when the issue happens, we captured lots of error.  HOSTerr. and retry.

    From https://www.ti.com/lit/ds/symlink/tusb7340.pdf?ts=1684093075880&ref_url=https%253A%252F%252Fwww.google.com%252F

    I saw TUSB73x0 also provide 7.5.1.65 De-Emphasis and Swing Control Register. please check 7.5.1.65.

    Do you have any tool to tune this De-Emphasis? 

    why HostErr happens, does TUSB73x0 provide any debugging register? thanks.

  • We do have tool and you can try. can you accept my friendship request?

  • I accepted. thanks.

  • thanks brain,

    With  USB 3.0 protocol analyzer. we found TUSB 73x0 Set Host Error BIT.

    From http://www.softelectro.ru/usb30.pdf USB 3.0 spec, Section 8.5.1  Acknowledgement (ACK) Transaction Packet  (page 241)

    Host Error (HE). This field is only valid when the ACK TP is sent from the host to a device. This bit shall be set if the host was unable to accept a valid data packet due to internal host issues. When the host sets this field, it must also set the Retry Data Packet field for a non-isochronous transfer.

    My question is:  why TUSB 73x0 set Host Error? do we have some status register or debugging register, we can dump out find the details?  Thanks.

  • Let me check with our system .

    Regards

    Brian

  • HI Brain

    Do you got any feedback. thanks.

  • Sorry, can you wait?  He will be back next Monday.

    Regards

    Brian

  • hi Brian

    did anyone got a chance on this? thanks.

  • it maybe Linux driver issue, did you try to get help from linux community?

    Regards

    Brian