thexman
Posts: 259
Joined: Sat Apr 07, 2012 2:18 pm

Re: USB packet loss.

Tue Jun 05, 2012 7:52 pm

not the same issue we get the packet loss with or with out other devices connected

i don't believe its a Linux issue its a Kernel or kernel settings issue and this i assumed was sorted and issued by the RPI people or did i read it wrong .

the only reason i say its not a Linux issue is the Product were using works on all other versions of Linux currently and has no issues like this. the only common factor is the PI. sorry to say
one armed controls engineer, my grammar is bad but lets face it most keyboards don't suit a one armed man

youngsyt
Posts: 7
Joined: Sun Jun 03, 2012 1:46 pm

Re: USB packet loss.

Tue Jun 05, 2012 8:25 pm

I hear what you say. I don't know enough to be able to help sort out the dropped packet issue but I will follow up the issue that I'm seeing with my keyboard. Hopefully I can get somewhere with that.

Terry

User avatar
yoctopuce
Posts: 22
Joined: Sat Mar 03, 2012 11:27 pm
Contact: Website

Re: USB packet loss.

Wed Jun 06, 2012 5:23 am

youngsyt, thexman & al: I am all with you that this issue needs a resolution, but at this point we need some patience. We have shipped to the Raspi team USB devices with a special firmware that will help to reproduce and track the issue. One of them has already arrived in UK, the other will need some more days to reach the Broadcom engineer. Once he has the device in hand, it will be tough work to trace within the chip microcode where the packet might disappear. The issue is very sensitive to timings (like a race condition or something similar), so any code added to debug might make the issue move. This is among the most complicate sort of issues to track, so we need to give them the time needed to crack down that problem calmly.

We will update this thread as soon as we have news from their progress.
We produce USB controllers, USB sensors as well as embedded USB hubs for DIY projects

User avatar
ledow
Posts: 38
Joined: Thu Feb 02, 2012 12:55 pm

Re: USB packet loss.

Wed Jun 06, 2012 2:06 pm

snaipperi wrote:
abishur wrote: Alternate theory? They're busy people and issues like this are more of a community led fix as is the nature with linux.
If the community knew how to fix it, somebody would be working on it already.. community, any news?
Nothing, but there has been an "issue" opened on the github for the kernel with lots of debugging by the OP. No reply seems to have been forthcoming since then. There seems very little interest in this so-wonderfully isolated problem as of yet. Not everyone has USB analyser traces to prove that usbmon doesn't see packets that were acknowledged by the hardware.

sleep lack
Posts: 19
Joined: Thu Mar 08, 2012 3:33 pm

Re: USB packet loss.

Wed Jun 06, 2012 6:38 pm

I'm seeing USB problems myself (testing bluetooth). It seems to be inbound isochronous connections that are getting mangled for me. Might try and do some tracing in the dwc_otg kernel module to see what's going on.

If somebody from Raspberry Pi is looking at this and can duplicate the problem I'd be interested to know if it also happens on a Model A (i.e. rule out the SMSC LAN9512 hub corrupting USB traffic).

sleep lack
Posts: 19
Joined: Thu Mar 08, 2012 3:33 pm

Re: USB packet loss.

Wed Jun 06, 2012 7:41 pm

Regarding the dwc_otg kernel code - it does kind-of look like a bit of a rough cut-and-paste job from another Broadcom project - full of references to bcm2708 and with at least one configuration error - in dwc_otg_core_if.h the number of host channels is set to 12 when it should be 8 according to page 201 on the bcm2835 datasheet. This makes me wonder if the other settings are accurate - if the FIFO sizes are out it could cause all kinds of headaches, maybe somebody from Broadcom could double-check it please?

User avatar
ledow
Posts: 38
Joined: Thu Feb 02, 2012 12:55 pm

Re: USB packet loss.

Mon Jun 11, 2012 1:05 pm

https://github.com/raspberrypi/firmware/issues/19

is the github issue-tracker link, for those who care.

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5370
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: USB packet loss.

Mon Jun 11, 2012 1:44 pm

