1. 25 9月, 2010 2 次提交
  2. 04 9月, 2010 1 次提交
    • T
      usb: allow drivers to use allocated bandwidth until unbound · 0791971b
      Thadeu Lima de Souza Cascardo 提交于
      When using the remove sysfs file, the device configuration is set to -1
      (unconfigured). This eventually unbind drivers with the bandwidth_mutex
      held. Some drivers may call functions that hold said mutex, like
      usb_reset_device. This is the case for rtl8187, for example. This will
      lead to the same process holding the mutex twice, which deadlocks.
      
      Besides, according to Alan Stern:
      "The deadlock problem probably could be handled somehow, but there's a
      separate issue: Until the usb_disable_device call finishes unbinding
      the drivers, the drivers are free to continue using their allocated
      bandwidth.  We musn't change the bandwidth allocations until after the
      unbinding is done.  So this patch is indeed necessary."
      
      Unbinding the driver before holding the bandwidth_mutex solves the
      problem. If any operation after that fails, drivers are not bound again.
      But that would be a problem anyway that the user may solve resetting the
      device configuration to one that works, just like he would need to do in
      most other failure cases.
      Signed-off-by: NThadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Cc: Sarah Sharp <sarah.a.sharp@linux.intel.com>
      Cc: stable <stable@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      0791971b
  3. 11 8月, 2010 21 次提交
  4. 27 7月, 2010 3 次提交
  5. 30 6月, 2010 2 次提交
    • A
      USB: obey the sysfs power/wakeup setting · 48826626
      Alan Stern 提交于
      This patch (as1403) is a partial reversion of an earlier change
      (commit 5f677f1d "USB: fix remote
      wakeup settings during system sleep").  After hearing from a user, I
      realized that remote wakeup should be enabled during system sleep
      whenever userspace allows it, and not only if a driver requests it
      too.
      
      Indeed, there could be a device with no driver, that does nothing but
      generate a wakeup request when the user presses a button.  Such a
      device should be allowed to do its job.
      
      The problem fixed by the earlier patch -- device generating a wakeup
      request for no reason, causing system suspend to abort -- was also
      addressed by a later patch ("USB: don't enable remote wakeup by
      default", accepted but not yet merged into mainline).  The device
      won't be able to generate the bogus wakeup requests because it will be
      disabled for remote wakeup by default.  Hence this reversion will not
      re-introduce any old problems.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Cc: stable <stable@kernel.org> [.34]
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
      48826626
    • A
      USB: fix oops in usb_sg_init() · 64d65872
      Alan Stern 提交于
      This patch (as1401) fixes a bug in usb_sg_init() that can cause an
      invalid pointer dereference.  An inner loop reuses some local variables
      in an unsafe manner, so new variables are introduced.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Tested-by: NAjay Kumar Gupta <ajay.gupta@ti.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      64d65872
  6. 05 6月, 2010 1 次提交
  7. 22 5月, 2010 2 次提交
  8. 21 5月, 2010 8 次提交