1. 08 1月, 2009 11 次提交
  2. 07 1月, 2009 1 次提交
    • R
      PM: Simplify the new suspend/hibernation framework for devices · adf09493
      Rafael J. Wysocki 提交于
      PM: Simplify the new suspend/hibernation framework for devices
      
      Following the discussion at the Kernel Summit, simplify the new
      device PM framework by merging 'struct pm_ops' and
      'struct pm_ext_ops' and removing pointers to 'struct pm_ext_ops'
      from 'struct platform_driver' and 'struct pci_driver'.
      
      After this change, the suspend/hibernation callbacks will only
      reside in 'struct device_driver' as well as at the bus type/
      device class/device type level.  Accordingly, PCI and platform
      device drivers are now expected to put their suspend/hibernation
      callbacks into the 'struct device_driver' embedded in
      'struct pci_driver' or 'struct platform_driver', respectively.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: NPavel Machek <pavel@suse.cz>
      Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      adf09493
  3. 06 1月, 2009 1 次提交
  4. 18 12月, 2008 1 次提交
  5. 14 11月, 2008 4 次提交
  6. 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
  7. 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
  8. 18 10月, 2008 12 次提交
  9. 17 10月, 2008 1 次提交
  10. 14 10月, 2008 1 次提交
  11. 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
  12. 22 8月, 2008 3 次提交
    • 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