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.

AM3352: Issue with USB2412 Hub and Bluegiga BT dongle

Part Number: AM3352

Sitara Family and Friends,

One of our good friends has seen an interesting phenomenon with the AM3352 Sitara USB controller.  Looking to see if any has witnessed this before also and/or any comments or input one may have.

-----

We have one of the 2 ports of the AM335x configured in HOST mode and connected to a USB2412 HUB  (full-speed) from Microchip.

On one of the HUB ports, we have a Bluetooth dongle from Bluegiga (full speed device).

 

We have several products installed in the field where the customer is complaining of problems with the BT dongle. 

In our office, we can reproduce a problem similar to what the customer describes by forcing a software reset of the BT dongle (special command of BlueGiga API).

The device would disconnect from the USB bus and reconnect.  It takes usually 6-7 SW reset to make the HOST/HUB connection crash.

The problem seems to be at the “Get descriptor” frame (a split frame) as showed below (line 1571):

The kernel log looks as follows:

[  329.492575] usb 2-1.1: USB disconnect, device number 3

[  338.491957] usb 2-1.1: new full-speed USB device number 4 using musb-hdrc

[  338.602454] usb 2-1.1: New USB device found, idVendor=2458, idProduct=0001

[  338.609488] usb 2-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3

[  338.618623] usb 2-1.1: Product: Low Energy Dongle

[  338.624371] usb 2-1.1: Manufacturer: Bluegiga

[  338.629662] usb 2-1.1: SerialNumber: 1

[  338.768849] cdc_acm 2-1.1:1.0: ttyACM0: USB ACM device

[  338.783345] usbcore: registered new interface driver cdc_acm

[  338.801037] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters

[  381.420616] usb 2-1.1: USB disconnect, device number 4

[  381.600196] musb-hdrc musb-hdrc.1: Babble

[  381.908013] usb 2-1: reset high-speed USB device number 2 using musb-hdrc

[  382.160175] usb 2-1: USB disconnect, device number 2

[  382.439959] usb 2-1: new high-speed USB device number 5 using musb-hdrc

[  382.584265] usb 2-1: New USB device found, idVendor=0424, idProduct=2412

[  382.591064] usb 2-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0

[  382.608613] hub 2-1:1.0: USB hub found

[  382.616016] hub 2-1:1.0: 2 ports detected

[  383.367959] usb 2-1.1: new full-speed USB device number 6 using musb-hdrc

[  383.478322] usb 2-1.1: New USB device found, idVendor=2458, idProduct=0001

[  383.485355] usb 2-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3

[  383.495276] usb 2-1.1: Product: Low Energy Dongle

[  383.502293] usb 2-1.1: Manufacturer: Bluegiga

[  383.508047] usb 2-1.1: SerialNumber: 1

[  383.521580] cdc_acm 2-1.1:1.0: ttyACM0: USB ACM device

[  391.736523] usb 2-1.1: USB disconnect, device number 6

[  392.363957] usb 2-1.1: new full-speed USB device number 7 using musb-hdrc

[  392.474088] usb 2-1.1: New USB device found, idVendor=2458, idProduct=0001

[  392.481122] usb 2-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3

[  392.490127] usb 2-1.1: Product: Low Energy Dongle

[  392.495852] usb 2-1.1: Manufacturer: Bluegiga

[  392.501087] usb 2-1.1: SerialNumber: 1

[  392.513977] cdc_acm 2-1.1:1.0: ttyACM0: USB ACM device

[  403.292595] usb 2-1.1: USB disconnect, device number 7

[  403.915957] usb 2-1.1: new full-speed USB device number 8 using musb-hdrc

[  404.026187] usb 2-1.1: New USB device found, idVendor=2458, idProduct=0001

[  404.033220] usb 2-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3

[  404.042066] usb 2-1.1: Product: Low Energy Dongle

[  404.047807] usb 2-1.1: Manufacturer: Bluegiga

[  404.052280] usb 2-1.1: SerialNumber: 1

[  404.065860] cdc_acm 2-1.1:1.0: ttyACM0: USB ACM device

[  414.588619] usb 2-1.1: USB disconnect, device number 8

[  415.231960] usb 2-1.1: new full-speed USB device number 9 using musb-hdrc

