1. 14 4月, 2011 2 次提交
    • G
      USB: ehci: add workaround for Synopsys HC bug · 2f7ac6c1
      Gabor Juhos 提交于
      A Synopsys USB core used in various SoCs has a bug which might cause
      that the host controller not issuing ping.
      
      When software uses the Doorbell mechanism to remove queue heads, the
      host controller still has references to the removed queue head even
      after indicating an Interrupt on Async Advance. This happens if the last
      executed queue head's Next Link queue head is removed.
      
      Consequences of the defect:
      The Host controller fetches the removed queue head, using memory that
      would otherwise be deallocated.This results in incorrect transactions on
      both the USB and system memory. This may result in undefined behavior.
      
      Workarounds:
      
      1) If no queue head is active (no Status field's Active bit is set)
      after removing the queue heads, the software can write one of the valid
      queue head addresses to the ASYNCLISTADDR register and deallocate the
      removed queue head's memory after 2 microframes.
      
      If one or more of the queue heads is active (the Active bit is set in
      the Status field) after removing the queue heads, the software can delay
      memory deallocation after time X, where X is the time required for the
      Host Controller to go through all the queue heads once. X varies with
      the number of queue heads and the time required to process periodic
      transactions: if more periodic transactions must be performed, the Host
      Controller has less time to process asynchronous transaction processing.
      
      2) Do not use the Doorbell mechanism to remove the queue heads. Disable
      the Asynchronous Schedule Enable bit instead.
      
      The bug has been discussed on the linux-usb-devel mailing-list
      four years ago, the original thread can be found here:
      http://www.mail-archive.com/linux-usb-devel@lists.sourceforge.net/msg45345.html
      
      This patch implements the first workaround as suggested by David Brownell.
      
      The built-in USB host controller of the Atheros AR7130/AR7141/AR7161 SoCs
      requires this to work properly.
      Signed-off-by: NGabor Juhos <juhosg@openwrt.org>
      Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      2f7ac6c1
    • A
      USB: EHCI: unlink unused QHs when the controller is stopped · 94ae4976
      Alan Stern 提交于
      This patch (as1458) fixes a problem affecting ultra-reliable systems:
      When hardware failover of an EHCI controller occurs, the data
      structures do not get released correctly.  This is because the routine
      responsible for removing unused QHs from the async schedule assumes
      the controller is running properly (the frame counter is used in
      determining how long the QH has been idle) -- but when a failover
      causes the controller to be electronically disconnected from the PCI
      bus, obviously it stops running.
      
      The solution is simple: Allow scan_async() to remove a QH from the
      async schedule if it has been idle for long enough _or_ if the
      controller is stopped.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Reported-and-Tested-by: NDan Duval <dan.duval@stratus.com>
      CC: <stable@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      94ae4976
  2. 24 3月, 2011 1 次提交
    • A
      ehci-hcd: Bug fix: don't set a QH's Halt bit · b5a3b3d9
      Alan Stern 提交于
      This patch (as1453) fixes a long-standing bug in the ehci-hcd driver.
      
      There is no need to set the Halt bit in the overlay region for an
      unlinked or blocked QH.  Contrary to what the comment says, setting
      the Halt bit does not cause the QH to be patched later; that decision
      (made in qh_refresh()) depends only on whether the QH is currently
      pointing to a valid qTD.  Likewise, setting the Halt bit does not
      prevent completions from activating the QH while it is "stopped"; they
      are prevented by the fact that qh_completions() temporarily changes
      qh->qh_state to QH_STATE_COMPLETING.
      
      On the other hand, there are circumstances in which the QH will be
      reactivated _without_ being patched; this happens after an URB beyond
      the head of the queue is unlinked.  Setting the Halt bit will then
      cause the hardware to see the QH with both the Active and Halt bits
      set, an invalid combination that will prevent the queue from
      advancing and may even crash some controllers.
      
      Apparently the only reason this hasn't been reported before is that
      unlinking URBs from the middle of a running queue is quite uncommon.
      However Test 17, recently added to the usbtest driver, does exactly
      this, and it confirms the presence of the bug.
      
      In short, there is no reason to set the Halt bit for an unlinked or
      blocked QH, and there is a very good reason not to set it.  Therefore
      the code that sets it is removed.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Tested-by: NAndiry Xu <andiry.xu@amd.com>
      CC: David Brownell <david-b@pacbell.net>
      CC: <stable@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      b5a3b3d9
  3. 05 2月, 2011 1 次提交
  4. 11 8月, 2010 1 次提交
    • A
      USB: convert usb_hcd bitfields into atomic flags · 541c7d43
      Alan Stern 提交于
      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: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      541c7d43
  5. 21 5月, 2010 1 次提交
  6. 21 1月, 2010 1 次提交
    • A
      USB: EHCI: fix handling of unusual interrupt intervals · 1b9a38bf
      Alan Stern 提交于
      This patch (as1320) fixes two problems related to interrupt-URB
      scheduling in ehci-hcd.
      
      	URBs with an interval of 2 or 4 microframes aren't handled.
      	For the time being, the patch reduces to interval to 1 uframe.
      
      	URBs are constrained to have an interval no larger than 1024
      	frames by usb_submit_urb().  But some EHCI controllers allow
      	use of a schedule as short as 256 frames; for these
      	controllers we may have to decrease the interval to the
      	actual schedule length.
      
      The second problem isn't very significant since few devices expose
      interrupt endpoints with an interval larger than 256 frames.  But the
      first problem is critical; it will prevent the kernel from working
      with devices having interrupt intervals of 2 or 4 uframes.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Cc: stable <stable@kernel.org>
      Tested-by: NGlynn Farrow <farrowg@sg.ibm.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      1b9a38bf
  7. 12 12月, 2009 1 次提交
  8. 01 12月, 2009 1 次提交
    • A
      USB: EHCI: don't send Clear-TT-Buffer following a STALL · c2f6595f
      Alan Stern 提交于
      This patch (as1304) fixes a regression in ehci-hcd.  Evidently some
      hubs don't handle Clear-TT-Buffer requests correctly, so we should
      avoid sending them when they don't appear to be absolutely necessary.
      The reported symptom is that output on a downstream audio device cuts
      out because the hub stops relaying isochronous packets.
      
      The patch prevents Clear-TT-Buffer requests from being sent following
      a STALL handshake.  In theory a STALL indicates either that the
      downstream device sent a STALL or that no matching TT buffer could be
      found.  In either case, the transfer is completed and the TT buffer
      does not remain busy, so it doesn't need to be cleared.
      
      Also, the patch fixes a minor flaw in the code that actually sends the
      Clear-TT-Buffer requests.  Although the pipe direction isn't really
      used for control transfers, it should be a Send rather than a Receive.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Reported-by: NJavier Kohen <jkohen@users.sourceforge.net>
      CC: David Brownell <david-b@pacbell.net>
      Cc: stable <stable@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      c2f6595f
  9. 23 9月, 2009 3 次提交
    • A
      USB: EHCI: change deschedule logic for interrupt QHs · a448c9d8
      Alan Stern 提交于
      This patch (as1281) changes the way ehci-hcd deschedules interrupt
      QHs, copying the approach used for async QHs.  The caller is no longer
      responsible for rescheduling the QH if its queue is non-empty; instead
      the reschedule is done directly by intr_deschedule(), after calling
      qh_completions().  This is exactly the same as how end_unlink_async()
      works.
      
      ehci_urb_dequeue() and intr_deschedule() now correctly handle the case
      where they are called while another interrupt URB for the same QH is
      being given back.  This was a surprisingly large blind spot.  And
      scan_periodic() now respects the new needs_rescan flag.
      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>
      a448c9d8
    • A
      USB: EHCI: rescan the queue after an unlink · 3a44494e
      Alan Stern 提交于
      This patch (as1280) fixes an obscure bug in ehci-hcd's dequeuing logic
      for async URBs.  If a later URB is unlinked and the completion
      routine unlinks an earlier URB, then the earlier URB won't be given
      back in a timely manner because the endpoint queue isn't rescanned as
      it should be.
      
      Similar bugs occur if an endpoint is reset or a halt is cleared while
      a completion routine is running, because the subroutines don't test
      for the COMPLETING state.
      
      All these problems are solved by adding a new needs_rescan flag to the
      ehci_qh structure.  If the flag is set while scanning through an idle
      QH, the scan will be repeated.  If the QH isn't idle then an unlink
      cycle will be initiated, and the proper action will be taken when it
      becomes idle.
      
      Also, an unnecessary test is removed from qh_link_async(): That
      routine is never called if the QH's state isn't IDLE.
      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>
      3a44494e
    • A
      USB: EHCI: split ehci_qh into hw and sw parts · 3807e26d
      Alek Du 提交于
      The ehci_qh structure merged hw and sw together which is not good:
      1. More and more items are being added into ehci_qh, the ehci_qh software
         part are unnecessary to be allocated in DMA qh_pool.
      2. If HCD has local SRAM, the sw part will consume it too, and it won't
         bring any benefit.
      3. For non-cache-coherence system, the entire ehci_qh is uncachable, actually
         we only need the hw part to be uncacheable. Spliting them will let the sw
         part to be cacheable.
      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>
      3807e26d
  10. 08 8月, 2009 2 次提交
  11. 13 7月, 2009 4 次提交
    • A
      USB: EHCI: check for STALL before other errors · ba516de3
      Alan Stern 提交于
      This patch (as1257) revises the way ehci-hcd detects STALLs.  The
      logic is a little peculiar because there's no hardware status bit
      specifically meant to indicate a STALL.  You just have to guess that a
      STALL was received if the BABBLE bit (which is fatal) isn't set and
      the transfer stopped before all its retries were used up.
      
      The existing code doesn't do this properly, because it tests for MMF
      (Missed MicroFrame) and DBE (Data Buffer Error) before testing the
      retry counter.  Thus, if a transaction gets either MMF or DBE the
      corresponding flag is set and the transaction is retried.  If the
      second attempt receives a STALL then -EPIPE is the correct return
      value.  But the existing code would see the MMF or DBE flag instead
      and return -EPROTO, -ENOSR, or -ECOMM.
      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>
      ba516de3
    • A
      USB: EHCI: use the new clear_tt_buffer interface · 914b7012
      Alan Stern 提交于
      This patch (as1256) changes ehci-hcd and all the other drivers in the
      EHCI family to make use of the new clear_tt_buffer callbacks.  When a
      Clear-TT-Buffer request is in progress for a QH, the QH is not allowed
      to be linked into the async schedule until the request is finished.
      At that time, if there are any URBs queued for the QH, it is linked
      into the async schedule.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Cc: stable <stable@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      914b7012
    • A
      USB: fix the clear_tt_buffer interface · cb88a1b8
      Alan Stern 提交于
      This patch (as1255) updates the interface for calling
      usb_hub_clear_tt_buffer().  Even the name of the function is changed!
      
      When an async URB (i.e., Control or Bulk) going through a high-speed
      hub to a non-high-speed device is cancelled or fails, the hub's
      Transaction Translator buffer may be left busy still trying to
      complete the transaction.  The buffer has to be cleared; that's what
      usb_hub_clear_tt_buffer() does.
      
      It isn't safe to send any more URBs to the same endpoint until the TT
      buffer is fully clear.  Therefore the HCD needs to be told when the
      Clear-TT-Buffer request has finished.  This patch adds a callback
      method to struct hc_driver for that purpose, and makes the hub driver
      invoke the callback at the proper time.
      
      The patch also changes a couple of names; "hub_tt_kevent" and
      "tt.kevent" now look rather antiquated.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Cc: stable <stable@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      cb88a1b8
    • A
      USB: EHCI: update toggle state for linked QHs · a455212d
      Alan Stern 提交于
      This is an update to the "usb-ehci-update-toggle-state-for-linked-qhs"
      patch.  Since an HCD's endpoint_reset method can be called in
      interrupt context, it mustn't assume that interrupts are enabled or
      that it can sleep.
      
      So we revert to the original way of refreshing QHs' toggle bits.  Now
      the endpoint_reset method merely clears the toggle flag in the device
      structure (as was done before) and starts an async QH unlink.  When the
      QH is linked again, after the unlink finishes and an URB is queued,
      the qh_refresh() routine will update the QH's toggle bit.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Tested-by: NDavid <david@unsolicited.net>
      CC: David Brownell <david-b@pacbell.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
      a455212d
  12. 16 6月, 2009 1 次提交
    • 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
  13. 25 3月, 2009 2 次提交
    • R
      USB: fix ehci printk formats · d0626808
      Randy Dunlap 提交于
      Fix ehci printk formats:
      
      drivers/usb/host/ehci-q.c:351: warning: format '%d' expects type 'int', but argument 4 has type 'size_t'
      drivers/usb/host/ehci-q.c:351: warning: format '%d' expects type 'int', but argument 5 has type 'size_t'
      Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      d0626808
    • A
      USB: EHCI: add software retry for transaction errors · a2c2706e
      Alan Stern 提交于
      This patch (as1204) adds a software retry mechanism to ehci-hcd.  It
      gets invoked when the driver encounters transaction errors on an
      asynchronous endpoint.  On many systems, hardware deficiencies cause
      such errors to occur if one device is unplugged while the host is
      communicating with another device.  With the patch, the failed
      transactions are retried and generally succeed the second or third
      time through.
      
      This is based on code originally written by Koichiro Saito.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Tested by: Koichiro Saito <Saito.Koichiro@adniss.jp>
      CC: David Brownell <david-b@pacbell.net>
      Cc: stable <stable@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      a2c2706e
  14. 18 3月, 2009 1 次提交
  15. 07 8月, 2008 1 次提交
  16. 22 7月, 2008 1 次提交
    • D
      USB: ehci-hcd unlink speedups · b9638011
      David Brownell 提交于
      This patch fixes some performance bugs observed with some workloads
      when unlinking EHCI queue header (QH) descriptors from the async ring
      (control/bulk schedule).
      
      The mechanism intended to defer unlinking an empty QH (so there is no
      penalty in common cases where it's quickly reused) was not working as
      intended.  Sometimes the unlink was scheduled:
      
       - too quickly ... which can be a *strong* negative effect, since
         that QH becomes unavailable for immediate re-use;
      
       - too slowly ... wasting DMA cycles, usually a minor issue except
         for increased bus contention and power usage;
      
      Plus there was an extreme case of "too slowly":  a logical error in the
      IAA watchdog-timer conversion meant that sometimes the unlink never
      got scheduled.
      
      The fix replaces a simple counter with a timestamp derived from the
      controller's 8 KHz microframe counter, and adjusts the timer usage
      for some issues associated with HZ being less than 8K.
      
      (Based on a patch originally by Alan Stern, and good troubleshooting
      from  Leonid.)
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Cc: Leonid <leonidv11@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      b9638011
  17. 30 5月, 2008 2 次提交
    • 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
  18. 29 4月, 2008 1 次提交
  19. 25 4月, 2008 4 次提交
    • 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
    • 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
    • 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
    • D
      USB: ehci tolerates some buggy devices · caa9ef67
      David Brownell 提交于
      This teaches EHCI how to to work around bugs in certain high speed
      devices, by accomodating "bulk" packets that exceed the 512 byte
      constant value required by the USB 2.0 specification.  (Have a
      look at section 5.8.3, paragraphs 1 and 3.)
      
      It also makes the descriptor parsing code warn when it encounters
      such bugs.  (We've had reports of maybe two or three such devices,
      all pretty recent.)
      
      Such devices are nonconformant.  The proper fix is have the vendors
      of those devices do the simple, obvious, and correct thing ... which
      will let them be used with USB hosts that don't have workarounds for
      this particular vendor bug.  But unless/until they do, we can at least
      have one of the high speed HCDs work with such buggy devices.
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      caa9ef67
  20. 05 3月, 2008 1 次提交
  21. 02 2月, 2008 2 次提交
  22. 13 10月, 2007 5 次提交
    • A
      USB: Eliminate urb->status usage! · 4a00027d
      Alan Stern 提交于
      This patch (as979) removes the last vestiges of urb->status from the
      host controller drivers and the root-hub emulator.  Now the field
      doesn't get set until just before the URB's completion routine is
      called.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      CC: David Brownell <david-b@pacbell.net>
      CC: Olav Kongas <ok@artecdesign.ee>
      CC: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
      CC: Tony Olech <tony.olech@elandigitalsystems.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      4a00027d
    • A
      USB: reorganize urb->status use in ehci-hcd · 14c04c0f
      Alan Stern 提交于
      This patch (as974) reorganizes the way ehci-hcd sets urb->status.  It
      now keeps the information in a local variable until the last moment.
      
      The patch also simplifies the handling of -EREMOTEIO, since the only
      use of that code is to set the do_status flag.
      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>
      14c04c0f
    • A
      USB: add urb->unlinked field · eb231054
      Alan Stern 提交于
      This patch (as970) adds a new urb->unlinked field, which is used to
      store the status of unlinked URBs since we can't use urb->status for
      that purpose any more.  To help simplify the HCDs, usbcore will check
      urb->unlinked before calling the completion handler; if the value is
      set it will automatically override the status reported by the HCD.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      CC: David Brownell <david-b@pacbell.net>
      CC: Olav Kongas <ok@artecdesign.ee>
      CC: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
      CC: Tony Olech <tony.olech@elandigitalsystems.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      eb231054
    • A
      USB: centralize -EREMOTEIO handling · b0d9efba
      Alan Stern 提交于
      This patch (as969) continues the ongoing changes to the way HCDs
      report URB statuses.  The programming interface has been simplified by
      making usbcore responsible for clearing urb->hcpriv and for setting
      -EREMOTEIO status when an URB with the URB_SHORT_NOT_OK flag ends up
      as a short transfer.
      
      By moving the work out of the HCDs, this removes a fair amount of
      repeated code.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      CC: David Brownell <david-b@pacbell.net>
      CC: Olav Kongas <ok@artecdesign.ee>
      CC: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
      CC: Tony Olech <tony.olech@elandigitalsystems.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      b0d9efba
    • A
      USB: make HCDs responsible for managing endpoint queues · e9df41c5
      Alan Stern 提交于
      This patch (as954) implements a suggestion of David Brownell's.  Now
      the host controller drivers are responsible for linking and unlinking
      URBs to/from their endpoint queues.  This eliminates the possiblity of
      strange situations where usbcore thinks an URB is linked but the HCD
      thinks it isn't.  It also means HCDs no longer have to check for URBs
      being dequeued before they were fully enqueued.
      
      In addition to the core changes, this requires changing every host
      controller driver and the root-hub URB handler.  For the most part the
      required changes are fairly small; drivers have to call
      usb_hcd_link_urb_to_ep() in their urb_enqueue method,
      usb_hcd_check_unlink_urb() in their urb_dequeue method, and
      usb_hcd_unlink_urb_from_ep() before giving URBs back.  A few HCDs make
      matters more complicated by the way they split up the flow of control.
      
      In addition some method interfaces get changed.  The endpoint argument
      for urb_enqueue is now redundant so it is removed.  The unlink status
      is required by usb_hcd_check_unlink_urb(), so it has been added to
      urb_dequeue.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      CC: David Brownell <david-b@pacbell.net>
      CC: Olav Kongas <ok@artecdesign.ee>
      CC: Tony Olech <tony.olech@elandigitalsystems.com>
      CC: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      e9df41c5
  23. 21 8月, 2007 1 次提交
    • L
      Revert "USB: EHCI cpufreq fix" · 8eb891fc
      Linus Torvalds 提交于
      This reverts commit 196705c9.  It was
      reported to cause a regression by Daniel Exner, and Arjan van de Ven
      points out that we actually already have infrastructure in place for
      setting limits on acceptable DMA latency that would be the much more
      correct fix for the problem with some Broadcom EHCI controllers.
      
      Fixed up trivial conflicts due to the changes to support big-endian host
      controller descriptors in drivers/usb/host/{ehci-sched.c,ehci.h}.
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      8eb891fc