Atmel website | ARM Community | AVR freaks | Technical Support
Banner
 FAQ •  Search •  Register •  Login 

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: USB enumeration problem - SOLVED
PostPosted: Thu Oct 20, 2011 5:48 pm 
Offline

Joined: Wed Jun 30, 2010 10:48 pm
Posts: 16
Location: Stow, Ohio, USA
For the past several weeks, I have had USB enumeration problems with my AT91SAM9G20 platform. Recently, I have found out the root cause of this problem, and have found a solution. I wanted to share this with the folks here, because I am sure that others are affected by this known bug in the Linux kernel.

When I insert a USB thumb drive into my AT91 platform, it would only work some of the time. Most of the time, I would get the following errors:

# usb 1-1: new full speed USB device number 3 using at91_ohci
usb 1-1: no configurations
usb 1-1: can't read configurations, error -22
usb 1-1: new full speed USB device number 4 using at91_ohci
usb 1-1: unable to read config index 0 descriptor/start: -61
usb 1-1: chopping to 0 config(s)
usb 1-1: New USB device found, idVendor=058f, idProduct=6387
usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-1: Product: Mass Storage
usb 1-1: Manufacturer: Generic
usb 1-1: SerialNumber: 4CEF59C4
usb 1-1: no configuration chosen from 0 choices

My guess is that there is a race condition of some kind, because after plugging and unplugging the USB thumb drive several times, it would eventually enumerate properly. The USB host driver and the scsi disk driver are statically linked in.

Searching the web, I found a single reference back to 2008 from someone who discovered that the kernel SLAB allocator is causing this issue.

My platform was using the SLOB allocator. I have since changed to the SLUB allocator, and the USB enumeration issues are GONE. This is a workable solution for me. I hope this helps others.

Thanks,
-Chris


Top
 Profile  
 
 Post subject: Re: USB enumeration problem - SOLVED
PostPosted: Wed Nov 02, 2011 8:39 pm 
Offline

Joined: Tue Feb 28, 2006 12:37 am
Posts: 5
Location: Seattle, WA
Thanks very much for posting this. Yes indeed I had the same problem,
and as per this posting changed from SLOB to SLUB and bingo, problem
solved. (linux-2.6.36.4 + at91 patches on at91sam9260).

There should be a warning in the relevant Kconfig file about using
SLOB and USB Host.

Mark


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: