Bug 664280 - USB 1 hubs don't resume when autosuspended and a new device gets plugged in.
Summary: USB 1 hubs don't resume when autosuspended and a new device gets plugged in.
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: rawhide
Hardware: i686
OS: Linux
low
medium
Target Milestone: ---
Assignee: John Feeney
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 669896
TreeView+ depends on / blocked
 
Reported: 2010-12-19 16:39 UTC by Tom
Modified: 2013-01-10 07:33 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-06-22 11:52:52 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
lspci output (991 bytes, text/plain)
2011-01-23 02:14 UTC, Tom
no flags Details

Description Tom 2010-12-19 16:39:25 UTC
Description of problem:
I have to plug usb drive into motherboard and not keyboard hub, and then "lsusb -v" before usb thumb drive can be mounted. Its only a problem with one thumb drive "PNY 4G Attache" http://www3.pny.com/category_buymulti.aspx?Category_ID=53

Version-Release number of selected component (if applicable):


How reproducible:
Every time

Steps to Reproduce:
1.Plug in problem thumb drive, and no /dev/sdb, or prompt to open
2.Plug in problem thumb drive into keyboard hub and run "lsusb -v" and nothing
3.Plug in problem thumb drive into motherboard and run "lsusb -v" and can mount

Actual results:


Expected results:
Works fine like other thumb drives

Additional info:
I got the workaround from http://bugs.gentoo.org/137208

Output of "lsusb -v" for problem thumb drive
Bus 002 Device 011: ID 1516:1213 CompUSA 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x1516 CompUSA
  idProduct          0x1213 
  bcdDevice            0.00
  iManufacturer           1 USB
  iProduct                2 DISK 2.0
  iSerial                 3 059485235F49082F97ADFC65
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           32
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              300mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     80 Bulk (Zip)
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  bNumConfigurations      1
Device Status:     0x0000
  (Bus Powered)

Comment 1 Kyle McMartin 2011-01-22 20:02:13 UTC
Thanks, sorry about the delay, been distracted by Xmas and 2.6.38 release candidates and upstream.

Matthew, could you take a look at this report?

Comment 2 Matthew Garrett 2011-01-22 20:25:49 UTC
Sure. Tom, could you attach the output of the lspci command?

Comment 3 Tom 2011-01-23 02:14:06 UTC
Created attachment 474775 [details]
lspci output

Comment 4 Tom 2011-01-31 01:13:04 UTC
Thumb drive now mounts fine on motherboard, but not keyboard hub.

Comment 5 Matthew Garrett 2011-02-10 17:52:31 UTC
Hm. When you plug it into the keyboard hub, does it appear as a USB 1.1 device or a 2.0 device?

Comment 6 Tom 2011-02-13 15:08:09 UTC
I'll be away from my computer for almost two weeks

Comment 7 Hans de Goede 2011-02-17 16:05:05 UTC
Hi,

As discussed on irc with Mattheww today I've a similar issue. The problem seems to be that usb1 hubs (which your keyboard likely has) don't detect devices which are plugged into them once they have autosuspended.

For the record, the info of my case:
kernel:
2.6.37-2.fc15.x86_64

controller:
nVidia Corporation MCP55 USB Controller (ohci)

hub:
05e3:0606 This is a USB 1 hub, not 2 so fullspeed not highspeed, from dmesg:
usb 2-2: new full speed USB device using ...
hub 2-2:1.0: USB hub found

Tom,

If you can see if you've similar messages (esp the "full speed") part for your keyboard hub, we can see if this is the same issue. Once you've found this message, you can also try a workaround, if I disable autosuspend on my hub it does see new devices as they are plugged in, I do this using:
sudo bash -c "echo on > /sys/bus/usb/devices/2-2/power/control"
Or as root, simply:
echo on > /sys/bus/usb/devices/2-2/power/control

Notice that the 2-2 specifies a specific usb device (the hub in question) and this "address" matches the dmesg messages.

If uncertain can you please do:
dmesg > dmesg.txt

And attach dmesg.txt here ? Then we can see if your keyb hub indeed is a usb 1 hub rather then a usb 2 hub, and I can tell you the exact command to disable
autosuspend.

Thanks & Regards,

Hans

Comment 8 Bruno Wolff III 2011-02-17 17:26:24 UTC
I also have been seeing problems on one of my machine that I think are USB related going back to at least 2.6.36. I have a usb 1.1 hub and plug headphones and a ups into it. I can no longer run nut as part of the process doesn't work. Also when I play audio things tend to get messed up, though not always and not always right away. However, the symptoms are weird. Switching desktop windows starts taking around 10 seconds, running ps locks up part way through, some package updates lockup in their pre or post install scripts until I kill the yum transaction. If I mute sound and don't run the ups service, my machine can run OK for times on the order of a week. So far the 2.6.38 kernels don't seemed to have fixed this, part I don't run them for much time as there is a video driver regression in 2.6.37+ kernels keeping me from using them. (X or system lockups happen when using firefox or colossus.)

