1. 11 7月, 2008 1 次提交
  2. 07 7月, 2008 1 次提交
  3. 04 7月, 2008 3 次提交
    • D
      USB: ohci - record data toggle after unlink · 29c8f6a7
      David Brownell 提交于
      This patch fixes a problem with OHCI where canceling bulk or
      interrupt URBs may lose track of the right data toggle.  This
      seems to be a longstanding bug, possibly dating back to the
      Linux 2.4 kernel, which stayed hidden because
      
       (a) about half the time the data toggle bit was correct;
       (b) canceling such URBs is unusual; and
       (c) the few drivers which cancel these URBs either
            [1] do it only as part of shutting down, or
            [2] have fault recovery logic, which recovers.
      
      For those transfer types, the toggle is normally written back
      into the ED when each TD is retired.  But canceling bypasses
      the mechanism used to retire TDs ... so on average, half the
      time the toggle bit will be invalid after cancelation.
      
      The fix is simple:  the toggle state of any canceled TDs are
      propagated back to the ED in the finish_unlinks function.
      
      (Issue found by leonidv11@gmail.com ...)
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Cc: Leonid <leonidv11@gmail.com>
      Cc: stable <stable@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      29c8f6a7
    • D
      USB: ehci - fix timer regression · 056761e5
      David Brownell 提交于
      This patch fixes a regression in the EHCI driver's TIMER_IO_WATCHDOG
      behavior.  The patch "USB: EHCI: add separate IAA watchdog timer" changed
      how that timer is handled, so that short timeouts on the remaining
      timer (unfortunately, overloaded) would never be used.
      
      This takes a more direct approach, reorganizing the code slightly to
      be explicit about only the I/O watchdog role now being overridable.
      It also replaces a now-obsolete comment describing older timer behavior.
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Cc: Leonid <leonidv11@gmail.com>
      Cc: stable <stable@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      056761e5
    • B
      OHCI: Fix problem if SM501 and another platform driver is selected · 3ee38d8b
      Ben Dooks 提交于
      If the SM501 and another platform driver, such as the SM501
      then we end up defining PLATFORM_DRIVER twice. This patch
      seperated the SM501 onto a seperate define of SM501_OHCI_DRIVER
      so that it can be selected without overwriting the original
      definition.
      Signed-off-by: NBen Dooks <ben-linux@fluff.org>
      Acked-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Cc: stable <stable@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      3ee38d8b
  4. 12 6月, 2008 1 次提交
  5. 09 6月, 2008 1 次提交
  6. 04 6月, 2008 1 次提交
  7. 30 5月, 2008 6 次提交
    • G
      Revert "USB: EHCI: fix performance regression" · bb7e6984
      Greg Kroah-Hartman 提交于
      This reverts commit fa38dfcc.
      
      It wasn't really a regression and David and Alan are still working
      through the issues reported.
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      bb7e6984
    • A
      USB: EHCI: fix performance regression · fa38dfcc
      Alan Stern 提交于
      This patch (as1099) fixes a performance regression in ehci-hcd.  The
      fundamental problem is that queue headers get removed from the
      schedule too quickly, since the code checks for a counter advancing
      rather than making an actual time-based check.  The latency involved
      in removing the queue header and then relinking it can severely
      degrade certain kinds of workloads.
      
      The patch replaces a simple counter with a timestamp derived from the
      controller's uframe value.  In addition, the delay for unlinking an
      idle queue header is increased from 5 ms to 10 ms; since some
      controllers (nVidia) have a latency of up to 1 ms for unlinking, this
      reduces the relative impact from 20% to 10%.
      
      Finally, a logical error left over from the IAA watchdog-timer
      conversion is corrected.  Now the driver will always either unlink an
      idle queue header or set up a timer to unlink it later.  The old code
      would sometimes fail to do either.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Cc: David Brownell <david-b@pacbell.net>
      Cc: Leonid <leonidv11@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      fa38dfcc
    • A
      USB: EHCI: fix bug in Iso scheduling · b40e43fc
      Alan Stern 提交于
      This patch (as1098) changes the way ehci-hcd schedules its periodic
      Iso transfers.  That the current scheduling code is wrong is clear on
      the face of it: Sometimes it returns -EL2NSYNC (meaning that an URB
      couldn't be scheduled because it was submitted too late), but it does
      this even when the URB_ISO_ASAP flag is set (meaning the URB should be
      scheduled as soon as possible).
      
      The new code properly implements as-soon-as-possible scheduling,
      assigning the next unexpired slot as the URB's starting point.  It
      also is more careful about checking for Iso URB completion: It doesn't
      bother to check for activity during frames that are already over,
      and it allows for the possibility that some of the URB's packets may
      have raced the hardware when they were submitted and so never got used
      (the packet status is set to -EXDEV).
      
      This fixes problems several people have experienced with USB video
      applications.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Acked-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      b40e43fc
    • A
      USB: EHCI: fix remote-wakeup regression · d1f114d1
      Alan Stern 提交于
      This patch (as1097) fixes a bug in the remote-wakeup handling in
      ehci-hcd.  The driver currently does not keep track of whether the
      change-suspend feature is enabled for each port; the feature is
      automatically reset the first time it is read.  But recent changes to
      the hub driver require that the feature be read at least twice in
      order to work properly.
      
      A bit-vector is added for storing the change-suspend feature values.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Acked-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      d1f114d1
    • 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
  8. 21 5月, 2008 1 次提交
  9. 15 5月, 2008 3 次提交
  10. 07 5月, 2008 1 次提交
  11. 03 5月, 2008 4 次提交
  12. 29 4月, 2008 3 次提交
  13. 25 4月, 2008 14 次提交
    • 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: 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
    • D
      USB: ehci: qh_completions cleanup and bugfix · 4f667627
      David Brownell 提交于
      Simplify processing of completed qtds, and correct handling of short
      reads, by removing two state variables:
      
       - "qtd_status" wasn't needed.  The current URB's status is either
         OK (-EINPROGRESS) or some fault status.  Once a fault appears,
         the queue halts and any later QTDs are immediately removed, so
         no temporary status is needed.  (Or for typical short reads,
         it's not treated as a fault, so no queue halt is needed.)
      
       - "do_status" was erroneous.  Because of how the queue is set up,
         short control reads can (and should!) be treated like full size
         reads, and cleaned up the usual way.  The status stage will be
         executed transparently, and usbcore handles the choice of whether
         to report this status as unexected.
       
      The "do_status" problem caused a rather perplexing timing-dependent
      problem with usbtest case 10.  Sometimes it would make the controller
      skip a dozen transactions while (wrongly) trying to clean up after a
      short transfer.  Fortunately, removing a dcache contention issue made
      this become trivial to reproduce (on one test rig), so enough clues
      finally presented themselves ... I think this has been around for a
      very long time, but was worsened by recent urb->status changes.
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      4f667627
    • A
      USB: don't explicitly reenable root-hub status interrupts · e8721549
      Alan Stern 提交于
      This patch (as1069b) 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>
      e8721549
    • A
      USB: OHCI: turn off RD when remote wakeup is disabled · 5f47493c
      Alan Stern 提交于
      This patch (as1068b) disables the RD interrupt flag when an OHCI root
      hub is suspended with remote wakeup disabled.  Although the spec
      clearly states that this flag permits the controller to issue an
      interrupt when a resume request from downstream is detected and not
      when a local status change occurs, some controllers mistakenly use it
      for both types of event.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      5f47493c
    • 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
    • D
      USB: ehci: qh/qtd cleanup comments · a082b5c7
      David Brownell 提交于
      Provide better comments about qh_completions() and QTD handling.
      That code can be *VERY* confusing, since it's evolved over a few
      years to cope with both hardware races and silicon quirks.
      
      Remove two unlikely() annotations that match the GCC defaults
      (and are thus pointless); add an "else" to highlight code flow.
      
      This patch doesn't change driver behavior.
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      a082b5c7
    • Y
      USB: r8a66597-hcd: Add support for SH7366 USB host · 9424ea29
      Yoshihiro Shimoda 提交于
      R8A66597 is similar to SH7366 USB 2.0 Host/Function module. It can
      support SH7366 USB host by changing several R8A66597 code.
      Signed-off-by: NYoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      9424ea29
    • Y
      USB: r8a66597-hcd: fix usb device connection timing · 29fab0cd
      Yoshihiro Shimoda 提交于
      Fix the problem that enumeration of a USB device was slow.
      Signed-off-by: NYoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      29fab0cd
    • Y
      USB: r8a66597-hcd: fix interrupt transfer interval · 6d879107
      Yoshihiro Shimoda 提交于
      This driver ignored the value of bInterval and revised the problem
      that performed interrupt transfer.
      
      ASIX USB Ethernet adapter comes to work with this host controller
      by applying this patch.
      Signed-off-by: NYoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      6d879107
    • S
      USB: ehci shutdown refactored · 21da84a8
      Sarah Sharp 提交于
      This patch refactors some shutdown code so it can be shared between
      ehci_stop() and ehci_shutdown().
      
      This also fixes a couple potential bugs:
       - ehci_shutdown() was not locking ehci->lock before halting the HC.
       - ehci_shutdown() didn't disable the watchdog and IAA timers.
       - ehci_stop() was resetting the host controller when it may have been
         running, which the EHCI spec says "may result in undefined behavior".
      
      ehci_stop() was calling port_power() to turn off the ports, which waited
      20ms after applying the port change.  The msleep was for the case where
      the HC might take 20ms to turn the ports on; since we're shutting them
      off, we can avoid the msleep and just use ehci_turn_off_ports().
      
      ehci_stop() doesn't need to clear the intr_enable register or revert
      ownership of the companion controllers to the BIOS, because the host
      controller reset should have done that.  There might be a buggy host
      controller that doesn't follow the reset rules, but for now we assume
      it's redundant code and remove it.
      
      [ A subsequent patch will cancel the timers later ... this version
      carries forward existing bugs where timers could get re-armed
      after they're canceled. ]
      Signed-off-by: NSarah Sharp <sarah.a.sharp@intel.com>
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      21da84a8
    • A
      USB: OHCI: host-controller resumes leave root hub suspended · 43bbb7e0
      Alan Stern 提交于
      Drivers in the ohci-hcd family should perform certain tasks whenever
      their controller device is resumed.  These include checking for loss
      of power during suspend, turning on port power, and enabling interrupt
      requests.
      
      Until now these jobs have been carried out when the root hub is
      resumed, not when the controller is.  Many drivers work around the
      resulting awkwardness by automatically resuming their root hub
      whenever the controller is resumed.  But this is wasteful and
      unnecessary.
      
      To simplify the situation, this patch (as1066) adds a new core
      routine, ohci_finish_controller_resume(), which can be used by all the
      OHCI-variant drivers.  They can call the new routine instead of
      resuming their root hubs.  And ohci-pci.c can call it instead of using
      its own special-purpose handler.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      43bbb7e0
    • 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