|
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
|