Loading ...
Sorry, an error occurred while loading the content.
 

usb and hub - solution

Expand Messages
  • Jörg Evers
    Hi, I have been lurking the email lists for quite a while and found a lot of suggestions from it, so I now also want to contribute. I yesterday installed an
    Message 1 of 2 , Jun 22, 2006
      Hi,

      I have been lurking the email lists for quite a
      while and found a lot of suggestions from it,
      so I now also want to contribute.

      I yesterday installed an usb audio device to my
      DebianSlug, and also found the problem that it only
      works when plugged in directly, but not via a hub.
      I found the solution using Google on the Linux-usb-devel
      list, see below. After echoing "1" to the configuration
      file corresponding to by usb device, it worked
      with the usb hub.

      But note my Kernel message:

      usb 1-2.4: new config #1 exceeds power limit by 400mA

      So this might give rise to instabilities, better
      use a powered hub. On the other hand, my USB sound
      stick claims that it needs 500mA, which I think
      is unrealistic. (the required lsusb is in the
      package usbutils which I had to install)

      Joerg


      ================================================
      On Mon, 15 May 2006, Daniel Drake wrote:

      Hi,

      Several Gentoo users are reporting that usb-storage devices no longer
      work on 2.6.16 with unpowered hubs.

      Here's some logs:

      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

      This device works in the same hub in 2.6.15, and works when plugged
      directly into a USB port on both 2.6.15 and 2.6.16. The problem has been
      reproduced on 2.6.17-rc4.

      I'm working on getting a complete report filed at the kernel bugzilla,
      but thought I would throw some attention to it here first, is it a known
      issue?

      The Gentoo bug report is at
      https://bugs.gentoo.org/show_bug.cgi?id=132721
      but it's a bit of a mess..

      Reply:
      ------

      A couple of other people have made similar reports. It's not really a
      regression; it is correct behavior that was not implemented until 2.6.16.
      The idea is that the kernel now keeps track of USB power budgets. When a
      usb-powered device requires more current than its upstream hub is capable
      of providing, the kernel will not configure it.

      Computers' USB ports are capable of providing a full 500 mA, so devices
      plugged directly into the computer will work okay. However unpowered hubs
      can provide only 100 mA to each port. Some devices require (or claim they
      require) more current than that. As a result, they don't get configured
      when plugged into an unpowered hub.

      There are several possible ways to deal with this. The device can be
      plugged directly into the computer instead of into the hub. The
      unpowered hub can be replaced with a powered hub.

      Or, if the users don't mind living a little dangerously, they can
      configure the devices manually. As root, do something like this:

      echo -n 1 >/sys/bus/usb/devices/2-2.1/bConfigurationValue

      The "2-2.1" must be replaced with the correct path to the USB device, and
      the "1" must be replaced with the correct configuration value (which can
      be found in the output from "lsusb -v", along with the device's power
      requirement).

      Alan Stern

      ==================================================
    • Rod Whitby
      This needs to be added as an FAQ. There is an intentional change by Linus in the 2.6.16 Linux kernel such that it honours the power budget supply and demand
      Message 2 of 2 , Jun 22, 2006
        This needs to be added as an FAQ.

        There is an intentional change by Linus in the 2.6.16 Linux kernel such
        that it honours the power budget supply and demand requirements and
        refuses to initialise usb devices which say they will draw more power
        than is available according to the USB spec.

        This will manifest itself by people reporting bugs like "This USB device
        used to work with OpenSlug 2.x or Unslung, but no longer works with
        SlugOS 3.x".

        The diagnosis step is to look in the syslog messages for the line which
        the kernel prints when it refuses to initialise the device.

        The work-around is either to use a powered hub, or see below for the way
        to take the situation (and risk of damaging the usb interface) into your
        own hands and override the kernel's decision.

        -- Rod

        Jörg Evers wrote:
        > I have been lurking the email lists for quite a
        > while and found a lot of suggestions from it,
        > so I now also want to contribute.
        >
        > I yesterday installed an usb audio device to my
        > DebianSlug, and also found the problem that it only
        > works when plugged in directly, but not via a hub.
        > I found the solution using Google on the Linux-usb-devel
        > list, see below. After echoing "1" to the configuration
        > file corresponding to by usb device, it worked
        > with the usb hub.
        >
        > But note my Kernel message:
        >
        > usb 1-2.4: new config #1 exceeds power limit by 400mA
        >
        > So this might give rise to instabilities, better
        > use a powered hub. On the other hand, my USB sound
        > stick claims that it needs 500mA, which I think
        > is unrealistic. (the required lsusb is in the
        > package usbutils which I had to install)
        >
        > Joerg
        >
        > ================================================
        > On Mon, 15 May 2006, Daniel Drake wrote:
        >
        > Hi,
        >
        > Several Gentoo users are reporting that usb-storage devices no longer
        > work on 2.6.16 with unpowered hubs.
        >
        > Here's some logs:
        >
        > 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
        >
        > This device works in the same hub in 2.6.15, and works when plugged
        > directly into a USB port on both 2.6.15 and 2.6.16. The problem has been
        > reproduced on 2.6.17-rc4.
        >
        > I'm working on getting a complete report filed at the kernel bugzilla,
        > but thought I would throw some attention to it here first, is it a known
        > issue?
        >
        > The Gentoo bug report is at
        > https://bugs.gentoo.org/show_bug.cgi?id=132721
        > <https://bugs.gentoo.org/show_bug.cgi?id=132721>
        > but it's a bit of a mess..
        >
        > Reply:
        > ------
        >
        > A couple of other people have made similar reports. It's not really a
        > regression; it is correct behavior that was not implemented until 2.6.16.
        > The idea is that the kernel now keeps track of USB power budgets. When a
        > usb-powered device requires more current than its upstream hub is capable
        > of providing, the kernel will not configure it.
        >
        > Computers' USB ports are capable of providing a full 500 mA, so devices
        > plugged directly into the computer will work okay. However unpowered hubs
        > can provide only 100 mA to each port. Some devices require (or claim they
        > require) more current than that. As a result, they don't get configured
        > when plugged into an unpowered hub.
        >
        > There are several possible ways to deal with this. The device can be
        > plugged directly into the computer instead of into the hub. The
        > unpowered hub can be replaced with a powered hub.
        >
        > Or, if the users don't mind living a little dangerously, they can
        > configure the devices manually. As root, do something like this:
        >
        > echo -n 1 >/sys/bus/usb/devices/2-2.1/bConfigurationValue
        >
        > The "2-2.1" must be replaced with the correct path to the USB device, and
        > the "1" must be replaced with the correct configuration value (which can
        > be found in the output from "lsusb -v", along with the device's power
        > requirement).
        >
        > Alan Stern
      Your message has been successfully submitted and would be delivered to recipients shortly.