1. 14 11月, 2008 2 次提交
  2. 30 10月, 2008 2 次提交
    • A
      USB: prevent autosuspend during hub initialization · 61fbeba1
      Alan Stern 提交于
      This patch (as1153) fixes a potential problem in hub initialization.
      Starting in 2.6.28, initialization was split into several tasks to
      help speed up booting.  This opens the possibility that the hub may be
      autosuspended before all the initialization tasks can complete.
      
      Normally that wouldn't matter, but with incomplete initialization
      there is a risk that the hub would never autoresume -- especially if
      devices were plugged into the hub beforehand.  The solution is a
      simple one-line change to suppress autosuspend until the
      initialization is finished.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      61fbeba1
    • A
      USB: fix crash when URBs are unlinked after the device is gone · cde217a5
      Alan Stern 提交于
      This patch (as1151) protects usbcore against drivers that try to
      unlink an URB after the URB's device or bus have been removed.  The
      core does not currently check for this, and certain drivers can cause
      a crash if they are running while an HCD is unloaded.
      
      Certainly it would be best to fix the guilty drivers.  But a little
      defensive programming doesn't hurt, especially since it appears that
      quite a few drivers need to be fixed.
      
      The patch prevents the problem by grabbing a reference to the device
      while an unlink is in progress and using a new spinlock to synchronize
      unlinks with device removal.  (There's no need to acquire a reference
      to the bus as well, since the device structure itself keeps a
      reference to the bus.)  In addition, the kerneldoc is updated to
      indicate that URBs should not be unlinked after the disconnect method
      returns.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Cc: stable <stable@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      cde217a5
  3. 23 10月, 2008 1 次提交
    • A
      USB: don't rebind drivers after failed resume or reset · 6c640945
      Alan Stern 提交于
      This patch (as1152) may help prevent some problems associated with the
      new policy of unbinding drivers that don't support suspend/resume or
      pre_reset/post_reset.  If for any reason the resume or reset fails, and
      the device is logically disconnected, there's no point in trying to
      rebind the driver.  So the patch checks for success before carrying
      out the unbind/rebind.
      
      There was a report from one user that this fixed a problem he was
      experiencing, but the details never became fully clear.  In any case,
      adding these tests can't hurt.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Cc: stable <stable@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      6c640945
  4. 18 10月, 2008 12 次提交
  5. 17 10月, 2008 1 次提交
  6. 14 10月, 2008 1 次提交
  7. 24 9月, 2008 2 次提交
    • A
      USB: revert recovery from transient errors · 5257d97a
      Alan Stern 提交于
      This patch (as1135) essentially reverts the major parts of two earlier
      patches to usbcore, because they ended up causing a regression.
      
      Trying to recover from transient communication errors can lead to
      other problems, because operations that failed during the error period
      are not always retried.  The simplest example is the initial
      Set-Config request sent after device enumeration; if it gets lost then
      it will not be retried and the device will remain unconfigured.
      
      This patch restores the old behavior in which any port disconnect or
      port disable causes the entire device structure to be removed, fixing a
      reported regression.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Tested-by: NFrans Pop <elendil@planet.nl>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
      5257d97a
    • G
      USB: fix hcd interrupt disabling · 83a79820
      Geoff Levand 提交于
      Commit de85422b, 'USB: fix interrupt
      disabling for HCDs with shared interrupt handlers' changed usb_add_hcd()
      to strip IRQF_DISABLED from irqflags prior to calling request_irq()
      with the justification that such a removal was necessary for shared
      interrupts to work properly.  Unfortunately, the change in that commit
      unconditionally removes the IRQF_DISABLED flag, causing problems on
      platforms that don't use a shared interrupt but require IRQF_DISABLED.
      This change adds a check for IRQF_SHARED prior to removing the
      IRQF_DISABLED flag.
      
      Fixes the PS3 system startup hang reported with recent Fedora and
      OpenSUSE kernels.
      
      Note that this problem is hidden when CONFIG_LOCKDEP=y (ps3_defconfig),
      as local_irq_enable_in_hardirq() is defined as a null statement for
      that config.
      
      CC: stable <stable@kernel.org>
      Signed-off-by: NGeoff Levand <geoffrey.levand@am.sony.com>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Cc: Stefan Becker <Stefan.Becker@nokia.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      83a79820
  8. 22 8月, 2008 6 次提交
    • A
      USB: automatically enable RHSC interrupts · b5fb454f
      Alan Stern 提交于
      This patch (as1069c) changes the way OHCI root-hub status-change
      interrupts are enabled.  Currently a special HCD method,
      hub_irq_enable(), is called when the hub driver is finished using a
      root hub.  This approach turns out to be subject to races, resulting
      in unnecessary polling.
      
      The patch does away with the method entirely.  Instead, the driver
      automatically enables the RHSC interrupt when no more status changes
      are present.  This scheme is safe with controllers using
      level-triggered semantics for their interrupt flags.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      b5fb454f
    • A
      USB: Don't rebind before "complete" callback · 5096aedc
      Alan Stern 提交于
      This patch (as1130) fixes an incompatibility between the new PM
      infrastructure and USB power management.  We are not allowed to call
      drivers' probe routines during a system sleep transition between the
      "prepare" and "complete" callbacks, but that's exactly what we do when
      a driver doesn't have full suspend/resume support.  Such drivers are
      unbound during the "suspend" call and reprobed during the "resume" call.
      
      The patch causes the reprobe step to be skipped if the "complete"
      callback hasn't been issued yet, i.e., if the interface's
      dev.power.status field is not equal to DPM_ON.  Thus during the
      "resume" callback nothing bad will happen, and during the final
      "complete" callback the reprobing will occur as desired.
      
      This fixes the problem reported in Bugzilla #11263.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      5096aedc
    • A
      USB: Add new PM callback methods for USB · f2189c47
      Alan Stern 提交于
      This patch (as1129) adds support for the new PM callbacks to usbcore.
      The new callbacks merely invoke the same old USB power management
      routines as the old ones did.
      
      A minor improvement is that the callbacks are present only in the
      "USB-device" device_type structure, rather than in the bus_type
      structure.  This way they will be invoked only for USB devices, not
      for USB interfaces.  The core USB PM routines automatically handle
      suspending and resuming interfaces along with their devices.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      f2189c47
    • A
      USB: Defer Set-Interface for suspended devices · 55151d7d
      Alan Stern 提交于
      This patch (as1128) fixes one of the problems related to the new PM
      infrastructure.  We are not allowed to register new child devices
      during the middle of a system sleep transition, but unbinding a USB
      driver causes the core to automatically install altsetting 0 and
      thereby create new endpoint pseudo-devices.
      
      The patch fixes this problem (and the related problem that installing
      altsetting 0 will fail if the device is suspended) by deferring the
      Set-Interface call until some later time when it is legal and can
      succeed.  Possible later times are: when a new driver is being probed
      for the interface, and when the interface is being resumed.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      55151d7d
    • A
      USB: Add udev argument to interface suspend/resume functions · 65605ae8
      Alan Stern 提交于
      This patch (as1127) makes a minor change to the prototypes of the
      usb_suspend_interface() and usb_resume_interface() routines.  Now the
      usb_device structure is passed as an argument, instead of being
      computed on-the-fly from the usb_interface argument.
      
      It makes the code look simpler, even if it really isn't much different
      from before.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      65605ae8
    • O
      USB: fix bug in usb_unlink_anchored_urbs() · 77571f05
      Oliver Neukum 提交于
      Irqs must not accidentally be reenabled.
      Signed-off-by: NOliver Neukum <oneukum@suse.de>
      Acked-by: NMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      77571f05
  9. 14 8月, 2008 3 次提交
  10. 06 8月, 2008 1 次提交
    • A
      Fix USB storage hang on command abort · 580da348
      Alan Stern 提交于
      Okay, I found the cause of the hang.  It is a simple bug in the USB
      scatter-gather library, caused by changes added in response to the S-G
      chaining modification.
      
      This patch (as1125) fixes a bug in the USB scatter-gather library.
      Early exit from the S-G initialization loop does not reset the count of
      outstanding URBs.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Cc: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
      Cc: David Brownell <david-b@pacbell.net>
      Cc: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
      Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
      Cc: Greg KH <greg@kroah.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      580da348
  11. 22 7月, 2008 9 次提交