[  415.342288] usb 2-1.1: New USB device found, idVendor=2458, idProduct=0001

[  415.349322] usb 2-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3

[  415.358152] usb 2-1.1: Product: Low Energy Dongle

[  415.363839] usb 2-1.1: Manufacturer: Bluegiga

[  415.369049] usb 2-1.1: SerialNumber: 1

[  415.381877] cdc_acm 2-1.1:1.0: ttyACM0: USB ACM device

[  422.832516] usb 2-1.1: USB disconnect, device number 9

[  423.491958] usb 2-1.1: new full-speed USB device number 10 using musb-hdrc

[  428.664989] usb 2-1.1: device descriptor read/64, error -110

[  444.279954] usb 2-1.1: device descriptor read/64, error -110

[  444.471957] usb 2-1.1: new full-speed USB device number 11 using musb-hdrc

[  449.655955] usb 2-1.1: device descriptor read/64, error -110

[  465.271954] usb 2-1.1: device descriptor read/64, error -110

[  465.463956] usb 2-1.1: new full-speed USB device number 12 using musb-hdrc

[  476.151961] usb 2-1.1: device not accepting address 12, error -110

[  476.235958] usb 2-1.1: new full-speed USB device number 13 using musb-hdrc

[  486.903951] usb 2-1.1: device not accepting address 13, error -110

[  486.910338] usb 2-1-port1: unable to enumerate USB device

 

Finally, we can interestingly reproduce this problem with a Beaglebone Black, an EVB-USB2422 development board and a BLED112 dongle;

BeagleBoard.org Debian Image 2017-03-19

Linux beaglebone 4.9.41 #24 SMP PREEMPT Fri Sep 29 15:36:47 EDT 2017 armv7l GNU/Linux

Kernel from https://github.com/beagleboard/linux

 

We were not able to reproduce this problem with another host CPU and this HUB from Microchip; hence the main reason why we are asking for feedback.

-----

I'd appreciate any comments.