sleep lack wrote:Regarding the dwc_otg kernel code - it does kind-of look like a bit of a rough cut-and-paste job from another Broadcom project - full of references to bcm2708 and with at least one configuration error - in dwc_otg_core_if.h the number of host channels is set to 12 when it should be 8 according to page 201 on the bcm2835 datasheet. This makes me wonder if the other settings are accurate - if the FIFO sizes are out it could cause all kinds of headaches, maybe somebody from Broadcom could double-check it please?
From Naren:
"It doesn't really matter.
The HW will report back 8 channels and the driver will set it correctly.
Folks are just complaining because they don't understand that the 2708 is actually the 2835.
The default value of 12 is from the synopsys driver release. You can set it to any value. If it is greater than 8, the hw value is used. If it is less than 8, then the define is used."

thexman
Posts: 259
Joined: Sat Apr 07, 2012 2:18 pm

Re: USB packet loss.

Mon Jun 11, 2012 1:51 pm

thanks for clearing that up Dom

but its not the original issue this post was about the original post now has gone off in a direction can you remove posts about other Hardware firmware issues please as its moved away from the fact that USB looses Packets needed by a perticular product that doesnt happen on any other platform apart from the RPI board

if its hardware code or software settings that are causing the problem i assume RPI people will Fix the issue as the comunnity dont have full access to all the code if my understanding it correct.

sitting here waiting for a fix still tanks for reading.
one armed controls engineer, my grammar is bad but lets face it most keyboards don't suit a one armed man

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 24133
Joined: Sat Jul 30, 2011 7:41 pm

Re: USB packet loss.

Mon Jun 11, 2012 2:33 pm

I think it might be a while before we get to the bottom of this issue. Remember the Foundation has no paid employees, so the work has to be done at Broadcom, and therefore done in someone's spare time around some other rather critical projects we have going on at the moment. That said, we do need to get to the bottom of the issue, and it has not been forgotten.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I think it’s wrong that only one company makes the game Monopoly.” – Steven Wright

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5370
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: USB packet loss.

Mon Jun 11, 2012 2:54 pm

There is some hardware on the way to Naren that demonstrates the packet loss problem simply, which will hopefully help identify the problem.
But feel free to eyeball or instrument the driver code to help identify where packets go missing.

sleep lack
Posts: 19
Joined: Thu Mar 08, 2012 3:33 pm

Re: USB packet loss.

Mon Jun 11, 2012 6:04 pm

dom wrote:
sleep lack wrote:Regarding the dwc_otg kernel code - it does kind-of look like a bit of a rough cut-and-paste job from another Broadcom project - full of references to bcm2708 and with at least one configuration error - in dwc_otg_core_if.h the number of host channels is set to 12 when it should be 8 according to page 201 on the bcm2835 datasheet. This makes me wonder if the other settings are accurate - if the FIFO sizes are out it could cause all kinds of headaches, maybe somebody from Broadcom could double-check it please?
From Naren:
"It doesn't really matter.
The HW will report back 8 channels and the driver will set it correctly.
Folks are just complaining because they don't understand that the 2708 is actually the 2835.
The default value of 12 is from the synopsys driver release. You can set it to any value. If it is greater than 8, the hw value is used. If it is less than 8, then the define is used."
Well, I've noticed that changing it from 12 to 8 does fix at least one error I've seen - It gets rid of this:

May 13 15:55:22 raspberrypi kernel: INFO:: periodic_channel_available: Total channels: 8, Periodic: 6, Non-periodic: 2
May 13 15:55:22 raspberrypi kernel: INFO:: schedule_periodic: No host channel available for periodic transfer.
May 13 15:55:22 raspberrypi kernel: ERROR::dwc_otg_hcd_urb_enqueue:487: DWC OTG HCD URB Enqueue failed adding QTD. Error status -4008

Which I've seen in a couple of places from various people (myself included).But thanks for doing the checking and the feedback.

User avatar
NickT
Posts: 271
Joined: Mon May 21, 2012 10:43 am
Location: UK

Re: USB packet loss.

Mon Jun 11, 2012 10:00 pm

dom wrote:There is some hardware on the way to Naren that demonstrates the packet loss problem simply, which will hopefully help identify the problem.
But feel free to eyeball or instrument the driver code to help identify where packets go missing.
I dug a little bit deeper into the dwc_otg_hcd_queue.c code. I posted some results in the github issue as NickBT at:

https://github.com/raspberrypi/linux/issues/29

It might be of interest

thexman
Posts: 259
Joined: Sat Apr 07, 2012 2:18 pm

Re: USB packet loss.

Sat Jun 16, 2012 4:46 pm

Has naren got his product yet and has he had chance to look into the problem can we get an update please still awaiting to start my project as the problem effects my project completely and I would really like a work around or permanent fix pretty please been waiting for over two months now as I've said before our product works on every other Linux system with out issue apart from the raspberry Pi version

