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 available bandwidth not reported correctly.

Other Parts Discussed in Thread: TUSB7340, TUSB7320

Problem:
Power Cycling USB peripheral causes TUSB7340 to not report correct bandwidth available.

We are seeing a problem similar to the one described here: https://e2e.ti.com/support/interface/digital_interface/f/130/t/239930

]

[Steps Needed to Recreate Problem:

When we repeatedly reset modems so that they disappear off the bus and must be reenumerated - we do this quite regularly in our software to recover from edge case conditions.  The TI chip starts returning "Not enough bandwidth for new device state." errors after about 10 minutes of resetting.
We need a fix or workaround.
We are using Debian Linux.

]
  • I have some more information. I am not sure if you worked directly with the originator of the other thread.

    I asked my team if we could duplicate our issue with a USB thumb drive by manually connecting and disconnecting the device. The issue being that the amount of reported available bandwidth dwindles to 0.

    Here is the response back:

    Re: connecting a USB thumb drive - it looks like the OP in the TI forum tried that and could not reproduce the issue - he said it only happens with certain types of devices:

    Quoting from: e2e.ti.com/.../239930

    "We find more clues.
    The error is caused by periodic endpoint.
    If we try a device with only bulk and control type, it can execute 4K times normally.
    Do we have any method to clean/reset the host bandwidth, so HC will not reply bandwidth_error when HCD sends configure_endpoint commands?"

    Does TI have any updates they can share with us?

    Tom
  • Hello,
    We're gonna need to duplicate this issue, can you describe step by step how to reproduce it?
    What is the kernel you are using?
    Regards
  • Hi Elias,

    I work with Tom - answers to your questions:

    * We're using kernel 4.1.25
    * Steps to reproduce:

    1) We have a Sierra Wireless EM7455 LTE module installed in a Sierra USB3 dev kit

    2) The dev kit is plugged into a TUSB7340EVM demo board

    3) In Linux, we connect to the AT command port of the EM7455 module, and send the command AT!RESET - our understanding is that this is essentially equivalent to physically unplugging the dev kit from the USB port, and plugging it back in.

    4) We do this 10 times - once a minute over the course of 10 minutes, and end up with the "Not enough bandwidth for new device state." message.
  • Hi Sirs,

    We got same issue.

    We have a design called KiddiCraft leveraging TI TUSB7320 PCIe-USB controller, the project is nearing MP phase but just encounter a USB compatibility issue recently. The issue can be duplicated with high probability with TUSB7320 communicating with USB endpoint in xHCI/USB3.0 modeTo further diagnose the issue and work around.

    We did the experiment with Fedora Core 23 (Linux kernel 4.9) and it passed the same stress test. It says that there may be a solution from driver side. But we are using Linux kernel 3.10 and it's usb driver architecture are big different from 4.9.

    Is any method to set TUSB controller to USB2.0 mode by EEPROM register?

    We find that intel did provide this feature.

    Thanks for your reply

  • Hi Sirs,
    About this case, could you help share experience for us?? Thanks!!
  • Hello Shu-Cheng,

    We have been able to identify that the issue referenced above by Tom, where the controller is responding with a bandwidth error  is occurring with USB devices having Interrupt & Isochronous endpoints with speeds greater than or equal to HIGH speed.

    The issue is originated by a known device errata that is properly documented at the "Driver Workarounds for TUSB73x0 USB3.0 xHCI Host

    Controller Errata"

    The errata states  that:

    "The periodic EP scheduler always tries to schedule the EPs that have large intervals (interval equal to or greater than 128 microframes) into different microframes. So it maintains an internal counter and increments for each large interval EP added. When the counter is greater than 128, the scheduler rejects the new EP. So when the hub re-enumerated 128 times, it triggers this condition."

    As a workaround, it is recommended that the xHCI driver uses a maximum device endpoint interval of value of 7.

    The attached xHCI driver patch is based on mainline Linux v4.10-rc5

    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/138/0001_2D00_usb_2D00_xhci_2D00_bInterval_2D00_quirk_2D00_for_2D00_TI_2D00_TUSB73x0.patch

  • Hello Shu-Cheng,

    The issue referenced above in this post hasn't been addressed in Linux kernel version 4.9, so I do not think this is the same issue.

    The Linux community has been implementing a lot of workarounds on their USB driver stack since kernel version 3.10, hence we recommend moving to the latest kernel version available.

    Unfortunately our controller has no register setting to disable SuperSpeed capability on its ports.

    Regards,
    Jorge