1. 18 2月, 2009 1 次提交
  2. 28 1月, 2009 1 次提交
    • R
      USB: Fix suspend-resume of PCI USB controllers · a15d95a0
      Rafael J. Wysocki 提交于
      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: NRafael J. Wysocki <rjw@sisk.pl>
      Tested-by: NAndrey Borzenkov <arvidjaar@mail.ru>
      Tested-by: N"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: NGreg Kroah-Hartman <gregkh@suse.de>
      a15d95a0
  3. 08 1月, 2009 1 次提交
    • A
      USB: fix up suspend and resume for PCI host controllers · a0d4922d
      Alan Stern 提交于
      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: NAlan Stern <stern@rowland.harvard.edu>
      CC: Rafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      a0d4922d
  4. 18 10月, 2008 2 次提交
  5. 03 5月, 2008 1 次提交
    • A
      USB: UHCI: disable remote wakeup when it's not needed · d8f12ab5
      Alan Stern 提交于
      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: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      d8f12ab5
  6. 25 4月, 2008 3 次提交
    • H
      USB: replace remaining __FUNCTION__ occurrences · 441b62c1
      Harvey Harrison 提交于
      __FUNCTION__ is gcc-specific, use __func__
      Signed-off-by: NHarvey Harrison <harvey.harrison@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      441b62c1
    • A
      USB: HCDs use the do_remote_wakeup flag · 58a97ffe
      Alan Stern 提交于
      When a USB device is suspended, whether or not it is enabled for
      remote wakeup depends on the device_may_wakeup() setting.  The setting
      is then saved in the do_remote_wakeup flag.
      
      Later on, however, the device_may_wakeup() value can change because of
      user activity.  So when testing whether a suspended device is or
      should be enabled for remote wakeup, we should always test
      do_remote_wakeup instead of device_may_wakeup().  This patch (as1076)
      makes that change for root hubs in several places.
      
      The patch also adjusts uhci-hcd so that when an autostopped controller
      is suspended, the remote wakeup setting agrees with the value recorded
      in the root hub's do_remote_wakeup flag.
      
      And the patch adjusts ehci-hcd so that wakeup events on selectively
      suspended ports (i.e., the bus itself isn't suspended) don't turn on
      the PME# wakeup signal.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      58a97ffe
    • A
      USB: clarify usage of hcd->suspend/resume methods · 7be7d741
      Alan Stern 提交于
      The .suspend and .resume method pointers in struct usb_hcd have not
      been fully understood by host-controller driver writers.  They are
      meant for use with PCI controllers; other platform-specific drivers
      generally should not refer to them.
      
      To try and clarify matters, this patch (as1065) renames those methods
      to .pci_suspend and .pci_resume.  It eliminates corresponding dead code
      and bogus references in the ohci-ssb and u132-hcd drivers.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      7be7d741
  7. 18 12月, 2007 1 次提交
  8. 10 10月, 2007 1 次提交
    • J
      drivers/firmware: const-ify DMI API and internals · 1855256c
      Jeff Garzik 提交于
      Three main sets of changes:
      
      1) dmi_get_system_info() return value should have been marked const,
         since callers should not be changing that data.
      
      2) const-ify DMI internals, since DMI firmware tables should,
         whenever possible, be marked const to ensure we never ever write to
         that data area.
      
      3) const-ify DMI API, to enable marking tables const where possible
         in low-level drivers.
      
      And if we're really lucky, this might enable some additional
      optimizations on the part of the compiler.
      
      The bulk of the changes are #2 and #3, which are interrelated.  #1 could
      have been a separate patch, but it was so small compared to the others,
      it was easier to roll it into this changeset.
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      1855256c
  9. 20 7月, 2007 1 次提交
    • P
      mm: Remove slab destructors from kmem_cache_create(). · 20c2df83
      Paul Mundt 提交于
      Slab destructors were no longer supported after Christoph's
      c59def9f change. They've been
      BUGs for both slab and slub, and slob never supported them
      either.
      
      This rips out support for the dtor pointer from kmem_cache_create()
      completely and fixes up every single callsite in the kernel (there were
      about 224, not including the slab allocator definitions themselves,
      or the documentation references).
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      20c2df83
  10. 13 7月, 2007 1 次提交
    • A
      USB: Don't resume root hub if the controller is suspended · cfa59dab
      Alan Stern 提交于
      Root hubs can't be resumed if their parent controller device is still
      suspended.  This patch (as925) adds a check for that condition in
      hcd_bus_resume() and prevents it from being treated as a fatal
      controller failure.
      
      ehci-hcd is updated to add the corresponding test.  Unnecessary
      debugging messages are removed from uhci-hcd and dummy-hcd.  The
      error return code from dummy-hcd is changed to -ESHUTDOWN, the same as
      the others.  ohci-hcd doesn't need any changes.
      
      Suspend handling in the non-PCI host drivers is somewhat hit-and-miss.
      This patch shouldn't have any effect on them.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      cfa59dab
  11. 27 3月, 2007 1 次提交
  12. 24 2月, 2007 2 次提交
  13. 15 2月, 2007 1 次提交
    • T
      [PATCH] remove many unneeded #includes of sched.h · cd354f1a
      Tim Schmielau 提交于
      After Al Viro (finally) succeeded in removing the sched.h #include in module.h
      recently, it makes sense again to remove other superfluous sched.h includes.
      There are quite a lot of files which include it but don't actually need
      anything defined in there.  Presumably these includes were once needed for
      macros that used to live in sched.h, but moved to other header files in the
      course of cleaning it up.
      
      To ease the pain, this time I did not fiddle with any header files and only
      removed #includes from .c-files, which tend to cause less trouble.
      
      Compile tested against 2.6.20-rc2 and 2.6.20-rc2-mm2 (with offsets) on alpha,
      arm, i386, ia64, mips, powerpc, and x86_64 with allnoconfig, defconfig,
      allmodconfig, and allyesconfig as well as a few randconfigs on x86_64 and all
      configs in arch/arm/configs on arm.  I also checked that no new warnings were
      introduced by the patch (actually, some warnings are removed that were emitted
      by unnecessarily included header files).
      Signed-off-by: NTim Schmielau <tim@physik3.uni-rostock.de>
      Acked-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      cd354f1a
  14. 08 2月, 2007 1 次提交
  15. 06 1月, 2007 2 次提交
  16. 21 12月, 2006 1 次提交
    • A
      UHCI: module parameter to ignore overcurrent changes · 5f8364b7
      Alan Stern 提交于
      Certain boards seem to like to issue false overcurrent notifications,
      for example on ports that don't have anything connected to them.  This
      looks like a hardware error, at the level of noise to those ports'
      overcurrent input signals (or non-debounced VBUS comparators).  This
      surfaces to users as truly massive amounts of syslog spam from khubd
      (which is appropriate for real hardware problems, except for the
      volume from multiple ports).
      
      Using this new "ignore_oc" flag helps such systems work more sanely,
      by preventing such indications from getting to khubd (and spamming
      syslog).  The downside is of course that true overcurrent errors will
      be masked; they'll appear as spontaneous disconnects, without the
      diagnostics that will let users troubleshoot issues like
      short-circuited cables.  In addition, controllers with no devices
      attached will be forced to poll for new devices rather than relying on
      interrupts, since each overcurrent event would generate a new
      interrupt.
      
      This patch (as826) is essentially a copy of David Brownell's ignore_oc
      patch for ehci-hcd, ported to uhci-hcd.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      5f8364b7
  17. 08 12月, 2006 1 次提交
  18. 18 10月, 2006 1 次提交
  19. 05 10月, 2006 1 次提交
    • D
      IRQ: Maintain regs pointer globally rather than passing to IRQ handlers · 7d12e780
      David Howells 提交于
      Maintain a per-CPU global "struct pt_regs *" variable which can be used instead
      of passing regs around manually through all ~1800 interrupt handlers in the
      Linux kernel.
      
      The regs pointer is used in few places, but it potentially costs both stack
      space and code to pass it around.  On the FRV arch, removing the regs parameter
      from all the genirq function results in a 20% speed up of the IRQ exit path
      (ie: from leaving timer_interrupt() to leaving do_IRQ()).
      
      Where appropriate, an arch may override the generic storage facility and do
      something different with the variable.  On FRV, for instance, the address is
      maintained in GR28 at all times inside the kernel as part of general exception
      handling.
      
      Having looked over the code, it appears that the parameter may be handed down
      through up to twenty or so layers of functions.  Consider a USB character
      device attached to a USB hub, attached to a USB controller that posts its
      interrupts through a cascaded auxiliary interrupt controller.  A character
      device driver may want to pass regs to the sysrq handler through the input
      layer which adds another few layers of parameter passing.
      
      I've build this code with allyesconfig for x86_64 and i386.  I've runtested the
      main part of the code on FRV and i386, though I can't test most of the drivers.
      I've also done partial conversion for powerpc and MIPS - these at least compile
      with minimal configurations.
      
      This will affect all archs.  Mostly the changes should be relatively easy.
      Take do_IRQ(), store the regs pointer at the beginning, saving the old one:
      
      	struct pt_regs *old_regs = set_irq_regs(regs);
      
      And put the old one back at the end:
      
      	set_irq_regs(old_regs);
      
      Don't pass regs through to generic_handle_irq() or __do_IRQ().
      
      In timer_interrupt(), this sort of change will be necessary:
      
      	-	update_process_times(user_mode(regs));
      	-	profile_tick(CPU_PROFILING, regs);
      	+	update_process_times(user_mode(get_irq_regs()));
      	+	profile_tick(CPU_PROFILING);
      
      I'd like to move update_process_times()'s use of get_irq_regs() into itself,
      except that i386, alone of the archs, uses something other than user_mode().
      
      Some notes on the interrupt handling in the drivers:
      
       (*) input_dev() is now gone entirely.  The regs pointer is no longer stored in
           the input_dev struct.
      
       (*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking.  It does
           something different depending on whether it's been supplied with a regs
           pointer or not.
      
       (*) Various IRQ handler function pointers have been moved to type
           irq_handler_t.
      Signed-Off-By: NDavid Howells <dhowells@redhat.com>
      (cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)
      7d12e780
  20. 27 9月, 2006 1 次提交
  21. 26 9月, 2006 1 次提交
  22. 01 7月, 2006 1 次提交
  23. 22 6月, 2006 6 次提交
  24. 28 4月, 2006 1 次提交
  25. 15 4月, 2006 2 次提交
  26. 21 3月, 2006 3 次提交
    • A
      [PATCH] UHCI: improve debugging code · 8d402e1a
      Alan Stern 提交于
      This patch (as626) makes some improvements to the debugging code in
      uhci-hcd.  The main change is that now the code won't get compiled if
      CONFIG_USB_DEBUG isn't set.  But there are other changes too, like
      adding a missing .owner field and printing a debugging dump if the
      controller dies.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      8d402e1a
    • A
      [PATCH] UHCI: remove main list of URBs · 0ed8fee1
      Alan Stern 提交于
      As part of reorienting uhci-hcd away from URBs and toward endpoint
      queues, this patch (as625) eliminates the driver's main list of URBs.
      The list wsa used mainly in checking for URB completions; now the driver
      goes through the list of active endpoints and checks the members of the
      queues.
      
      As a side effect, I had to remove the code that looks for FSBR timeouts.
      For now, FSBR will remain on so long as any URBs on a full-speed control
      or bulk queue request it, even if the queue isn't advancing.  A later
      patch can add more intelligent handling.  This isn't a huge drawback;
      it's pretty rare for an URB to get stuck for more than a fraction of a
      second.  (And it will help the people trying to use those insane HP USB
      devices.)
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      0ed8fee1
    • A
      [PATCH] UHCI: use one QH per endpoint, not per URB · dccf4a48
      Alan Stern 提交于
      This patch (as623) changes the uhci-hcd driver to make it use one QH per
      device endpoint, instead of a QH per URB as it does now.  Numerous areas
      of the code are affected by this.  For example, the distinction between
      "queued" URBs and non-"queued" URBs no longer exists; all URBs belong to
      a queue and some just happen to be at the queue's head.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      dccf4a48
  27. 05 1月, 2006 1 次提交