1. 02 12月, 2006 2 次提交
    • I
      usb hub: fix root hub code so it takes more than 15 devices per root hub · 88fafff9
      inaky@linux.intel.com 提交于
      Wireless USB Host Controllers accept a large number of devices per
      host, which shows up as a large number of ports in its root hub.
      
      When the number of ports in a hub device goes over 16, the activation
      of the hub fails with the cryptic message in klogd.
      
      hub 2-0:1.0: activate --> -22
      
      Following this further, it was seen that:
      
      hub_probe()
        hub_configure()
          generates pipe number
      
          pseudo allocates buffer 'maxp' bytes in size using usb_maxpacket()
      
            The endpoint descriptor for a root hub interrupt endpoint is
            declared in
            drivers/usb/core/hcd.c:hs_rh_config_descriptor and declares it
            to be size two (supporting 15 devices max).
      
          hub_activate()
            usb_hcd_submit_urb()
              rh_urb_enqueue()
                urb->pipe is neither int nor ctl, so it errors out
                  rh_queue_status()
                    Returns -EINVAL because the buffer length is smaller
                    than the minimum needed to report all the hub port
                    bits as in accordance with USB2.0[11.12.3]. There has
                    to be trunc((PORTS + 1 + 7) / 8) bytes of space at
                    least.
      
      Alan Stern confirmed that the reason for reading maxpktsize and not
      the right amount is because some hubs are known to return more data
      and thus cause overflow. 
      
      So this patch simply changes the code to make the interrupt endpoint's
      max packet size be at least the minimum required by USB_MAXCHILDREN
      (instead of a fixed magic number) and add documentation for that. This
      way we are always ahead of the limit.
      Signed-off-by: NInaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      88fafff9
    • I
      usb/hub: allow hubs up to 31 children · 43705251
      inaky@linux.intel.com 提交于
      Current Wireless USB host hardware (Intel i1480 for example) allows up
      to 22 devices to connect, thus bringing up the max number of children
      in the WUSB Host Controller to 22 'fake' ports. Upcoming hardware
      might raise that limit.
      
      Makes almost no difference to go to 31, as the bit arrays are
      byte-aligned (plus an extra bit in general), so 22 bits fit in 4 bytes
      as 31 do.
      
      As well, the only other array that depends on USB_MAXCHILDREN is
      'struct usb_hub->indicator'. By declaring it 'u8' instead of 'enum
      hub_led_mode', we reduce the size of each entry from 4 bytes (in i386)
      to 1, which will add as we when are doubling USB_MAXCHILDREN
      (with 16 the size of that array is 64 bytes, with 31 would be 128; by
      using u8 that goes down to 31 bytes).
      Signed-off-by: NInaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      43705251
  2. 30 11月, 2006 5 次提交
  3. 29 11月, 2006 24 次提交
  4. 28 11月, 2006 9 次提交