Thanks to anyone looking into this issue
one armed controls engineer, my grammar is bad but lets face it most keyboards don't suit a one armed man

User avatar
ledow
Posts: 38
Joined: Thu Feb 02, 2012 12:55 pm

Re: USB packet loss.

Wed Jun 20, 2012 8:10 am

I, too, am waiting on some kind of reply. But, to be honest, given the response so far I don't hold out hope. It seems we're either waiting for some magical, mystical "community expert" to just arrive out of the blue and fix the problem, or for Broadcom to get around to looking into it "for free" (which they don't seem to have much interest in).

The kernel issue and this post had a couple of things thrown at it, and then that was it. Only the sound of tumbleweed moving in the distance and the hopes some hero would appear from nowhere and just flick the switch to make it work.

To be honest, my RPi has gathered more dust than use since the first day I seriously tried to sit down and convert my project over to it from a Mini-ITX board. The issues like this that hit in the first day stopped it dead and every time there's a new kernel, I boot it up and see if anything has changed for me, and then pack it away again. One day I'm sure it will work, in some fashion, but until then there's no point playing with it if I'm going to hit unresolved, sometimes undocumented, unmonitored and (most scarily) uncaught-in-testing issues of the sort of magnitude of "not booting", "SD cards not working" or "USB not working", and their solutions linger on empty forum posts and github issues for months.

I was hoping to get my school interested - they're on a programming push at the moment, they heard about it on the new and I had a preorder in before they'd heard of it, we were hoping to buy lots for the coming year and get staff trained on them. Instead, we've gone the software-in-the-ICT-suite route because there's nothing here in terms of hardware, testing, support, diagnosis, etc. to give us confidence. They've basically missed this September for us. Maybe next year. But, to be honest, by then there'll be no reason to change our teaching yet again just to use a gadget.

thexman
Posts: 259
Joined: Sat Apr 07, 2012 2:18 pm

Re: USB packet loss.

Wed Jun 20, 2012 5:45 pm

sorry to hear that ledlow my project is also on back burner because the Pi cannot deliver but it hasten stopped me developing on Linux platform just the pi was the cheapest and newest platform around that its size suited me more than anything just wish they could spend a little time it should take one day to fix the issue surely as they made the chip and designed the board they must know whats going wrong or have a good idea where to start looking for a fix.

come one guys ive been asking for over two months now. i know promotion and selling has been a Priority but hows about fixing the small issues. then i can place an order for a couple of thousand units and you get your time investment back in sales.
one armed controls engineer, my grammar is bad but lets face it most keyboards don't suit a one armed man

thexman
Posts: 259
Joined: Sat Apr 07, 2012 2:18 pm

Re: USB packet loss.

Sun Jun 24, 2012 4:10 pm

add another 5 days can any foundation member shed any light i am told by Yoctopuce that a demo unit was dispatched with firmware enabled to replicate the fault seen, so you guys could resolve the issue, hows that work going and can we have an update if its not a 5 minute job please.

like most of the foundation people i have a day job to, how ever if i sold a project to my customer that failed to work they would expect me to fix the issue in a reasonable time, in the UK it seams a reasonable time is 30 days in RPI land it seams no time has been set or given so come on help us out here.

it wont be a forum fix or community fix it needs looking into by RPI and your hardware guys.
as we have repeatedly stated the product works on all Linux, windows and mac-OS systems apart from the RPI so it points to a fault with the RPI somewhere something that the common man cannot get too, doesn't understand, or doesn't have access to the full data sheet to coin a phrase.

Hope to hear soon thanks patiently waiting again.
one armed controls engineer, my grammar is bad but lets face it most keyboards don't suit a one armed man

Chris Goodwin
Posts: 12
Joined: Thu Jan 05, 2012 6:08 pm

Re: USB packet loss.

Mon Jun 25, 2012 6:19 am

If this helps or not, I don't know, but with an ASUS USB-N10 wireless dongle, using the r8712u.ko module hosted at Element 14 and the firmware download from Debian, I'm seeing ping times from the Pi to my wireless router (about 20 feet away) averaging about 2000 ms. General network performance is about like you'd expect from 2 second ping times to the router, and I don't see that kind of latency with any other devices, even at the same location.

The wireless adapter is plugged directly into the USB port on the Pi; the other port is taken by the powered USB hub, which only has mouse and keyboard attached. The physical USB port seems to be warmer than the rest of the Pi, even the chips.

If it matters at all, I'm using a cheap, off-brand SD card (Emtec Class 4, 4GB).

thexman
Posts: 259
Joined: Sat Apr 07, 2012 2:18 pm

Re: USB packet loss.

Mon Jun 25, 2012 7:16 pm

the latency issue has been noted by lots of people there was a Fix for that or a similar fault not sure of the forum link now

the issue were seeing is data lost that causes our hardware to fail and the Raspberry pi and any Linux image not to see or respond so stops us using the Pi in any Project which is a shame.
one armed controls engineer, my grammar is bad but lets face it most keyboards don't suit a one armed man

gsh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 1445
Joined: Sat Sep 10, 2011 11:43 am

Re: USB packet loss.

Sat Jun 30, 2012 11:22 am

Yes,

I am looking at it now, taking some time but I've got the Yoctopuce board reproducing the problem and have started to understand the problem... It seems to be something to do with the hub and split transactions, I don't think the NYET is being handled properly. So it'll only effect 1.0 and 1.1 devices (which is why we don't seem to see this packet loss with mass storage etc)

