1. 03 Jul, 2008 1 commit
  2. 11 Jun, 2008 1 commit
  3. 29 May, 2008 2 commits
    • Alan Stern's avatar
      USB: EHCI: suppress unwanted error messages · 3a31155c
      Alan Stern authored
      This patch (as1096) fixes an annoying problem: When a full-speed or
      low-speed device is plugged into an EHCI controller, it fails to
      enumerate at high speed and then is handed over to the companion
      controller.  But usbcore logs a misleading and unwanted error message
      when the high-speed enumeration fails.
      The patch adds a new HCD method, port_handed_over, which asks whether
      a port has been handed over to a companion controller.  If it has, the
      error message is suppressed.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      CC: David Brownell <david-b@pacbell.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
    • Alan Stern's avatar
      USB: fix possible deadlock involving sysfs attributes · e16362a0
      Alan Stern authored
      There is a potential deadlock when the usb_generic driver is unbound
      from a device.  The problem is that generic_disconnect() is called
      with the device lock held, and it removes a bunch of device attributes
      from sysfs.  If a user task happens to be running an attribute method
      at the time, the removal will block until the method returns.  But at
      least one of the attribute methods (the store routine for power/level)
      needs to acquire the device lock!
      This patch (as1093) eliminates the deadlock by moving the calls to
      create and remove the sysfs attributes from the usb_generic driver
      into usb_new_device() and usb_disconnect(), where they can be invoked
      without holding the device lock.
      Besides, the other sysfs attributes are created when the device is
      registered and removed when the device is unregistered.  So it seems
      only fitting for the extra attributes to be created and removed at the
      same time.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
  4. 24 Apr, 2008 12 commits
  5. 18 Apr, 2008 1 commit
  6. 01 Feb, 2008 6 commits
  7. 17 Dec, 2007 1 commit
  8. 28 Nov, 2007 1 commit
  9. 18 Oct, 2007 1 commit
  10. 15 Oct, 2007 1 commit
  11. 12 Oct, 2007 9 commits
    • Alan Stern's avatar
      USB: mutual exclusion for EHCI init and port resets · 32fe0198
      Alan Stern authored
      This patch (as999) fixes a problem that sometimes shows up when host
      controller driver modules are loaded in the wrong order.  If ehci-hcd
      happens to initialize an EHCI controller while the companion OHCI or
      UHCI controller is in the middle of a port reset, the reset can fail
      and the companion may get very confused.  The patch adds an
      rw-semaphore and uses it to keep EHCI initialization and port resets
      mutually exclusive.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Acked-by: default avatarDavid Brownell <david-b@pacbell.net>
      Cc: David Miller <davem@davemloft.net>
      Cc: Dely L Sy <dely.l.sy@intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
    • jidong xiao's avatar
      USB: fix limited_power setting mistake in hub.c · 403fae78
      jidong xiao authored
      This patch (jx001) fixes a variable assignment mistake in hub driver.
      limited_power should be set to 0 if the hub is self-powered,and 1 if
      the hub is bus-powered.
      However, the effect of the code was exactly opposite to the spec's
      statement for the Local Power Source field. The spec says, this field
      is 1 meaning Local power supply lost while this field is 0 indicating
      Local power supply good.(This statement is very confusing.)
      So this patch switchs the 0 and 1.
      Signed-off-by: default avatarJason Xiao <jidong.xiao@gmail.com>
      Acked-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
    • Alan Stern's avatar
      USB: flush outstanding URBs when suspending · 6840d255
      Alan Stern authored
      This patch (as989) makes usbcore flush all outstanding URBs for each
      device as the device is suspended.  This will be true even when
      CONFIG_USB_SUSPEND is not enabled.
      In addition, an extra can_submit flag is added to the usb_device
      structure.  That flag will be turned off whenever a suspend request
      has been received for the device, even if the device isn't actually
      suspended because CONFIG_USB_SUSPEND isn't set.
      It's no longer necessary to check for the device state being equal to
      USB_STATE_SUSPENDED during URB submission; that check can be replaced
      by a check of the can_submit flag.  This also permits us to remove
      some questionable references to the deprecated power.power_state field.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
    • Alan Stern's avatar
      USB: remove traces of urb->status from usbcore · e015268d
      Alan Stern authored
      This patch (as981) removes the remaining nontrivial usages of
      urb->status from usbcore.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
    • Greg Kroah-Hartman's avatar
      USB: rename choose_configuration · b5ea060f
      Greg Kroah-Hartman authored
      As it is global, give it a usb specific name in the global namespace.
      Cc: Inaky Perez-Gonzalez <inaky@linux.intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
    • Inaky Perez-Gonzalez's avatar
      usb: introduce usb_authorize/deauthorize() · 93993a0a
      Inaky Perez-Gonzalez authored
      These USB API functions will do the full authorization/deauthorization
      to be used for a device. When authorized we effectively allow a
      configuration to be set. Reverse that when deauthorized.
      Effectively this means that we have to clean all the configuration
      descriptors on deauthorize and reload them when we authorized. We could
      do without throwing them out for wired devices, but for wireless, we can
      read them only after authenticating, and thus, when authorizing an
      authenticated device we would need to read them. So to simplify, always
      release them on deauthorize(), re-read them on authorize().
      Also fix leak reported by Ragner Magalhaes; in usb_deauthorize_device(),
      bNumConfigurations was being set to zero before the for loop, and thus
      the different raw descriptors where never being freed.
      Signed-off-by: default avatarInaky Perez-Gonzalez <inaky@linux.intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
    • Inaky Perez-Gonzalez's avatar
      usb: split usb_new_device for clarity and refactoring · d9d16e8a
      Inaky Perez-Gonzalez authored
      This patch takes hub.c:usb_new_device() and splits it in three parts:
      - The actual actions of adding a new device (quirk detection,
        announcement and autoresume tracking)
      - Actual discovery and probing of the configuration and interfaces
        (split into __usb_configure_device())
      - Configuration of the On-the-go parameters (split into
      The fundamental reasons for doing this split are clarity (smaller
      functions are easier to maintain) and to allow part of the code to be
      reused when authorizing devices to connect.
      When a device is authorized connection, we need to run through the
      hoops we didn't run when it was connected but not authorized, which is
      basically parsing the configurations and probing
      them. usb_configure_device() will do that for us.
      Signed-off-by: default avatarInaky Perez-Gonzalez <inaky@linux.intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
    • Alan Stern's avatar
      USB: address-0 handling during device initialization · 4326ed0b
      Alan Stern authored
      This patch (as947) changes the device initialization and enumeration
      code in hub.c; now udev->devnum will be set to 0 while the device is
      being accessed at address 0.  Until now this wasn't needed because the
      address value was passed as part of urb->pipe; without that field the
      device address must be stored elsewhere.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
    • Alan Stern's avatar
      USB: add ep->enable · bdd016ba
      Alan Stern authored
      This patch (as944) adds an explicit "enabled" field to the
      usb_host_endpoint structure and uses it in place of the current
      mechanism.  This is merely a time-space tradeoff; it makes checking
      whether URBs may be submitted to an endpoint simpler.  The existing
      mechanism is efficient when converting urb->pipe to an endpoint
      pointer, but it's not so efficient when urb->ep is used instead.
      As a side effect, the procedure for enabling an endpoint is now a
      little more complicated.  The ad-hoc inline code in usb.c and hub.c
      for enabling ep0 is now replaced with calls to usb_enable_endpoint,
      which is no longer static.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
  12. 22 Aug, 2007 1 commit
  13. 19 Jul, 2007 1 commit
  14. 17 Jul, 2007 1 commit
    • Rafael J. Wysocki's avatar
      Freezer: make kernel threads nonfreezable by default · 83144186
      Rafael J. Wysocki authored
      Currently, the freezer treats all tasks as freezable, except for the kernel
      threads that explicitly set the PF_NOFREEZE flag for themselves.  This
      approach is problematic, since it requires every kernel thread to either
      set PF_NOFREEZE explicitly, or call try_to_freeze(), even if it doesn't
      care for the freezing of tasks at all.
      It seems better to only require the kernel threads that want to or need to
      be frozen to use some freezer-related code and to remove any
      freezer-related code from the other (nonfreezable) kernel threads, which is
      done in this patch.
      The patch causes all kernel threads to be nonfreezable by default (ie.  to
      have PF_NOFREEZE set by default) and introduces the set_freezable()
      function that should be called by the freezable kernel threads in order to
      unset PF_NOFREEZE.  It also makes all of the currently freezable kernel
      threads call set_freezable(), so it shouldn't cause any (intentional)
      change of behaviour to appear.  Additionally, it updates documentation to
      describe the freezing of tasks more accurately.
      [akpm@linux-foundation.org: build fixes]
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: default avatarNigel Cunningham <nigel@nigel.suspend2.net>
      Cc: Pavel Machek <pavel@ucw.cz>
      Cc: Oleg Nesterov <oleg@tv-sign.ru>
      Cc: Gautham R Shenoy <ego@in.ibm.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
  15. 12 Jul, 2007 1 commit
    • Alan Stern's avatar
      USB: add power/persist device attribute · b41a60ec
      Alan Stern authored
      This patch (as920) adds an extra level of protection to the
      USB-Persist facility.  Now it will apply by default only to hubs; for
      all other devices the user must enable it explicitly by setting the
      power/persist device attribute.
      The disconnect_all_children() routine in hub.c has been removed and
      its code placed inline.  This is the way it was originally as part of
      hub_pre_reset(); the revised usage in hub_reset_resume() is
      sufficiently different that the code can no longer be shared.
      Likewise, mark_children_for_reset() is now inline as part of
      hub_reset_resume().  The end result looks much cleaner than before.
      The sysfs interface is updated to add the new attribute file, and
      there are corresponding documentation updates.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>