Comment 9 Hans de Goede 2011-02-17 18:46:49 UTC
(In reply to comment #8)
> I also have been seeing problems on one of my machine that I think are USB
> related going back to at least 2.6.36. I have a usb 1.1 hub and plug headphones
> and a ups into it.

Can you try doing "echo on > control" to the sysfs control file of the hub? See my previous comment, comment #7 on how to figure out the sysfs path.

Comment 10 Bruno Wolff III 2011-02-18 06:41:20 UTC
I tried echo on > /sys/bus/usb/devices/1-0:1.0/power/control , but it just sent my system into the flakey mode described above. This is with a 2.6.36 kernel though.

Comment 11 Bruno Wolff III 2011-02-18 18:04:10 UTC
This seems a bit weird, but the lockup issues went away when I suspended the hub. While not ideal, this makes my system overall more usable.

Comment 12 Bruno Wolff III 2011-02-18 18:14:25 UTC
Turns out not everything got fixed, ps still locks up, but at least I can switch between work spaces in a reasonable amount of time.

Comment 13 Tom 2011-02-24 16:55:14 UTC
I get this in the dmesg:
[    2.690646] usb 2-1.1: new low speed USB device using ohci_hcd and address 4
and I tried 'echo on > /sys/bus/usb/devices/2-1.1/power/control' but I still get the same warning in dmesg. When I try to connect the problem drive I get:

[  549.904970] usb 2-1.2: new full speed USB device using ohci_hcd and address 6
[  549.990966] usb 2-1.2: not running at top speed; connect to a high speed hub
[  550.008966] usb 2-1.2: New USB device found, idVendor=1516, idProduct=1213
[  550.008972] usb 2-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  550.008976] usb 2-1.2: Product: DISK 2.0
[  550.008979] usb 2-1.2: Manufacturer: USB
[  550.008981] usb 2-1.2: SerialNumber: 059485235F49082F97ADFC65
[  550.009547] usb 2-1.2: rejected 1 configuration due to insufficient available bus power
[  550.009555] usb 2-1.2: no configuration chosen from 1 choice

which is weird, because when I connect a similar thumb drive, just a 2 Gig version and not the problem 4 Gig, it connects just fine:

[  787.507878] usb 2-1.3: new full speed USB device using ohci_hcd and address 8
[  787.593861] usb 2-1.3: not running at top speed; connect to a high speed hub
[  787.611855] usb 2-1.3: New USB device found, idVendor=090c, idProduct=1000
[  787.611861] usb 2-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  787.611865] usb 2-1.3: Product: USB Flash Drive
[  787.611868] usb 2-1.3: Manufacturer: USB 2.0
[  787.611871] usb 2-1.3: SerialNumber: AA00000000005903
[  787.853048] usbcore: registered new interface driver uas
[  787.863491] Initializing USB Mass Storage driver...
[  787.863798] scsi4 : usb-storage 2-1.3:1.0
[  787.864263] usbcore: registered new interface driver usb-storage
[  787.864269] USB Mass Storage support registered.
[  790.492373] scsi 4:0:0:0: Direct-Access     USB 2.0  USB Flash Drive  0100 PQ: 0 ANSI: 0 CCS
[  790.493546] sd 4:0:0:0: Attached scsi generic sg2 type 0
[  790.515346] sd 4:0:0:0: [sdb] 3915776 512-byte logical blocks: (2.00 GB/1.86 GiB)
[  790.522334] sd 4:0:0:0: [sdb] Write Protect is off
[  790.522341] sd 4:0:0:0: [sdb] Mode Sense: 43 00 00 00
[  790.536326] sd 4:0:0:0: [sdb] No Caching mode page present
[  790.536332] sd 4:0:0:0: [sdb] Assuming drive cache: write through
[  790.580320] sd 4:0:0:0: [sdb] No Caching mode page present
[  790.580327] sd 4:0:0:0: [sdb] Assuming drive cache: write through
[  790.590340]  sdb: sdb1
[  790.630336] sd 4:0:0:0: [sdb] No Caching mode page present
[  790.630346] sd 4:0:0:0: [sdb] Assuming drive cache: write through
[  790.630353] sd 4:0:0:0: [sdb] Attached SCSI removable disk
[  792.919057] SELinux: initialized (dev sdb1, type vfat), uses genfs_contexts

Is there just something wrong with my 4 Gig thumb drive?

Comment 14 Matthew Garrett 2011-02-24 17:03:38 UTC
Yes, it's asking for more power than your keyboard hub can provide.

Comment 15 Bruno Wolff III 2011-05-29 18:00:07 UTC
It looks my issue may be fixed in 2.6.39. Previously I had narrowed it down to using my USB headset for sound. When I switched to motherboard sound I didn't see the problem. Now I am not seeing the problem in 2.6.39. It was pretty easy to trigger previously by playing sound for a bit through the headset, stopping the sound and then trying to play sound again.

Comment 16 Chuck Ebbert 2011-06-22 11:51:18 UTC
(In reply to comment #8)
> I also have been seeing problems on one of my machine that I think are USB
> related going back to at least 2.6.36. I have a usb 1.1 hub and plug headphones
> and a ups into it. I can no longer run nut as part of the process doesn't work.

This has been reported as bug 693216

Comment 17 Chuck Ebbert 2011-06-22 11:52:52 UTC
The original bug is fixed. Anyone reporting similar problems that had a different cause and are still unfixed should open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.