element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
    About the element14 Community
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      •  Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Raspberry Pi
  • Products
  • More
Raspberry Pi
Raspberry Pi Forum USB discussions getting a bit heated
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Raspberry Pi to participate - click to join for free!
Featured Articles
Announcing Pi
Technical Specifications
Raspberry Pi FAQs
Win a Pi
Raspberry Pi Wishlist
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 87 replies
  • Subscribers 710 subscribers
  • Views 16472 views
  • Users 0 members are here
Related

USB discussions getting a bit heated

e14 Contributor
e14 Contributor over 14 years ago

On the other forum, discussions of USB and networking problems have been

getting a bit heated recently, with one user, Sulge, banned yesterday by abishur

for a 1-week cooling off period.  Maybe we will see him here soon.

 

http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=12097&start=177

http://www.raspberrypi.org/phpBB3/viewtopic.php?f=24&t=14151

http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=5249

 

Some of the USB issues are being blamed on Linux latency, which

doesn't sound easy to fix.

  • Sign in to reply
  • Cancel
Parents
  • morgaine
    morgaine over 14 years ago

    Reading that "USB - the Elephant in our Room" thread on the RPF forum again is really depressing.

     

    From the fanbois' typical "It works for me so your complaints make no sense", or "You shouldn't expect it to work because the Foundation makes no money", to JamesH's repeated strawman of "We would need to test EVERY SINGLE USB DEVICE", it makes you wonder what it is about the Foundation that its most vocal defence comes from those with impaired logic ability.  The correlation seems strong.

     

    There's probably some kind of thesis in psychiatry available there.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • e14 Contributor
    e14 Contributor over 14 years ago in reply to morgaine

    Reading that "USB - the Elephant in our Room" thread on the RPF forum again is really depressing.

    Don't read it then image  I think it's unfortunate that while there's a couple of people who seem willing to discuss solutions, Pete & dom spring to mind, most of the productive discussions are getting swamped in the noise.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • e14 Contributor
    e14 Contributor over 14 years ago in reply to morgaine

    Anyone who thinks that their Pi doesn't have the problem will find that actually it does if they add a USB device or two.

    My Pi doesn't have a problem. Really.

    image

    lack of a USB connector probably has something to do with it image

     

    It looks like the ethernet function of the lan9512 uses three endpoints, one bulk in, one bulk out and one interrupt. With just a simple keyboard and mouse my system lists 8 active endpoints.  Oh, and hotplugging the keyboard/mouse just reset one of the newer ones. The original one doesn't have that problem.

     

    So is that 8 endpoint limit a hardware one ?  Or a crappy driver problem ?    The actual question has to be whether it's fixable in software or not and what limits that might have.

     

    If it's simply an interrupt latency problem there will be ways to help mitigate that. One possible way to help would be to up the clock speed to 1GHz as they've mentioned they want to find a way to do, it's not like that's a cure, more like a short term band-aid while other avenues are explored.

    It probably also explains why people like me who don't use a bloated deskptop distro and literally have init, two gettys, dhcpcd and sshd running really don't see the problem to the same degree - I'm simply not adding lots of extra latency running lots of irrelevant crap. I do see dropped and/or repeating keypresses now and again, so no denying there is an issue.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • morgaine
    morgaine over 14 years ago in reply to e14 Contributor

    selsinork wrote:

     

    My Pi doesn't have a problem. Really.

    <image>

    lack of a USB connector probably has something to do with it image

     

    Hahaha, nice one. image

     

    It looks like the ethernet function of the lan9512 uses three endpoints, one bulk in, one bulk out and one interrupt. With just a simple keyboard and mouse my system lists 8 active endpoints.  Oh, and hotplugging the keyboard/mouse just reset one of the newer ones. The original one doesn't have that problem.

     

    Oh dear, it's a bit worse than I gathered from that thread then, the hard limit arrives a bit sooner.

     

    So is that 8 endpoint limit a hardware one ?  Or a crappy driver problem ?    The actual question has to be whether it's fixable in software or not and what limits that might have.

     

    I gather that 8 endpoints is a hardware limit because a Foundation or Broadcom person said that they found it in the Verilog for the SoC's USB controller, IIRC.  The interrupt rate issue is completely separate from that.

     

    If it's simply an interrupt latency problem there will be ways to help mitigate that. One possible way to help would be to up the clock speed to 1GHz as they've mentioned they want to find a way to do, it's not like that's a cure, more like a short term band-aid while other avenues are explored.

    It probably also explains why people like me who don't use a bloated deskptop distro and literally have init, two gettys, dhcpcd and sshd running really don't see the problem to the same degree - I'm simply not adding lots of extra latency running lots of irrelevant crap. I do see dropped and/or repeating keypresses now and again, so no denying there is an issue.

     

    You're right to call these "bandaids", and they're poor ones because they cannot make the USB errors disappear but only reduce the rate at which they occur.  That rate cannot be made arbitrarily small on Linux without either adding realtime patches so that the housekeeping processes receive guaranteed scheduling priority, or else removing the need for realtime response in the driver.  If the SoC's crappy USB core requires that split transactions be handled in software then the second alternative is not available.

     

    Even a completely quiescent Linux system has processes that get scheduled to run occasionally, even if it's only the periodic filestore sync/update process that is scheduled by a timer.  If scheduling triggers in the middle of USB split transaction handling, the probability that the USB event will be lost is non-zero.

     

    It's just the way Linux works, and all Unixes have worked that way since the dawn of time, so Broadcom designers can hardly express surprise nor point a finger of blame at Linux.  If they genuinely are surprised then Broadcom's problems run far deeper than a broken Pi.

     

    Morgaine.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • e14 Contributor
    e14 Contributor over 14 years ago in reply to morgaine

    I gather that 8 endpoints is a hardware limit because a Foundation or Broadcom person said that they found it in the Verilog for the SoC's USB controller, IIRC.  The interrupt rate issue is completely separate from that.

    Eeewww... a limitation that's hard coded into silicon is going to be difficult image  It's what comes of never being designed for what it's being asked to do. 

     

    The model A with SPI ethernet is looking more and  more appealing.   However, with the pragmatic hat on for a moment, if the interrupt rate problem can be resolved it still mostly meets the design goal for a small educational device with wired ethernet, mouse & keyboard. I say mostly as there's a lot to be said for being able to save stuff to a usb key as well as the sd-card, but still, it's not completely fatal - inconvenient yes.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • jamodio
    jamodio over 14 years ago in reply to morgaine

    It is going to be really hard, making USB OTG work as a "host" if you excuse my French is a "***" ...

     

    I found some documentation from Synopsys (http://www.synopsys.com/dw/ipdir.php?ds=dwc_usb_2_0_hs_otg) but didn't have time yet to even browse through it.

     

    -J

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • jamodio
    jamodio over 14 years ago in reply to e14 Contributor

    The model A with SPI ethernet is looking more and  more appealing.   However, with the pragmatic hat on for a moment, if the interrupt rate problem can be resolved it still mostly meets the design goal for a small educational device with wired ethernet, mouse & keyboard. I say mostly as there's a lot to be said for being able to save stuff to a usb key as well as the sd-card, but still, it's not completely fatal - inconvenient yes.

     

    Hmmm, that would be some interesting project to try, as far as I remember there are some Linux drivers for the Microchip standalone Ethernet controllers, obviously don't expect to power the thing from the regular 3V3 power supply.

     

    I used to produce this board based on the ENC424J600

     

    http://www.ljcv.net/nic424/nic424-v1.0-800px.jpg

     

    I'll put on my to-do list of things to try in my protoboard setup... Good idea selsinork

     

    -J

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • morgaine
    morgaine over 14 years ago in reply to e14 Contributor

    selsinork + jamodio:  TCP offload and USB offload beckons, as you are both suggesting.

     

    It's certainly an engineering solution to the problem, but the trouble is, what's left of the Pi if you have to add those externally?  Just a standalone multimedia chip with SD card and low-end ARM.  It's no longer appealing for $35, and doesn't even make any sense in a networked world.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • jamodio
    jamodio over 14 years ago in reply to morgaine

    Ohh no, it is just for experimenting. I'd rather put more time/money on Beagle or Panda boards, I'm waiting for the guys from Olimex that said their board should be about ready in September.

     

    If RPF does not come up with a decent solution which may require to dig deep into the design, besides being an interesting gadget to tinker with and some stuff that can be donde with model A, asuming you can hookup a keyboard and a mouse that works with an external hub, IMHO the thing is dead.

     

    -J

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • e14 Contributor
    e14 Contributor over 14 years ago in reply to morgaine

    It's no longer appealing for $35, and doesn't even make any sense in a networked world.

    Ok, but... Alternatives ?   With reliable, even if slow, ethernet it still works for me. If we offload anything much then the model A is obviously a better starting point.

     

    If usb can be fixed - within limits of the silicon - that's better. But as you keep saying, it needs to be reliable and 'just work'.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • e14 Contributor
    e14 Contributor over 14 years ago in reply to jamodio

    obviously don't expect to power the thing from the regular 3V3 power supply.

    What, no 1.8v version that I can power from the lan9512 ?  image

     

    Nice looking board..  I know it'll work - Chris Boot and Simon Arlott were using them along with sd-card on spi during their 3.5 kernel efforts.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • jamodio
    jamodio over 14 years ago in reply to e14 Contributor

    Hmmm another alternative would be, based on something close to the current design but fixing the power supply issues and other things that Pete may have on the list, os for the distributors to bundle the board with a power supply, keyboard and mouse that were proven towork at an attractive price, and it can still be a low cost platform for education.

     

    But a that time, I'd guess that some Linux distro would be running on the APC board, yes sans GPIO now and a bigger board but you get other features ...

     

    -J

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • jamodio
    jamodio over 14 years ago in reply to e14 Contributor

    Hmmm another alternative would be, based on something close to the current design but fixing the power supply issues and other things that Pete may have on the list, os for the distributors to bundle the board with a power supply, keyboard and mouse that were proven towork at an attractive price, and it can still be a low cost platform for education.

     

    But a that time, I'd guess that some Linux distro would be running on the APC board, yes sans GPIO now and a bigger board but you get other features ...

     

    -J

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
Children
No Data
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2026 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube