Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 132721

Summary: USB flash drive not working with hub
Product: Gentoo Linux Reporter: pandrews
Component: [OLD] UnspecifiedAssignee: Daniel Drake (RETIRED) <dsd>
Status: RESOLVED FIXED    
Severity: trivial CC: HRogge, kernel, masterdriverz, pandrews, retupmoca
Priority: Lowest    
Version: unspecified   
Hardware: x86   
OS: Linux   
URL: http://forums.gentoo.org/viewtopic-p-3306514.html
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: patch

Description pandrews 2006-05-08 14:08:48 UTC
USB thumb drive functioned correctly on kernel 2.6.8-gentoo-r3 (sometimes needed to restart coldpluging after bootup, but not usually)  When upgraded to kernel 2.6.16-gentoo-r6 USB thumb drive does not function when plugged into a USB hub.

Udev version 087 on both kernels.

USB thumb drive does not function correctly when plugged into USB hub; here is incorrect output:
usb 3-1.3: new full speed USB device using uhci_hcd and address 5
usb 3-1.3: not running at top speed; connect to a high speed hub
usb 3-1.3: no configuration chosen from 1 choice 

USB thumb drive functions correctly and is assigned a /dev/sd# when plugged directly into computer (ie not through hub); here is correct output from dmesg:
usb 1-1: new high speed USB device using ehci_hcd and address 4
usb 1-1: configuration #1 chosen from 1 choice
scsi0 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 4
usb-storage: waiting for device to settle before scanning
  Vendor: VBTM      Model: Store 'n' Go      Rev: 1.04
  Type:   Direct-Access                      ANSI SCSI revision: 00
SCSI device sda: 2004992 512-byte hdwr sectors (1027 MB)
sda: Write Protect is off
sda: Mode Sense: 23 00 00 00
sda: assuming drive cache: write through
SCSI device sda: 2004992 512-byte hdwr sectors (1027 MB)
sda: Write Protect is off
sda: Mode Sense: 23 00 00 00
sda: assuming drive cache: write through
 sda: sda1
sd 0:0:0:0: Attached scsi removable disk sda
sd 0:0:0:0: Attached scsi generic sg0 type 0
usb-storage: device scan complete
Comment 1 Daniel Drake (RETIRED) gentoo-dev 2006-05-10 08:03:36 UTC
Is your hub powered by mains or electricity, or self-powered over the USB port?
Have you tested any other kernels inbetween 2.6.8 and 2.6.16?
Comment 2 Andy 2006-05-10 09:32:18 UTC
(In reply to comment #1)
> Is your hub powered by mains or electricity, or self-powered over the USB port?
> Have you tested any other kernels inbetween 2.6.8 and 2.6.16?

I also have this problem.
Kernel 2.6.15 works fine, but 2.6.16 does not.  My hub is powered by the USB port.
Comment 3 Daniel Drake (RETIRED) gentoo-dev 2006-05-10 09:51:22 UTC
Please reproduce this on the latest development kernel (currently 2.6.17-rc3) with CONFIG_USB_DEBUG enabled. If it still occurs, please post the dmesg output after plugging the device into the hub.
Comment 4 Henning Rogge 2006-05-13 12:53:25 UTC
I have the same problem with an USB hub inside my keyboard, so I tested it with the vanilla kernel 2.6.17-rc4. Same problem...

dmesg:
hub 2-2:1.0: state 7 ports 3 chg 0000 evt 0002
hub 2-2:1.0: port 1, status 0101, change 0001, 12 Mb/s
hub 2-2:1.0: debounce: port 1: total 100ms stable 100ms status 0x101
usb 2-2.1: new full speed USB device using uhci_hcd and address 7
usb 2-2.1: not running at top speed; connect to a high speed hub
usb 2-2.1: default language 0x0409
usb 2-2.1: new device strings: Mfr=1, Product=2, SerialNumber=3
usb 2-2.1: Product: Store 'n' Go
usb 2-2.1: Manufacturer: Verbatim
usb 2-2.1: SerialNumber: 0CD177515381390D
usb 2-2.1: uevent
usb 2-2.1: device is bus-powered
usb 2-2.1: no configuration chosen from 1 choice
drivers/usb/core/inode.c: creating file '007'
hub 2-2:1.0: 100mA power budget left
hub 2-2:1.0: state 7 ports 3 chg 0000 evt 0002
Comment 5 Daniel Drake (RETIRED) gentoo-dev 2006-05-13 17:29:30 UTC
Henning, please describe the problem in full. Which device are you connecting? Does it work OK if connected to a real port or powered hub? Which kernels have you tried? Which are affected, which are OK?
Comment 6 Henning Rogge 2006-05-14 02:24:40 UTC
I'm trying to connect a USB stick (Verbatim, 2GB capacity) to my computer. If I put it into a USB port directly in the computer it works.

Kernel 2.6.16 dmesg output:
usb 1-6: new high speed USB device using ehci_hcd and address 7
usb 1-6: configuration #1 chosen from 1 choice
scsi2 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 7
usb-storage: waiting for device to settle before scanning
  Vendor: VBTM      Model: Store 'n' Go      Rev: 1.04
  Type:   Direct-Access                      ANSI SCSI revision: 00
SCSI device sde: 4012032 512-byte hdwr sectors (2054 MB)
sde: Write Protect is off
sde: Mode Sense: 23 00 00 00
sde: assuming drive cache: write through
SCSI device sde: 4012032 512-byte hdwr sectors (2054 MB)
sde: Write Protect is off
sde: Mode Sense: 23 00 00 00
sde: assuming drive cache: write through
 sde: sde1
sd 2:0:0:0: Attached scsi removable disk sde
sd 2:0:0:0: Attached scsi generic sg4 type 0
usb-storage: device scan complete

When I stick it into one of the two ports at my USB-Keyboard it does not work (see dmesg output above). The USB ports itself are okay (I use a USB headset on one of them), the problem started to appear with gentoo kernel 2.6.16 (both RCs) and is still present in the vanilla kernel 2.6.17-rc4.
The USB stick works with gentoo kernel 2.6.15 at the hub in my keyboard.

I don't own a powered hub, so I cannot check this part of the question.
Comment 7 pandrews 2006-05-14 02:42:28 UTC
I also have a Verbatim Thumb Drive (1 Gb version) and this appears to be the problem.

When I plug in my EIDE to USB hard drive conversion into the same port on my non-powered keyboard I get this for my dmesg:
usb 3-1.2: new full speed USB device using uhci_hcd and address 10
usb 3-1.2: not running at top speed; connect to a high speed hub
usb 3-1.2: configuration #1 chosen from 1 choice
scsi4 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 10
usb-storage: waiting for device to settle before scanning
  Vendor: Maxtor 5  Model: T060H6            Rev: TAH7
  Type:   Direct-Access                      ANSI SCSI revision: 00
SCSI device sda: 120103200 512-byte hdwr sectors (61493 MB)
sda: Write Protect is off
sda: Mode Sense: 00 14 00 00
sda: assuming drive cache: write through
SCSI device sda: 120103200 512-byte hdwr sectors (61493 MB)
sda: Write Protect is off
sda: Mode Sense: 00 14 00 00
sda: assuming drive cache: write through
 sda: sda1 sda2 sda3 sda4
sd 4:0:0:0: Attached scsi disk sda
sd 4:0:0:0: Attached scsi generic sg0 type 0
usb-storage: device scan complete

And I can see and mount all the partitions on the drive.

I now believe that our problem is with the Verbatim media.  What has changed in the kernel so this media no longer works correctly?  The Verbatim media works correctly when plugged directly into my computer.

(In reply to comment #6)
> I'm trying to connect a USB stick (Verbatim, 2GB capacity) to my computer. If I
> put it into a USB port directly in the computer it works.
> 
> Kernel 2.6.16 dmesg output:
> usb 1-6: new high speed USB device using ehci_hcd and address 7
> usb 1-6: configuration #1 chosen from 1 choice
> scsi2 : SCSI emulation for USB Mass Storage devices
> usb-storage: device found at 7
> usb-storage: waiting for device to settle before scanning
>   Vendor: VBTM      Model: Store 'n' Go      Rev: 1.04
>   Type:   Direct-Access                      ANSI SCSI revision: 00
> SCSI device sde: 4012032 512-byte hdwr sectors (2054 MB)
> sde: Write Protect is off
> sde: Mode Sense: 23 00 00 00
> sde: assuming drive cache: write through
> SCSI device sde: 4012032 512-byte hdwr sectors (2054 MB)
> sde: Write Protect is off
> sde: Mode Sense: 23 00 00 00
> sde: assuming drive cache: write through
>  sde: sde1
> sd 2:0:0:0: Attached scsi removable disk sde
> sd 2:0:0:0: Attached scsi generic sg4 type 0
> usb-storage: device scan complete
> 
> When I stick it into one of the two ports at my USB-Keyboard it does not work
> (see dmesg output above). The USB ports itself are okay (I use a USB headset on
> one of them), the problem started to appear with gentoo kernel 2.6.16 (both
> RCs) and is still present in the vanilla kernel 2.6.17-rc4.
> The USB stick works with gentoo kernel 2.6.15 at the hub in my keyboard.
> 
> I don't own a powered hub, so I cannot check this part of the question.
> 

Comment 8 Daniel Drake (RETIRED) gentoo-dev 2006-05-15 12:44:13 UTC
pandrews: so, just to clarify, you have 2 USB storage devices. One of them (USB-IDE adapter) works fine on your unpowered keyboard hub under 2.6.16. Another one of them (the verbatim device) does not?
Comment 9 pandrews 2006-05-15 22:20:15 UTC
To clarify:  My Verbatim USB drive does not work, while my other USB drive does.

Previous poster is correct.
Comment 10 Daniel Drake (RETIRED) gentoo-dev 2006-05-17 04:45:14 UTC
Please attach "lsusb -v" output for the devices which no longer work in 2.6.16. Doesn't matter if they are not claimed by the driver due to this bug, lsusb should work anyway.
Comment 11 Daniel Drake (RETIRED) gentoo-dev 2006-05-17 07:17:38 UTC
Also, is anyone able to test the same device in the same hub on windows?
Comment 12 Henning Rogge 2006-05-17 10:54:46 UTC
Okay, I think we are getting closer to my problem. When I connect the USB-stick on windows to the same slot, I get an error that the hub has not enough power for this USB device.

I can use a USB headset at the slot without problem (in windows and linux), but not my 2GB memorystick.

I don't understand this, the stick was working at the older kernel !

This is my "lsusb -v" output, the stick is the first device in the list:

Bus 002 Device 004: ID 08ec:0008 M-Systems Flash Disk Pioneers 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x08ec M-Systems Flash Disk Pioneers
  idProduct          0x0008 
  bcdDevice            1.00
  iManufacturer           1 
  iProduct                2 
  iSerial                 3 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           39
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x80
    MaxPower              200mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           3
      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
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               1

Bus 002 Device 001: ID 0000:0000  
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            9 Hub
  bDeviceSubClass         0 Unused
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x0000 
  idProduct          0x0000 
  bcdDevice            2.06
  iManufacturer           3 Linux 2.6.16-gentoo-r7 uhci_hcd
  iProduct                2 UHCI Host Controller
  iSerial                 1 0000:00:1d.0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           25
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xc0
      Self Powered
    MaxPower                0mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         9 Hub
      bInterfaceSubClass      0 Unused
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0002  1x 2 bytes
        bInterval             255
Hub Descriptor:
  bLength               9
  bDescriptorType      41
  nNbrPorts             2
  wHubCharacteristic 0x000a
    No power switching (usb 1.0)
    Per-port overcurrent protection
  bPwrOn2PwrGood        1 * 2 milli seconds
  bHubContrCurrent      0 milli Ampere
  DeviceRemovable    0x2c
  PortPwrCtrlMask    0x47 
 Hub Port Status:
   Port 1: 0000.0100 power
   Port 2: 0000.0103 power enable connect

Bus 002 Device 002: ID 04b4:2050 Cypress Semiconductor Corp. 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            9 Hub
  bDeviceSubClass         0 Unused
  bDeviceProtocol         0 
  bMaxPacketSize0         8
  idVendor           0x04b4 Cypress Semiconductor Corp.
  idProduct          0x2050 
  bcdDevice            0.01
  iManufacturer           0 
  iProduct                0 
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           25
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xa0
      Remote Wakeup
    MaxPower               50mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         9 Hub
      bInterfaceSubClass      0 Unused
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0001  1x 1 bytes
        bInterval             255
Hub Descriptor:
  bLength               9
  bDescriptorType      41
  nNbrPorts             3
  wHubCharacteristic 0x000d
    Per-port power switching
    Compound device
    Per-port overcurrent protection
  bPwrOn2PwrGood       50 * 2 milli seconds
  bHubContrCurrent    100 milli Ampere
  DeviceRemovable    0x2c
  PortPwrCtrlMask    0x47 
 Hub Port Status:
   Port 1: 0000.0103 power enable connect
   Port 2: 0000.0100 power
   Port 3: 0000.0103 power enable connect

Bus 002 Device 003: ID 0458:004c KYE Systems Corp. (Mouse Systems) Slimstar Pro Keyboard
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         8
  idVendor           0x0458 KYE Systems Corp. (Mouse Systems)
  idProduct          0x004c Slimstar Pro Keyboard
  bcdDevice            1.01
  iManufacturer           0 
  iProduct                1 ABBHOME
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           34
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xa0
      Remote Wakeup
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Devices
      bInterfaceSubClass      1 Boot Interface Subclass
      bInterfaceProtocol      1 Keyboard
      iInterface              0 
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.10
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength     165
         Report Descriptors: 
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval              10

Bus 003 Device 001: ID 0000:0000  
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            9 Hub
  bDeviceSubClass         0 Unused
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x0000 
  idProduct          0x0000 
  bcdDevice            2.06
  iManufacturer           3 Linux 2.6.16-gentoo-r7 uhci_hcd
  iProduct                2 UHCI Host Controller
  iSerial                 1 0000:00:1d.1
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           25
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xc0
      Self Powered
    MaxPower                0mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         9 Hub
      bInterfaceSubClass      0 Unused
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0002  1x 2 bytes
        bInterval             255
Hub Descriptor:
  bLength               9
  bDescriptorType      41
  nNbrPorts             2
  wHubCharacteristic 0x000a
    No power switching (usb 1.0)
    Per-port overcurrent protection
  bPwrOn2PwrGood        1 * 2 milli seconds
  bHubContrCurrent      0 milli Ampere
  DeviceRemovable    0x2c
  PortPwrCtrlMask    0x47 
 Hub Port Status:
   Port 1: 0000.0103 power enable connect
   Port 2: 0000.0100 power

Bus 003 Device 002: ID 0db0:6982 Micro Star International Medion Flash XL V2.7A Card Reader
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         8
  idVendor           0x0db0 Micro Star International
  idProduct          0x6982 Medion Flash XL V2.7A Card Reader
  bcdDevice            3.0c
  iManufacturer           1 MEDION
  iProduct                2 Medion Flash XL V3.0C
  iSerial                 3 2003-02
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           39
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          4 CONFIGURATION
    bmAttributes         0x80
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     80 Bulk (Zip)
      iInterface              5 INTERFACE 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
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval              10

Bus 004 Device 001: ID 0000:0000  
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            9 Hub
  bDeviceSubClass         0 Unused
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x0000 
  idProduct          0x0000 
  bcdDevice            2.06
  iManufacturer           3 Linux 2.6.16-gentoo-r7 uhci_hcd
  iProduct                2 UHCI Host Controller
  iSerial                 1 0000:00:1d.2
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           25
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xc0
      Self Powered
    MaxPower                0mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         9 Hub
      bInterfaceSubClass      0 Unused
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0002  1x 2 bytes
        bInterval             255
Hub Descriptor:
  bLength               9
  bDescriptorType      41
  nNbrPorts             2
  wHubCharacteristic 0x000a
    No power switching (usb 1.0)
    Per-port overcurrent protection
  bPwrOn2PwrGood        1 * 2 milli seconds
  bHubContrCurrent      0 milli Ampere
  DeviceRemovable    0x2c
  PortPwrCtrlMask    0x47 
 Hub Port Status:
   Port 1: 0000.0100 power
   Port 2: 0000.0100 power

Bus 001 Device 001: ID 0000:0000  
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            9 Hub
  bDeviceSubClass         0 Unused
  bDeviceProtocol         1 Single TT
  bMaxPacketSize0        64
  idVendor           0x0000 
  idProduct          0x0000 
  bcdDevice            2.06
  iManufacturer           3 Linux 2.6.16-gentoo-r7 ehci_hcd
  iProduct                2 EHCI Host Controller
  iSerial                 1 0000:00:1d.7
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           25
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xc0
      Self Powered
    MaxPower                0mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         9 Hub
      bInterfaceSubClass      0 Unused
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0002  1x 2 bytes
        bInterval              12
Hub Descriptor:
  bLength              11
  bDescriptorType      41
  nNbrPorts             8
  wHubCharacteristic 0x000a
    No power switching (usb 1.0)
    Per-port overcurrent protection
    TT think time 8 FS bits
  bPwrOn2PwrGood       10 * 2 milli seconds
  bHubContrCurrent      0 milli Ampere
  DeviceRemovable    0x2c 0x47
  PortPwrCtrlMask    0x05  0x08 
 Hub Port Status:
   Port 1: 0000.0100 power
   Port 2: 0000.0000
   Port 3: 0000.0000
   Port 4: 0000.0100 power
   Port 5: 0000.0100 power
   Port 6: 0000.0100 power
   Port 7: 0000.0100 power
   Port 8: 0000.0100 power

Bus 005 Device 001: ID 0000:0000  
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            9 Hub
  bDeviceSubClass         0 Unused
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x0000 
  idProduct          0x0000 
  bcdDevice            2.06
  iManufacturer           3 Linux 2.6.16-gentoo-r7 uhci_hcd
  iProduct                2 UHCI Host Controller
  iSerial                 1 0000:00:1d.3
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           25
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xc0
      Self Powered
    MaxPower                0mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         9 Hub
      bInterfaceSubClass      0 Unused
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0002  1x 2 bytes
        bInterval             255
Hub Descriptor:
  bLength               9
  bDescriptorType      41
  nNbrPorts             2
  wHubCharacteristic 0x000a
    No power switching (usb 1.0)
    Per-port overcurrent protection
  bPwrOn2PwrGood        1 * 2 milli seconds
  bHubContrCurrent      0 milli Ampere
  DeviceRemovable    0x2c
  PortPwrCtrlMask    0x47 
 Hub Port Status:
   Port 1: 0000.0100 power
   Port 2: 0000.0100 power
Comment 13 Daniel Drake (RETIRED) gentoo-dev 2006-05-17 11:18:00 UTC
Thanks for testing that. The explanation is that all versions of Linux before 2.6.16 were buggy, in that they did not look at the amount of power available and the amount of power requested by the device, ot just went ahead anyway.

2.6.16 now takes power budget into account, and is not powering your device because not enough power is available. Unpowered hubs can only provide a maximum of 100mA but your flash disks claims it requires up to 200mA.
Comment 14 Henning Rogge 2006-05-17 11:34:17 UTC
So it might be just a bad description table in the USB stick... the stick ist working on the hub (it did with 2.6.15)...

Good to know it's no bug in the kernel, bad to know that I cannot use the keyboard port for my memory stick. :(
Comment 15 Daniel Gryniewicz (RETIRED) gentoo-dev 2006-05-17 12:27:00 UTC
Not necessarily.  It chould be doing partial writes and (not so) slowly destroying your flash...

Realistically, the manufacturer presumably built in a bit of padding, but I'd say you're pushing your luck to try and use it.
Comment 16 pandrews 2006-05-17 19:57:19 UTC
I can verify the 200mA usage for the Verbatim M-Systems Flash drive.  My lsusb -v gives the same information for the Flash drive as above.

So, if I understand this correctly.  We have found a "feature" of the kernel, not a bug?  Should there be an error in dmesg or something that informs us of this "feature" rather than submitting a bug report?
Comment 17 Daniel Drake (RETIRED) gentoo-dev 2006-05-21 13:41:54 UTC
Created attachment 87210 [details, diff]
patch

Yes, this is a "feature". However, given that you both have the same or similar device, it may be worth you contacting the manufacturer and letting them know it appeared to work fine at 100mA -- maybe they will fix up future devices.

Please apply this patch - it will generate an informational message when a device was rejected due to insufficient power. If you can confirm that works, I'll try and get it accepted upstream.
Comment 18 Daniel Drake (RETIRED) gentoo-dev 2006-06-01 05:37:13 UTC
I've had confirmation that the patch works, so it will be included in the next gentoo-sources.

By the way, there is a workaround you can use to get these devices working even on an unpowered hub:
http://marc.theaimsgroup.com/?l=linux-usb-devel&m=114781479530376&w=2
Comment 19 Daniel Drake (RETIRED) gentoo-dev 2006-06-02 11:16:46 UTC
Fixed in gentoo-sources-2.6.16-gentoo-r9 / genpatches-2.6.16-11