LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices

Reply
 
LinkBack Search this Thread
Old 04-22-2011, 11:44 AM   #1
BruceDLong
LQ Newbie
 
Registered: Apr 2011
Location: Colorado USA, Earth
Distribution: Ubuntu, Angstrom, Maemo
Posts: 2
Blog Entries: 1

Rep: Reputation: 0
USB Hub disappearing after a few seconds of no USB device being inserted


Hello everyone,
Here is what happens:
If I boot with a USB stick (or other USB device) inserted, the USB device will be found and work normally.
If I boot without it inserted then insert it, it will not be found; no message, nothing in dmesg.

If I remove the stick when the USB stick is working (working because I rebooted with it already inserted) and reinsert it within about 2 seconds it will be found again. I get messages that it was removed then messages that it was inserted, found and mounted.

BUT, if I remove the USB stick then wait for more than about 3 second before reinserting it; nothing. It isn't detected, the LED on the USB stick doesn't turn on, no messages in dmesg no new changes any relevant /sys or /proc files. (Unless there is something I don't know about which is possible.)

Here are some clues:
CLUE 1:
When the USB stick is working we have a directory: sys/class/scsi_host/host0

After the device is removed (and later when reinserted), the host0 disappears.

CLUE 2:
// Here is USB stick is working...

cm-t35 login: root
root@cm-t35:~# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 0424:2514 Standard Microsystems Corp.
Bus 001 Device 003: ID 0ea0:2168 Ours Technology, Inc. Transcend JetFlash 2.0 / Astone USB Drive

Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

// Now I'll remove it...

usb 1-1.1: USB disconnect, address 3

root@cm-t35:~# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
root@cm-t35:~#

// Now I'll reinsert it...
root@cm-t35:~# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
root@cm-t35:~#

CLUE 3:
As long as at least one item is plugged into the hub the hub won't power down. E.g. If I plug a USB mouse in then I can remove the memory stick and reinsert it. Likewise, I can remove and reinsert the mouse as long as I don't remove the memory stick.

It's only when all devices have been removed from the hub for >2 seconds, the hub will power down.



DATA:
I'm running a late version of Angstrom on a cm-t3530. I've tried difference configurations, update&&upgrade, and it happens on 3 different boards.

Last edited by BruceDLong; 04-22-2011 at 01:15 PM. Reason: Add more information
 
Old 04-23-2011, 12:13 AM   #2
xeleema
Member
 
Registered: Aug 2005
Location: D.i.t.h.o, Texas
Distribution: Slackware 13.x, rhel3/5, Solaris 8-10(sparc), HP-UX 11.x (pa-risc)
Posts: 987
Blog Entries: 4

Rep: Reputation: 248Reputation: 248Reputation: 248
Greetingz!

Not sure what Linux distribution you're running, but this sounds like your kernel's unloading it's USB-related modules after the USB hub goes to sleep.

1) Open a terminal window (aka "xterm", "konsole")

2) When it's all working, do the following;
lsmod | sort | tee -a ~/working.txt

3) Then get it to "break" and do this;
lsmod | sort | tee -a ~/broken.txt

4) Then find out the difference
diff ~/working.txt ~/broken.txt
Stuff with a "<" is in the working file, stuff with a ">" is in the broken file.
Find out what kernel module is only showing up when things are working.
 
Old 04-30-2011, 06:05 PM   #3
BruceDLong
LQ Newbie
 
Registered: Apr 2011
Location: Colorado USA, Earth
Distribution: Ubuntu, Angstrom, Maemo
Posts: 2
Blog Entries: 1

Original Poster
Rep: Reputation: 0
Actually, I did type lsmod for both the "broken" and "working" case and the results were in my first post.

For posterity, the problem was that the hub was powering down after two seconds of having nothing plugged into it. This is normal but in this case it wasn't responding to the power-up message when something was plugged in.

The solution was to add a phrase to the kernel boot command line telling the kernel to disable all powering down.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Via Labs USB 3.0 Hub will not recognize a USB 3.0 device Equinn Linux - Hardware 6 04-25-2011 03:15 PM
USB pendrive opens only after booted w USB inserted mwaxenberg Linux - Hardware 2 04-17-2011 08:10 AM
in slackware 10.2 USB hub device not accepting new address error=-71 ? ghansel Slackware 1 11-01-2010 07:26 PM
USB devices stop responding when a new device is inserted corteplaneta Linux - General 2 10-06-2010 04:27 PM
usb port and usb hub dosent woke in suse 9.3 newpants2003 Linux - Newbie 1 06-13-2005 07:55 AM


All times are GMT -5. The time now is 08:28 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration