1. 01 12月, 2010 1 次提交
  2. 17 11月, 2010 1 次提交
    • A
      USB: EHCI: AMD periodic frame list table quirk · 3d091a6f
      Andiry Xu 提交于
      On AMD SB700/SB800/Hudson-2/3 platforms, USB EHCI controller may read/write
      to memory space not allocated to USB controller if there is longer than
      normal latency on DMA read encountered. In this condition the exposure will
      be encountered only if the driver has following format of Periodic Frame
      List link pointer structure:
      
      For any idle periodic schedule, the Frame List link pointers that have the
      T-bit set to 1 intending to terminate the use of frame list link pointer
      as a physical memory pointer.
      
      Idle periodic schedule Frame List Link pointer shoule be in the following
      format to avoid the issue:
      
      Frame list link pointer should be always contains a valid pointer to a
      inactive QHead with T-bit set to 0.
      Signed-off-by: NAndiry Xu <andiry.xu@amd.com>
      Acked-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      3d091a6f
  3. 21 9月, 2010 1 次提交
  4. 11 8月, 2010 3 次提交
  5. 21 5月, 2010 2 次提交
  6. 01 12月, 2009 1 次提交
  7. 23 9月, 2009 2 次提交
    • J
      USB: ehci-dbgp,ehci: Allow early or late use of the dbgp device · 8d053c79
      Jason Wessel 提交于
      If the EHCI debug port is initialized and in use, the EHCI host
      controller driver must follow two rules.
      
      1) If the EHCI host driver issues a controller reset, the debug
         controller driver re-initialization must get called after the reset
         is completed.
      
      2) The EHCI host driver should ignore any requests to the physical
         EHCI debug port when the EHCI debug port is in use.
      
      The code to check for the debug port was moved from ehci_pci_reinit()
      to ehci_pci_setup because it must get called prior to ehci_reset()
      which will clear the debug port registers.
      Signed-off-by: NJason Wessel <jason.wessel@windriver.com>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Cc: dbrownell@users.sourceforge.net
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      8d053c79
    • A
      USB: EHCI: add need_io_watchdog flag to ehci_hcd · 403dbd36
      Alek Du 提交于
      Basically the io watchdog is only useful for those quirk HCDs. For most
      good ones, it only brings unnecessary wakeups.  At least, I know the
      Intel EHCI HCDs should turn off the flag.
      Signed-off-by: NAlek Du <alek.du@intel.com>
      Cc: David Brownell <dbrownell@users.sourceforge.net>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      403dbd36
  8. 21 9月, 2009 1 次提交
  9. 13 7月, 2009 1 次提交
  10. 16 6月, 2009 3 次提交
    • A
      USB: EHCI: update toggle state for linked QHs · b18ffd49
      Alan Stern 提交于
      This patch (as1245) fixes a bug in ehci-hcd.  When an URB is queued
      for an endpoint whose QH is already in the LINKED state, the QH
      doesn't get refreshed.  As a result, if usb_clear_halt() was called
      during the time that the QH was linked but idle, the data toggle value
      in the QH doesn't get reset.
      
      The symptom is that after a clear_halt, data gets lost and transfers
      time out.  This problem is starting to show up now because the
      "ehci-hcd unlink speedups" patch causes QHs with no queued URBs to
      remain linked for a suitable time.
      
      The patch utilizes the new endpoint_reset mechanism to fix the
      problem.  When an endpoint is reset, the new method forcibly unlinks
      the QH (if necessary) and safely updates the toggle value.  This
      allows qh_update() to be simplified and avoids using usb_device's
      toggle bits in a rather unintuitive way.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      CC: David Brownell <david-b@pacbell.net>
      Tested-by: NDavid <david@unsolicited.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      b18ffd49
    • A
      USB: new flag for resume-from-hibernation · 6ec4beb5
      Alan Stern 提交于
      This patch (as1237) changes the way the PCI host controller drivers
      avoid retaining bogus hardware states during resume-from-hibernation.
      Previously we had reset the hardware as part of preparing to reinstate
      the memory image.  But we can do better now with the new PM framework,
      since we know exactly which resume operations are from hibernation.
      
      The pci_resume method is changed to accept a flag indicating whether
      the system is resuming from hibernation.  When this flag is set, the
      drivers will reset the hardware to get rid of any existing state.
      
      Similarly, the pci_suspend method is changed to remove the
      pm_message_t argument.  It's no longer needed, since no special action
      has to be taken when preparing to reinstate the memory image.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Acked-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      6ec4beb5
    • A
      USB: move PCI host controllers to new PM framework · abb30641
      Alan Stern 提交于
      This patch (as1236) converts the USB PCI power management routines
      over to the new PM framework.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Acked-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      abb30641
  11. 07 4月, 2009 1 次提交
  12. 18 2月, 2009 1 次提交
  13. 28 1月, 2009 2 次提交
    • 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
    • A
      USB: don't enable wakeup by default for PCI host controllers · bcca06ef
      Alan Stern 提交于
      This patch (as1199) changes the initial wakeup settings for PCI USB
      host controllers.  The controllers are marked as capable of waking the
      system, but wakeup is not enabled by default.
      
      It turns out that enabling wakeup for USB host controllers has a lot
      of bad consequences.  As the simplest example, if a USB mouse or
      keyboard is unplugged immediately after the computer is put to sleep,
      the unplug will cause the system to wake back up again!  We are better
      off marking them as wakeup-capable and leaving wakeup disabled.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Reported-by: NRafael J. Wysocki <rjw@sisk.pl>
      CC: David Brownell <david-b@pacbell.net>
      Cc: stable <stable@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      bcca06ef
  14. 08 1月, 2009 2 次提交
    • A
      USB: automatically enable wakeup for PCI host controllers · 6fd9086a
      Alan Stern 提交于
      This patch (as1193b) enables wakeup during initialization for all PCI
      host controllers, and it removes some code (and comments!) that are no
      longer needed now that the PCI core automatically initializes wakeup
      settings for all new devices.
      
      The idea is that the bus should initialize wakeup, and the bus glue
      or controller driver should enable it.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      6fd9086a
    • 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
  15. 01 12月, 2008 1 次提交
  16. 20 11月, 2008 1 次提交
  17. 30 5月, 2008 2 次提交
    • A
      USB: EHCI: suppress unwanted error messages · 3a31155c
      Alan Stern 提交于
      This patch (as1096) fixes an annoying problem: When a full-speed or
      low-speed device is plugged into an EHCI controller, it fails to
      enumerate at high speed and then is handed over to the companion
      controller.  But usbcore logs a misleading and unwanted error message
      when the high-speed enumeration fails.
      
      The patch adds a new HCD method, port_handed_over, which asks whether
      a port has been handed over to a companion controller.  If it has, the
      error message is suppressed.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      CC: David Brownell <david-b@pacbell.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      3a31155c
    • A
      USB: EHCI: fix up root-hub TT mess · a8e51775
      Alan Stern 提交于
      This patch (as1095) cleans up the HCD glue and several of the EHCI
      bus-glue files.  The ehci->is_tdi_rh_tt flag is redundant, since it
      means the same thing as the hcd->has_tt flag, so it is removed and the
      other flag used in its place.
      
      Some of the bus-glue files didn't get the relinquish_port method added
      to their hc_driver structures.  Although that routine currently
      doesn't do anything for controllers with an integrated TT, in the
      future it might.  So the patch adds it where it is missing.
      
      Lastly, some of the bus-glue files have erroneous entries for their
      hc_driver's suspend and resume methods.  These method pointers are
      specific to PCI and shouldn't be used otherwise.
      
      (The patch also includes an invisible whitespace fix.)
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Acked-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      a8e51775
  18. 25 4月, 2008 5 次提交
    • A
      USB: fix compile problems in ehci-hcd · aff6d18f
      Alan Stern 提交于
      This patch (as1072) fixes some recently-introduced compile problems
      that show up in ehci-hcd when CONFIG_PM is turned off.
      
      	PORT_WAKE_BITS needs to be defined always.
      
      	ehci_port_power() is called during initialization by all the
      	EHCI variants other than the PCI version, in which it is
      	"defined but not used".  So add a call to it.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      aff6d18f
    • 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
    • A
      USB: root hubs don't lie about their number of TTs · 7329e211
      Alan Stern 提交于
      Currently EHCI root hubs enumerate with a bDeviceProtocol code
      indicating that they possess a Transaction Translator.  However the
      vast majority of controllers do not; they rely on a companion
      controller to handle full- and low-speed communications.  This patch
      (as1064) changes the root-hub device descriptor to match the actual
      situation.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      7329e211
    • A
      USB: EHCI: carry out port handover during each root-hub resume · 3bb1af52
      Alan Stern 提交于
      This patch (as1044) causes EHCI port handover for non-high-speed
      devices to occur during every root-hub resume, not just in cases where
      the controller lost power or was reset.  This is necessary because:
      
      	When some machines go into suspend, they remove power from
      	on-board USB devices while retaining suspend current for USB
      	controllers.
      
      	The user might well unplug a USB device while the system is
      	suspended and then plug it back in before resuming.
      
      A corresponding change is made to the core resume routine; now
      high-speed root hubs will always be resumed when the system wakes up,
      even if they were suspended before the system went to sleep.  If this
      weren't done then EHCI port handover wouldn't work, since it is called
      when the EHCI root hub is resumed.
      
      Finally, a comment is added to the hub driver explaining the khubd has
      to be freezable; if it weren't frozen then it could interfere with
      port handover.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      3bb1af52
  19. 25 3月, 2008 1 次提交
  20. 02 2月, 2008 2 次提交
  21. 13 10月, 2007 1 次提交
  22. 13 7月, 2007 1 次提交
    • A
      USB: EHCI, OHCI: handover changes · 383975d7
      Alan Stern 提交于
      This patch (as887) changes the way ehci-hcd and ohci-hcd handle a loss
      of VBUS power during suspend.  In order for the USB-persist facility
      to work correctly, it is necessary for low- and full-speed devices
      attached to a high-speed port to be handed back to the companion
      controller during resume processing.
      
      This entails three changes: adding code to ehci-hcd to perform the
      handover, removing code from ohci-hcd to turn off ports during
      root-hub reinit, and adding code to ohci-hcd to turn on ports during
      PCI controller resume.  (Other bus glue resume methods for platforms
      supporting high-speed controllers would need a similar change, if any
      existed.)
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      383975d7
  23. 12 7月, 2007 1 次提交
    • A
      PCI: Change all drivers to use pci_device->revision · 44c10138
      Auke Kok 提交于
      Instead of all drivers reading pci config space to get the revision
      ID, they can now use the pci_device->revision member.
      
      This exposes some issues where drivers where reading a word or a dword
      for the revision number, and adding useless error-handling around the
      read. Some drivers even just read it for no purpose of all.
      
      In devices where the revision ID is being copied over and used in what
      appears to be the equivalent of hotpath, I have left the copy code
      and the cached copy as not to influence the driver's performance.
      
      Compile tested with make all{yes,mod}config on x86_64 and i386.
      Signed-off-by: NAuke Kok <auke-jan.h.kok@intel.com>
      Acked-by: NDave Jones <davej@redhat.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      44c10138
  24. 08 2月, 2007 1 次提交
  25. 02 12月, 2006 1 次提交
    • A
      EHCI: Fix root-hub and port suspend/resume problems · 8c03356a
      Alan Stern 提交于
      This patch (as738b) fixes numerous problems in the controller/root-hub
      suspend/resume/remote-wakeup support in ehci-hcd:
      
      	The bus_resume() routine should wake up only the ports that
      	were suspended by bus_suspend().  Ports that were already
      	suspended should remain that way.
      
      	The interrupt mask is used to detect loss of power in the
      	bus_resume() routine (if the mask is 0 then power was lost).
      	However bus_suspend() always sets the mask to 0.  Instead the
      	mask should retain its normal value, with port-change-detect
      	interrupts disabled if remote wakeup is turned off.
      
      	The interrupt mask should be reset to its correct value at the
      	end of bus_resume() regardless of whether power was lost.
      
      	bus_resume() reinitializes the operational registers if power
      	was lost.  However those registers are not in the aux power
      	well, hence they can lose their values whenever the controller
      	is put into D3.  They should always be reinitialized.
      
      	When a port-change interrupt occurs and the root hub is
      	suspended, the interrupt handler should request a root-hub
      	resume instead of starting up the controller all by itself.
      
      	There's no need for the interrupt handler to request a
      	root-hub resume every time a suspended port sends a
      	remote-wakeup request.
      
      	The pci_resume() method doesn't need to check for connected
      	ports when deciding whether or not to reset the controller.
      	It can make that decision based on whether Vaux power was
      	maintained.
      
      	Even when the controller does not need to be reset,
      	pci_resume() must undo the effect of pci_suspend() by
      	re-enabling the interrupt mask.
      
      	If power was lost, pci_resume() must not call ehci_run().
      	At this point the root hub is still supposed to be suspended,
      	not running.  It's enough to rewrite the command register and
      	set the configured_flag.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      8c03356a
  26. 18 10月, 2006 1 次提交