LdB
Posts: 927
Joined: Wed Dec 07, 2016 2:29 pm

USB3 weirdness

Wed Mar 22, 2017 6:27 am

There is something that is driving me crazy with my USB stack

When I set a slow device like a mouse or a keyboard onto a USB 3 hub it keeps dorking the packets, it stalls it aborts all sorts of weird stuff.

I have one hub I can push a button that flips the port between USB2 and USB3 and I can put slow devices in it when it is USB2 but not USB3. Same hub same port different result its something specific to it being USB3.

I had already checked my reverse hub walk was correct and the US2 behaviour and testing confirmed that.

Anyone have a clue what I am missing .. I have looked and looked and I can't see what the problem is with the USB3 port and the slow devices.

peterlite
Posts: 720
Joined: Sun Apr 17, 2016 4:00 am

Re: USB3 weirdness

Wed Mar 22, 2017 6:56 am

There are several posts on USB3 problems. One is that some USB3 chips are incomplete implementations of USB3. Their Windows driver is modified to bypass the problems. The Linux driver is not. Use lsusb to find the USB id of the USB chip then google for problems with the USB chip id. List the USB chip id here to help anyone else looking at this post.

LdB
Posts: 927
Joined: Wed Dec 07, 2016 2:29 pm

Re: USB3 weirdness

Wed Mar 22, 2017 7:22 am

This is baremteal no linux involved but the rest of the information is very useful .. was not aware of problem with some USB 3 stuff.

LdB
Posts: 927
Joined: Wed Dec 07, 2016 2:29 pm

Re: USB3 weirdness

Wed Mar 22, 2017 7:32 am

Okay looks like it's not me :-)

https://github.com/raspberrypi/linux/issues/273 and they closed it.
There are two unsupported configurations (won't work and never will):

Low speed devices behind a USB3.0 hub
Low-speed devices connected when the root port is running in full-speed mode.

Everything else should work with the latest firmware.
I am still a bit mystified as why, I guess something with the DesignWare2.0.

That sounds a bit definite, so no patching the problem for me. Mystery solved time to move on and publish code.

LdB
Posts: 927
Joined: Wed Dec 07, 2016 2:29 pm

Re: USB3 weirdness

Wed Mar 22, 2017 2:42 pm

After all the USB work I have done this caught me of guard.

I thought I would quickly build a walker to enumerate thru the USB list with my freshly minted USB work and this is what I got
Image

On the hubs I am finding two interfaces, I know you can have multiples, but I thought I only set one up.

So the basic question is there like an inside and outside interface on a hub or have I got a bug to find with hubs?
The RED one on the fake roothub I can possibly understand but I don't get the blue interface at all.

What is throwing me a loop is everything is working clean but I seriously programmed for one interface. I was messing around with multiple pipes and did I foul it. Which means my code got lucky or I have a bug with hubs.

The duplicates are all port 0 so I am wondering if I forget to release the low speed setup channel .. something to check.

The ID is my internal and I am showing I have registered 9 interfaces .. sigh it never ends.

Return to “Bare metal, Assembly language”