1. 02 12月, 2006 8 次提交
    • A
      USB: OHCI: remove stale testing code from root-hub resume · 565402ba
      Alan Stern 提交于
      This patch (as811) removes some stale testing code from the root-hub
      resume routine in ohci-hcd.  It also adds a spin_lock_irq() call that
      inadvertently got left out of an error pathway.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      565402ba
    • E
      USB: kmemdup() cleanup in drivers/usb/ · 5d7efe5b
      Eric Sesterhenn 提交于
      replace open coded kmemdup() to save some screen space,
      and allow inlining/not inlining to be triggered by gcc.
      Signed-off-by: NEric Sesterhenn <snakebyte@gmx.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      5d7efe5b
    • A
      USB: OHCI: disable RHSC inside interrupt handler · 052ac01a
      Alan Stern 提交于
      This patch (as808b) moves the Root Hub Status Change interrupt-disable
      code in ohci-hcd back into the interrupt handler proper, to avoid the
      chance of adverse interactions with mediocre hardware implementations.
      
      It also deletes the root-hub status timer from within the interrupt-enable
      routine.  There's no need to poll for status any more once interrupts are
      re-enabled.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      052ac01a
    • A
      USB: ohci-hcd: fix compiler warning · b1878440
      Alan Stern 提交于
      This patch (as806) fixes a compiler warning when ohci-hcd is built
      with CONFIG_PM turned off.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      b1878440
    • A
      USB core: don't match interface descriptors for vendor-specific devices · 93c8bf45
      Alan Stern 提交于
      This patch (as804) makes USB driver matching ignore the interface
      class, subclass, and protocol if the device class is Vendor Specific.
      Drivers can override this policy by specifying a Vendor ID as part
      of the match; then vendor-specific matches are allowed.
      
      Linus Walleij has reported a problem this patch fixes.  When a
      particular mass-storage device is switched from mass-storage mode to
      Media Transfer Protocol, the interface class remains set to mass-storage
      and usb-storage binds to it erroneously, even though the device class
      changes to Vendor-Specific.
      
      This may cause a problem for some drivers until their match records can
      be updated to include Vendor IDs.  But if it does, then those records
      were broken to begin with.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      93c8bf45
    • A
      USB HID: Handle STALL on interrupt endpoint · 6d8fc4d2
      Alan Stern 提交于
      The USB HID driver doesn't include any code to handle a STALL on the
      interrupt endpoint.  While this may be uncommon, it does happen
      sometimes.  This patch (as805) adds a fix.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      6d8fc4d2
    • 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 3 次提交