1. 22 Jan, 2013 1 commit
  2. 16 Aug, 2012 1 commit
  3. 28 Mar, 2012 1 commit
  4. 24 Jan, 2012 1 commit
  5. 12 Jan, 2012 1 commit
  6. 26 Sep, 2011 1 commit
    • Alan Stern's avatar
      USB: UHCI: improve comments and logic for root-hub suspend · 5c12e785
      Alan Stern authored
      
      
      This patch (as1488) improves the comments and logic in uhci-hcd's
      suspend routine.  The existing comments are hard to understand and
      don't give a good idea of what's really going on.
      
      The question of whether EGSM (Enter Global Suspend Mode) and RD
      (enable Resume Detect interrupts) can be useful when they're not both
      set is difficult.  The spec doesn't give any details on how they
      interact with system wakeup, although clearly they are meant to be
      used together.  To be safe, the patch changes the subroutine so that
      neither bit gets set unless they both do.  There shouldn't be any
      functional changes from this; only systems that are designed badly or
      broken in some way need to avoid using those bits.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      5c12e785
  7. 19 May, 2011 1 commit
  8. 06 May, 2011 7 commits
  9. 26 Apr, 2011 1 commit
  10. 13 Apr, 2011 2 commits
  11. 01 Mar, 2011 1 commit
  12. 28 Feb, 2011 1 commit
  13. 16 Nov, 2010 1 commit
  14. 10 Aug, 2010 6 commits
    • Alan Stern's avatar
      USB: remove fake "address-of" expressions · b409214c
      Alan Stern authored
      
      
      Fake "address-of" expressions that evaluate to NULL generally confuse
      readers and can provoke compiler warnings.  This patch (as1412)
      removes three such fake expressions, using "#ifdef"s in their place.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      b409214c
    • Alan Stern's avatar
      USB: UHCI: add support for Intel's wakeup flags · 0d436b42
      Alan Stern authored
      
      
      This patch (as1396) adds code to uhci-hcd to support the
      vendor-specific wakeup settings found in Intel's ICHx hardware.  A
      couple of unnecessary memory barriers are removed.  And the root hub
      isn't put back into the "suspended" state if power was lost during a
      system sleep -- there's not much point in doing so because the root hub
      will be resumed shortly.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      0d436b42
    • Alan Stern's avatar
      USB: controller resume should check the root hub · ee0b9be8
      Alan Stern authored
      
      
      This patch (as1394) adds code to ehci-hcd, ohci-hcd, and uhci-hcd for
      automatically resuming the root hub when the controller is resumed, if
      the root hub has a wakeup request pending on some port.
      
      During resume from system sleep this doesn't matter, because the root
      hubs will naturally be resumed along with every other device in the
      system.  However it _will_ matter for runtime PM: If the controller is
      suspended and a remote wakeup request is received then the controller
      will autoresume, but we need to ensure that the root hub also
      autoresumes.  Otherwise the wakeup request would be ignored, the
      controller would go back to sleep, and the cycle would repeat a large
      number of times (I saw this happen before the patch was written).
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      ee0b9be8
    • Alan Stern's avatar
      USB: add do_wakeup parameter for PCI HCD suspend · 4147200d
      Alan Stern authored
      
      
      This patch (as1385) adds a "do_wakeup" parameter to the pci_suspend
      method used by PCI-based host controller drivers.  ehci-hcd in
      particular needs to know whether or not to enable wakeup when
      suspending a controller.  Although that information is currently
      available through device_may_wakeup(), when support is added for
      runtime suspend this will no longer be true.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      4147200d
    • Alan Stern's avatar
      USB: convert usb_hcd bitfields into atomic flags · 541c7d43
      Alan Stern authored
      
      
      This patch (as1393) converts several of the single-bit fields in
      struct usb_hcd to atomic flags.  This is for safety's sake; not all
      CPUs can update bitfield values atomically, and these flags are used
      in multiple contexts.
      
      The flag fields that are set only during registration or removal can
      remain as they are, since non-atomic accesses at those times will not
      cause any problems.
      
      (Strictly speaking, the authorized_default flag should become atomic
      as well.  I didn't bother with it because it gets changed only via
      sysfs.  It can be done later, if anyone wants.)
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      541c7d43
    • Alan Stern's avatar
      USB: UHCI: acquire spinlock before calling start_rh() · ba297edd
      Alan Stern authored
      
      
      This patch (as1392) fixes a bug in uhci-hcd: The start_rh() routine is
      supposed to be called with the private spinlock held.  If an IRQ comes
      in at just the wrong time, the driver will think the controller has
      died when in fact it simply hasn't start yet.
      
      The patch also addresses some issues that may prevent an URB from
      being unlinked after the controller has stopped.  This is an abnormal
      occurrence (ordinarily the controller stops only when the entire bus
      is suspended and hence there are no active URBs), so the pathways
      haven't gotten much testing.  These two changes may be a little more
      than is strictly necessary, but clearly they won't hurt.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      ba297edd
  15. 20 May, 2010 1 commit
  16. 02 Mar, 2010 1 commit
    • Pete Zaitcev's avatar
      USB: fix crash in uhci_scan_schedule · d23356da
      Pete Zaitcev authored
      
      
      When hardware is removed on a Stratus, the system may crash like this:
      
      ACPI: PCI interrupt for device 0000:7c:00.1 disabled
      Trying to free nonexistent resource <00000000a8000000-00000000afffffff>
      Trying to free nonexistent resource <00000000a4800000-00000000a480ffff>
      uhci_hcd 0000:7e:1d.0: remove, state 1
      usb usb2: USB disconnect, address 1
      usb 2-1: USB disconnect, address 2
      Unable to handle kernel paging request at 0000000000100100 RIP:
       [<ffffffff88021950>] :uhci_hcd:uhci_scan_schedule+0xa2/0x89c
      
       #4 [ffff81011de17e50] uhci_scan_schedule at ffffffff88021918
       #5 [ffff81011de17ed0] uhci_irq at ffffffff88023cb8
       #6 [ffff81011de17f10] usb_hcd_irq at ffffffff801f1c1f
       #7 [ffff81011de17f20] handle_IRQ_event at ffffffff8001123b
       #8 [ffff81011de17f50] __do_IRQ at ffffffff800ba749
      
      This occurs because an interrupt scans uhci->skelqh, which is
      being freed. We do the right thing: disable the interrupts in the
      device, and do not do any processing if the interrupt is shared
      with other source, but it's possible that another CPU gets
      delayed somewhere (e.g. loops) until we started freeing.
      
      The agreed-upon solution is to wait for interrupts to play out
      before proceeding. No other bareers are neceesary.
      
      A backport of this patch was tested on a 2.6.18 based kernel.
      Testing of 2.6.32-based kernels is under way, but it takes us
      forever (months) to turn this around. So I think it's a good
      patch and we should keep it.
      
      Tracked in RH bz#516851
      Signed-Off-By: default avatarPete Zaitcev <zaitcev@redhat.com>
      Cc: stable <stable@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      d23356da
  17. 20 Jan, 2010 1 commit
  18. 15 Sep, 2009 1 commit
  19. 15 Jun, 2009 3 commits
  20. 17 Feb, 2009 1 commit
  21. 27 Jan, 2009 1 commit
    • Rafael J. Wysocki's avatar
      USB: Fix suspend-resume of PCI USB controllers · a15d95a0
      Rafael J. Wysocki authored
      Commit a0d4922d
      
      
      (USB: fix up suspend and resume for PCI host controllers) attempted
      to fix the suspend-resume of PCI USB controllers, but unfortunately
      it did that incorrectly and interrupts are left enabled by the USB
      controllers' ->suspend_late() callback as a result.  This leads to
      serious problems during suspend which are very difficult to debug.
      
      Fix the issue by removing the ->suspend_late() callback of PCI
      USB controllers and moving the code from there to the ->suspend()
      callback executed with interrupts enabled.  Additionally, make
      the ->resume() callback of PCI USB controllers execute
      pci_enable_wake(dev, PCI_D0, false) to disable wake-up from the
      full power state (PCI_D0).
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Tested-by: default avatarAndrey Borzenkov <arvidjaar@mail.ru>
      Tested-by: default avatar"Jeff Chua" <jeff.chua.linux@gmail.com>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Christian Borntraeger <borntraeger@de.ibm.com>
      Cc: "Zdenek Kabelac" <zdenek.kabelac@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      a15d95a0
  22. 07 Jan, 2009 1 commit
    • Alan Stern's avatar
      USB: fix up suspend and resume for PCI host controllers · a0d4922d
      Alan Stern authored
      
      
      This patch (as1192) rearranges the USB PCI host controller suspend and
      resume and resume routines:
      
      	Use pci_wake_from_d3() for enabling and disabling wakeup,
      	instead of pci_enable_wake().
      
      	Carry out the actual state change while interrupts are
      	disabled.
      
      	Change the order of the preparations to agree with the
      	general recommendation for PCI devices, instead of
      	messing around with the wakeup settings while the device
      	is in D3.
      
      		In .suspend:
      			Call the underlying driver to disable IRQ
      				generation;
      			pci_wake_from_d3(device_may_wakeup());
      			pci_disable_device();
      
      		In .suspend_late:
      			pci_save_state();
      			pci_set_power_state(D3hot);
      			(for PPC_PMAC) Disable ASIC clocks
      
      		In .resume_early:
      			(for PPC_PMAC) Enable ASIC clocks
      			pci_set_power_state(D0);
      			pci_restore_state();
      
      		In .resume:
      			pci_enable_device();
      			pci_set_master();
      			pci_wake_from_d3(0);
      			Call the underlying driver to reenable IRQ
      				generation
      
      	Add the necessary .suspend_late and .resume_early method
      	pointers to the PCI host controller drivers.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      CC: Rafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      a0d4922d
  23. 17 Oct, 2008 2 commits
  24. 02 May, 2008 1 commit
    • Alan Stern's avatar
      USB: UHCI: disable remote wakeup when it's not needed · d8f12ab5
      Alan Stern authored
      
      
      This patch (as1084b) fixes the way uhci-hcd handles polling and
      remote wakeups for its root hubs.  When remote wakeup is disabled,
      neither interrupts nor polling should be enabled during a root-hub
      suspend.  Likewise, if interrupts are enabled during suspend then
      polling isn't needed.
      
      Furthermore the EGSM (Enter Global Suspend Mode) bit shouldn't be set
      in the Command register unless remote wakeup is enabled.  Apparently
      some controllers will issue a remote-wakeup interrupt whenever EGSM
      is on, even if Resume-Detect interrupts are supposedly disabled.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      d8f12ab5
  25. 24 Apr, 2008 1 commit