TY,
CY

  • Friends,

    I forgot to add:

    One more thing, the USB protocol analyzer (Total Phase) complains about Errors:
    I - Invalid PID sequence

    But while analyzing the frames many times, one cannot find the reason for that.

    TY,
    CY
  • Chris,

    We do not support Debian. Do you see the same issue with the AM335x Processor SDK?
  • Hello Biser,

    I realize that our preference would be for the customer to use our TI Processor SDK, but I also recall that Beaglebone.org supports both Ubuntu (and Debian) with their AM335x platforms;  therefore, although I'll double-check, I'm not sure of this.

    Further comments welcomed!

    Thank you,
    Chris

  • Beagleboard.org may support Debian and Ubuntu on AM335x, however TI supports only the AM335x Processor SDK.
  • Team,

    More clarity from customer:
    -----
    Just to illustrate the problem we are facing:

    AM335x HS USB HOST -->USB2412 2 port hub--> BLED112 FS Device

    The problem seems to be specific to split packets; when the HOST sends split packets to the hub for a FullSpeed device.
    The easiest way we can reproduce this is by sending a SW Reset to the BLED112 dongle (echo -en '\x00\x01\x09\x00\x00' > /dev/ttyACM0)
    The BLED112 dongle then reset itself, comes back to life (connect event detected). The (Get device descriptor) request from the HOST will fail (Hub returns a NAK) and the HOST state machine doesn’t seems to recover from this.

    I have installed a pre-build image of the latest SDK (v4.01) from there:
    www.ti.com/.../PROCESSOR-SDK-AM335X

    I am not able to reproduce the problem because of how the OS send’s the SW reset packets to the dongle. We currently do this by a shell script that write the data directly to the ttyACM port but this is not working on the Arago build (can’t see why right now). The dongle doesn’t accept the SW reset packet (nothing related to the bug we have with the HUB. It’s simply how the tty comm pass through the virtual port).

    As I might not be able to send you the EVB-USB2422 board that Microchip loaned me, I imagined another setup…
    I was reviewing the AM335x Schematic and I remembered that the USB2412 HUB is also on this board but (it’s simply wired in reserve direction vs. our application. )
    The USB2412 is connected on the downstream side to USB0 port of the AM335x.
    I believe you could reproduce the problem by setting USB0 port of a StarterKit (let’s call it A) as a FULL Speed device (not high speed).
    On the upstream side of the USB2412 (micro-AB connector) you could attach another AM335x (Starter kit; let’s call it B) as HIGH speed host.

    On Starter kit A, you could force the port USB0 to go down and back up.
    Here is a diagram of the proposed test setup:

    AM335x Starter Kit A
    AM335x FS USB DEVICE -->USB2412 2 port hub--> AM335x Starter Kit B FS USB Host
    -----
    Comments indeed welcomed.

    Regards,
    Chris
  • Chris,

    Both the kernel log and the bus trace show that the full-speed hub is enumerated as high-speed after reset, this might be the reason the BT dongle enumeration failed.

    Please try the following two changes together to see if the issue still happens.

    - Add "usbcore.autosuspend=-1" into the u-boot bootargs;

    - Apply the following patch to the kernel to force the usb controller to full-speed mode.

    diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
    index 7abcfa8a1a64..8fed77067486 100644
    --- a/arch/arm/boot/dts/am33xx.dtsi
    +++ b/arch/arm/boot/dts/am33xx.dtsi
    @@ -670,6 +670,7 @@
     				interrupts = <18>;
     				interrupt-names = "mc";
     				dr_mode = "otg";
    +				maximum-speed = "full-speed";
     				mentor,multipoint = <1>;
     				mentor,num-eps = <16>;
     				mentor,ram-bits = <12>;
    @@ -716,6 +717,7 @@
     				reg-names = "mc", "control";
     				interrupts = <19>;
     				interrupt-names = "mc";
    +				maximum-speed = "full-speed";
     				dr_mode = "otg";
     				mentor,multipoint = <1>;
     				mentor,num-eps = <16>;
    
  • Bin,

    Thank you! So actually, the HUB is a High speed and the customer wants it to be high speed because they apparently also plug a WIFI dongle on the other port of the HUB…

    But the BT dongle is a full-speed device, so the HUB has to do the speed translation…

    They are pretty convinced that it’s this specific case that cause the Get device descriptor request to fail, but they just don’t know why (as it’s pretty standard and works most of the time).

    Microchip believes there is something happening on the line that their protocol analyzer doesn’t see (but they don’t have proof for this).

    They will try your suggestions since, as you noted, the USB Power Management function could possibly be involved here.

    TY,
    CY
  • Chris,

    Ahh, your first post says the hub is full-speed, I didn't check its datasheet...
  • Hi Bin,

    Yeah, that was my fault, sorry about that. They are going to try your suggestions but any additional comments from your side are more than welcomed!

    Thanks again,
    Chris
  • Chris,

    No worries ;)
    if my suggestions make difference, try only apply the uboot bootargs parameter, but not the dts change to see how it goes, because we know the hub has to work in high-speed mode.
    Meanwhile I will search the history to see if we had similar issues in the last few years.
  • Hello Bin,

    For clarification purposes, when you say “uboot bootargs parameter” we assume you mean the arguments passed to the kernel “bootargs= …….”
    If so, they just tried it and I still have the problem unfortunately. Still trying…and we realize that was not necessarily a "fix-all"...

    If not, and our understanding is incorrect, please let me know otherwise.

    Appreciate any additional history or guidance you can provide.

    Regards,
    Chris
  • Yes, it is it.
    Did the customer try forcing the usb controller to full-speed as well?
    I am trying to see if I can reproduce the issue with my SMSC2514 and BT dongles...
  • Chris,

    From the log you provided in the first post, I understand the situation was that when resetting the BT dongle, the USB babble condition happened during re-enumerating the usb hub and the BT dongles, then the following BT dongle enumeration failed.

    I connected 2 BT dongles to SMSC2514 hub then to the USB1 port on AM335x GP EVM. Since my BT dongle doesn't create any device node under /dev, I am not sure how to reset the dongle from the command line. But we can force the USB controller to generate a fake babble event to trigger the driver to execute a same handling routine.

    So I run 'devmem2 0x4740182c w 4' in the uart console to trigger the babble condition and re-enumeration, but I am unable to reproduce the failure. Can you please try if you can use 'devmem2 0x4740182c w 4' on your setup to trigger the failure?
  • Chris,

    Chris Yorkey said:
    [  381.600196] musb-hdrc musb-hdrc.1: Babble

    This line in the log tells babble condition happened.

    Can you please check with the customer that if this babble condition always happens whenever the enumeration failed? Or sometimes there is no such babble condition in the log but the enumeration still failed? I want to see if the babble condition is relevant to the enumeration failure or not.

    Since there is a lot of kernel logs generated in the test, you would have to pay more attention when checking for the babble message.

  • Bin,

    From customer:
    -----
    We believe (from our conversations with Microchip and my own experience) that we cannot reproduce this bug on a USB2514 as it’s a multi TT device. The USB2412/2422 is a single TT device and we believe they problem comes from this specific case. Maybe the driver doesn’t handle well some single TT HUB…

    I personally test the USB2514 many times (over 100) and I couldn’t recreate the bug. This is why I recommend using a Starter Kit to test (the evaluation boards for the USB2422 being discontinued)

    Another thing I was able to test yesterday is the fact that I can reproduce the bug without the “special” SW reset call specific to the Gluegiga dongle...I simply connect a BT dongle on the USB HUB, then I open the ttyACM port with a terminal SW (minicom.py if I recall correctly). Then I disconnect (physically) the dongle and I plug it back on.
    I repeated these steps 8-10 times to make it crash.
    -----
    Thanks,
    Chris
  • Bin,

    Also:
    -----
    Just to let you know, I do sometimes see the babble interrupt when I reset the BT device, but not necessarily when the bug happen.
    On the kernel log I gave you, the babble interrupt happen when the BT dongle has address 4, but I did reset the dongle 5 times after this babble interrupt, and the BT device successfully enumerated until device #9
    Basically, you will see “ usb 2-1.1: USB disconnect, device number x” every time I send the SW reset as it’s the only device connected to the HUB during my test.
    It’s only after I reset the BT dongle with device number 9 that the bug occurred.
    -----
    Thank you again,
    Chris
  • Chris,

    Thanks for the info. it appears the issue is not related to babble condition.

    What is the "Starter Kit' in your previous post? Not AM335x Starter Kit evm, right? Do I still need a SMSC2412 hub to reproduce the issue?

    Be honest, if the issue is related to only single TT hub, it not a trivial investigation, and a USB hw expert is also needed to get involved, the root cause would't be discovered very soon. Please set the proper expectation with your customer.

  • Bin,

    First off, thank you so much for your help thus far.  Couldn't get this far without your guidance.  

    Secondly, yes, AM335x Starter Kit.  Here is a graphic above.

    Lastly, I agree with you 100%.  I believe they have been working on this for some time at the customer site as well, so it is not trivial.

    Let me set the proper expectation and find out more.

    Thank you again,
    Chris

  • Bin,

    Further...

    After reviewing the AM335x Schematic the USB2412 HUB is also on this board but (it’s simply wired in reserve direction vs. their application. )

    The USB2412 is connected on the downstream side to USB0 port of the AM335x.   I believe you could reproduce the problem by setting USB0 port of a StarterKit  (let’s call it A) as a FULL Speed device (not high speed).  On the upstream side of the USB2412 (micro-AB connector) you could attach another AM335x (Starter kit;  let’s call it B) as HIGH speed host.

    On Starter kit A, you could force the port USB0 to go down and back up.  Here is a diagram of the proposed test setup:

    Thanks again,

    Chris

  • Chris,

    It sounds like a good plan. I knew there is a hub on the usb0 port of the starter kit, but never checked its schematics it is USB2412.
    I will try to locate a starter kit and let you know how my test goes.
  • Bin,

    That would be fantastic. Thank you.

    Also, some further input:
    -----

    As you may know, we also have people at SMSC/Microchip investigation this issue. They are looking on their side of the problem (the HUB). I send them a BBB with my kernel build and script so they can investigate.
    We have a follow-up call with them on Friday…

    From the TI side, we would like to make sure that the host state machine (and/or USB driver stack) is not the issue. I did many test with different HUB and the AM335x and could not reproduce the problem; but I also briefly tested the USB2422 with other host and couldn’t reproduce the problem. So it seems to be a combination of the 2 (am335x and usb2422+ full-speed device).
    I don’t believe the problem is related to a BT dongle emulating a ttyACM port. I believe any type of Full-Speed device with some data exchange with the host could trigger the issue.

    I have one of our custom board almost ready to ship to you if you want. It has the Debian/Kernel distribution running from eMMC with some of our HW specific features.
    I believe I could also send you our dts files if you want to use another kernel/OS on the same HW. Let me know if it’s interesting for you or you prefer to test with the 2 Starter Kits.

    Speaking of Starter kit, I has just running a test with it and USB2422 dev board + TI SDK OS.
    The error I got is:
    [ 1422.067286] usb 2-1.1: new full-speed USB device number 17 using musb-hdrc
    [ 1422.234494] cdc_acm 2-1.1:1.0: ttyACM0: USB ACM device
    [ 1425.039912] usb 2-1.1: USB disconnect, device number 17
    [ 1425.797155] usb 2-1.1: new full-speed USB device number 18 using musb-hdrc
    [ 1425.942433] cdc_acm 2-1.1:1.0: ttyACM0: USB ACM device
    [ 1480.737784] usb 2-1.1: USB disconnect, device number 18
    [ 1481.257145] usb 2-1.1: new full-speed USB device number 19 using musb-hdrc
    [ 1481.403105] cdc_acm 2-1.1:1.0: ttyACM0: USB ACM device
    [ 1506.593871] usb 2-1.1: USB disconnect, device number 19
    [ 1511.317268] usb usb2-port1: Cannot enable. Maybe the USB cable is bad?
    [ 1515.637234] usb usb2-port1: Cannot enable. Maybe the USB cable is bad?
    [ 1519.957234] usb usb2-port1: Cannot enable. Maybe the USB cable is bad?
    [ 1524.277233] usb usb2-port1: Cannot enable. Maybe the USB cable is bad?
    [ 1524.291675] usb 2-1: USB disconnect, device number 2
    [ 1528.647315] usb usb2-port1: Cannot enable. Maybe the USB cable is bad?
    [ 1532.967234] usb usb2-port1: Cannot enable. Maybe the USB cable is bad?
    [ 1537.287358] usb usb2-port1: Cannot enable. Maybe the USB cable is bad?
    [ 1541.607233] usb usb2-port1: Cannot enable. Maybe the USB cable is bad?
    [ 1541.614053] usb usb2-port1: unable to enumerate USB device

    And even if I unplug or reset the HUB, there is no way I can bring it to life… Cable comes from Microchip dev kit, so I assume they ship good quality cable…
    (I don’t have the USB analyzer hooked to my setup right now because I have to share it with another developer working on the issue…) I’ll try it again tomorrow.

    This is not with “usbcore.autosuspend=-1” as the kernel in the SDK images has it’s own bootargs and I cannot override them from uboot (unless you can provide an easy way to do it..)
    There is no uEnv.txt file on the fat partition so I believe u-boot will not be searching for it.
    -----

    Regards,
    Chris
  • Hello Bin,

    UPDATE:

    I just realized why I don’t have any USB connectivity on my kernel build.  

    USB drivers are built as modules and the “kernel-release” name changed with my custom built.

    Now that I have this fixed, I get the following error:  

    [FAILED] Failed to start Start USB gadget.

    See 'systemctl status gadget-init.service' for details.

    [   18.046703] random: crng init done

    [   19.675040] 47401300.usb-phy supply vcc not found, using dummy regulator

    [   19.732171] usbcore: `-1;' invalid for parameter `autosuspend'

    [   19.878638] 47401b00.usb-phy supply vcc not found, using dummy regulator

    [   19.898900] usbcore: `-1;' invalid for parameter `autosuspend'

    [   20.035938] usbcore: `-1;' invalid for parameter `autosuspend'

    [   20.228335] usbcore: `-1;' invalid for parameter `autosuspend'

    [   20.374201] ti-pruss 4a300000.pruss: creating PRU cores and other child platform devices

    [   20.564216] irq: no irq domain found for /ocp/pruss_soc_bus@4a326000/pruss@4a300000/intc@4a320000 !

    [   20.704730] irq: no irq domain found for /ocp/pruss_soc_bus@4a326000/pruss@4a300000/intc@4a320000 !

    [   21.303128] remoteproc remoteproc1: 4a334000.pru0 is available

    [   21.348050] pru-rproc 4a334000.pru0: PRU rproc node /ocp/pruss_soc_bus@4a326000/pruss@4a300000/pru@4a334000 probed successfully

    [   21.438958] remoteproc remoteproc2: 4a338000.pru1 is available

    [   21.469973] pru-rproc 4a338000.pru1: PRU rproc node /ocp/pruss_soc_bus@4a326000/pruss@4a300000/pru@4a338000 probed successfully

    I’ll try to troubleshoot this later today.

    Now the interesting part is the reply we got from Microchip/SMSC; see attached.

    USB_TT_SPLIT_Issue.docx

    Let us know what you think about this and you or your team could find a good way to implement the proposition 1)

    On our end, we will implement a temporary hook to test the CLEAR_TT_BUFFER command.

    Regards

    -----

    Thank you,

    Chris

  • Chris,

    Chris Yorkey said:
    [   19.732171] usbcore: `-1;' invalid for parameter `autosuspend'

    It seems there is semi-colon (;) after '-1', then the driver is unable to recognize the value.

    Chris Yorkey said:
    Let us know what you think about this and you or your team could find a good way to implement the proposition 1)

    The hub handling in the musb driver comes from the community driver and has never been touched for many years. I could take a look if it is the problem and we can fix it in the musb driver. But I wouldn't have time on it until the end of this year.

  • Bin,

    Latest from our customer:
    -----
    I found out I could write -1 to this file at runtime:
    “/sys/module/usbcore/parameters/autosuspend” so I will try it later and report...

    About Microchip comment on the Linux driver, we had exactly the same concern as you: “hub handling in the musb driver comes from the community driver and has never been touched for many years” but they replied that Hubs with single TT are not very common anymore and maybe the bug has never been fixed in the Linux kernel. They believe the Windows driver is more rugged for this aspect…
    Personally I don’t know enough that driver to comment; just forwarding you their comments.

    Finally, we would appreciate if your team could look at the musb implementation quickly to confirm if SSplit/CSplit are properly handled as this is a very high priority problem for us (and a very large customer). For patching the kernel/time frame we will have to evaluate our options because end of the year will not be acceptable for our customer…

    As I mentioned, on our end, we will test the “autosuspend” once again and we will also test sending “CLEAR_TT_BUFFER” manually.
    -----
    Please let me know if you have any short-term comments - I realize some of this will take time.

    Thank you,
    Chris
  • Chris,

    The SSplit/CSplit transfers are handled by the musb controller itself, the only thing controlled in sw for every usb transfer is the hub address, hub port which the device is attached to, and the device address. The hub address takes 7 bits in the register, and the bit8 (MSB) of the register is the flag for single TT or multi TT. All of these info are passed in to musb driver from the usb core driver in the Linux kernel (via urb data struct). So it seems to me if the driver had a bug in the usb core driver to distinguish single or multi TT, it should affect other usb controllers, not just musb.

    A potential sw bug I could think of is when communicating to multiple devices attached, if the musb driver failed to re-program correct hub info in the hw endpoint. I don't remember if you mentioned it before, has the customer tried to reproduce the issue with only *one* BT dongle on the hub?

    Currently I am in a high priority task and unable to reproduce/debug this issue until early this December.

  • Chris,

    I am unable to replicate the issue with an AM335x Starter Kit, after connect/disconnect for 50+ times.
    Since there is no way to physically disconnect the USB device on the on-board USB2412 hub downstream port, I used the following sequence in my test.

    1. on Starter Kit, modprobe g_serial
    2. on AM335x GP EVM as usb host, cat /dev/ttyACM0
    3. on Starter Kit, modprobe -r g_serial

    Has the customer tried to replicate the issue with only *one* BT dongle on the hub?
  • Hi Bin,

    To follow-up with you about “multiple devices attached” when they reproduce the bug, they only have one device attached on the HUB; the BT dongle.

    The procedure you described above is pretty much what they had in mind too.  But as you cannot reproduce the problem with this setup they wanted to make sure of:

    • Do you configure the USB interface on the AM335x GP EVM in FULL Speed ?  This is required because of the bug in the TT transactions.

    • Also, I see that you cat the ttyACM port, but there is no data exchange.  We believe the bug only happens when a transaction (data) is interrupted.

    o Maybe it is required to send data from one end while “removing” the g_serial module.  ???

    On the “driver side”, they made many tests/investigation following the Microchip comments.  They found out that the musb driver was not fully implementing the support for split transactions; more specifically the clear_tt_buffer request.  

    Most recently, they have developed a software patch and it does seem to solve the issue they could create on their bench.  Now they will deploy this patch to their customer sites to see if it solves 100% of the problems they have.  They have also opened a discussion on the linux-usb mailing list for comments/review.

    Thanks for your support.  Any further comments of course welcomed.

    Regards,

    Chris

  • Chris,

    Chris Yorkey said:
    • Do you configure the USB interface on the AM335x GP EVM in FULL Speed ?

    Yes, I did. I use the patch I posted earlier in this thread.

    Chris Yorkey said:
    • Also, I see that you cat the ttyACM port, but there is no data exchange.  We believe the bug only happens when a transaction (data) is interrupted.

    My understanding in the customer's test was only to open the port, which will trigger USB RX request anyway. But I will add data transfer in my test when I get a chance to debug the issue again.

    Chris Yorkey said:
    They found out that the musb driver was not fully implementing the support for split transactions; more specifically the clear_tt_buffer request.

    I understand this requirement, but I want to see the failure in my test so I can understand what error condition the software can get so that we can implement the fix.

    Chris Yorkey said:
    They have also opened a discussion on the linux-usb mailing list for comments/review.

    I saw this patch in the linux-usb mailing list, and I am already in the discussion.

    To comment and accept this patch, ideally I'd like to see the failure in my test.

    Is the customer able to reproduce the issue on any TI AM335x EVM? Or they have been only testing on their board?

  • Hi Bin,

    Responses:

    1- Good (USB Full Speed)

    2-(port/clear_tt_Buffer)They did not try hard to reproduce this bug with a setup different than the BlueGiga dongle, the USB2412 HUB and the AM335x. They know for sure they can recover from this error by manually sending the clear_tt_buffer request to the endpoint 4 (Bulk_IN); this is why they suggested it could have something to do with data flowing from the device to the host.
    Still, this bug can be unique to the combination of HW mentioned above and also seems to depend on some timings or accumulation. But as they mentioned before, they can reproduce this bug easily on their particular hardware platform as well as on the beaglebone black with the USB24121 HUB evaluation board and with 2 different kernel implementations (original 3.2 from Gitorious) and the beaglebone repo.
    Also, the Arago build must have something different in how the tty ports are handle. On the 2 systems tested (android or Debian), doing this “echo -en '\x00\x01\x09\x00\x00' > /dev/ttyACM0” will systematically reset the BT dongle. However, on the Arago build this doesn’t work well (they see the data packets are sent differently with the USB sniffer). They found out that they probalby have to use this instead:
    echo -en '\x00\x01\x09\x00\x00' > reset_bled112.bin; dd if=reset_bled112.bin of=/dev/ttyACM0 bs=1
    They compared the kernel tree (beaglebone repo vs. TI repo) and they looked pretty much the same in regards to the USB drivers.
    One more remark (don’t know if it changes anything), they have the cdc-acm driver built in the kernel (not as module).

    3-(reproduce error) As mentioned just above, they first believed it was unique to their version of kernel or HW but they could easily reproduce this with their beaglebone black, a EVB-USB2422 and the Bled112 dongle with the latest images and kernel available from the beaglebone community. I am pretty sure it would do the same if they use the kernel from the processor SDK; although I believe they would have to add configs specific to Debian. There is something different with the Arago build from the processor SDK in regards to tty communication (or how the bytes are segmented) so it’s much harder to reproduce with this OS.

    Maybe they could ask Microchip to send us a USB2422 development board - since we're all in this together? ;-)
    (half joke / half serious)

    Thanks,
    Chris
  • Chris,

    It would be great if Microchip can send us a USB2422 dev board, so I can continue replicate/debug this issue.