Cheers

Gordon
--
Gordon Hollingworth PhD
Raspberry Pi - Director of Software Engineering

thexman
Posts: 259
Joined: Sat Apr 07, 2012 2:18 pm

Re: USB packet loss.

Sat Jun 30, 2012 4:46 pm

thanks for the update hopefully its a simple enough fix and if you could let us. me know that would be great
one armed controls engineer, my grammar is bad but lets face it most keyboards don't suit a one armed man

User avatar
Burngate
Posts: 6091
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore
Contact: Website

Re: USB packet loss.

Tue Jul 03, 2012 5:23 pm

While gsh is busy in one corner sorting this out, and the rest of us are in another keeping out of his hair ...
... is it possible that this could explain some of the keyboard problems? After all KBs are slow devices ...

thexman
Posts: 259
Joined: Sat Apr 07, 2012 2:18 pm

Re: USB packet loss.

Tue Jul 03, 2012 8:11 pm

if there having issues with USB 1.0 and USB1.1 Version hardware i would assume most if not all keyboards never got passed 1.0/1.1 versions i don't remember seeing a 2.0 USB keyboard as 2.0 is backward compatible did you mean the repeated key and missing key stokes issue. mentioned elsewhere on forum if so yes this might fix that issue. lets hope its not a Board killer.
one armed controls engineer, my grammar is bad but lets face it most keyboards don't suit a one armed man

User avatar
Burngate
Posts: 6091
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore
Contact: Website

Re: USB packet loss.

Wed Jul 04, 2012 9:52 am

That was my thought.
On the brand new wonderful wireless keyboard / mouse I bought for the Pi I get the stutters. The mouse works with no problems.
I've checked all voltages, everything ok. Also works perfectly when plugged into laptop, no stutters.

It would seem to me that key-down events get through reliably - I've never yet seen a missed keystroke - but key-up events are sometimes missed, leading to repetition. The next key-down will then terminate that.


On another setup (different wireless keyboard/mouse, PS2 only, through PS2-only KVM, to wiindows-PC / RiscPC / A9home /laptop) I was getting stutters when I connected the KB through a PS2 - USB translatory dongle thingy. Since USB packets couldn't (?) get through the KVM, it's got to be the translation. And the laptop it was connected to was XP, so it probably not wasn't windows USB stack. I'll have to try that situation with one of the other machines - maybe the A9home - to see what happens.
And also with a USB 1 hub to get rid of USB 2 packets - I don't think they make USB 2 devices that aren't backward compatible with USB 1, to get rid of USB 1 packets.

User avatar
Burngate
Posts: 6091
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore
Contact: Website

Re: USB packet loss.

Wed Jul 04, 2012 10:08 am

As far as board-killer is concerned, I don't expect that.
My understanding is that there's a pile of electronics between the USB port of the Pi and the Arm.
First off is the 9512 chip. There may be a problem with that, which would be difficult to get round. But it would have been found before now since it's a standard chip.
Then there's the SoC. Most of that is under Broadcom control, and is set up by the blob. They seem to have designed in enough flexibility to allow this sort of problem to be tackled in the blob.
After it hits the Arm, everything's in the kernal, which is just a re-compile away.

Return to “Troubleshooting”