1. 25 6月, 2019 1 次提交
    • M
      usb: xhci: Don't try to recover an endpoint if port is in error state. · 17027034
      Mathias Nyman 提交于
      commit b8c3b718087bf7c3c8e388eb1f72ac1108a4926e upstream.
      
      A USB3 device needs to be reset and re-enumarated if the port it
      connects to goes to a error state, with link state inactive.
      
      There is no use in trying to recover failed transactions by resetting
      endpoints at this stage. Tests show that in rare cases, after multiple
      endpoint resets of a roothub port the whole host controller might stop
      completely.
      
      Several retries to recover from transaction error can happen as
      it can take a long time before the hub thread discovers the USB3
      port error and inactive link.
      
      We can't reliably detect the port error from slot or endpoint context
      due to a limitation in xhci, see xhci specs section 4.8.3:
      "There are several cases where the EP State field in the Output
      Endpoint Context may not reflect the current state of an endpoint"
      and
      "Software should maintain an accurate value for EP State, by tracking it
      with an internal variable that is driven by Events and Doorbell accesses"
      
      Same appears to be true for slot state.
      
      set a flag to the corresponding slot if a USB3 roothub port link goes
      inactive to prevent both queueing new URBs and resetting endpoints.
      Reported-by: NRapolu Chiranjeevi <chiranjeevi.rapolu@intel.com>
      Tested-by: NRapolu Chiranjeevi <chiranjeevi.rapolu@intel.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NMathias Nyman <mathias.nyman@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      17027034
  2. 09 6月, 2019 2 次提交
  3. 03 4月, 2019 1 次提交
  4. 01 12月, 2018 4 次提交
  5. 14 11月, 2018 1 次提交
  6. 25 5月, 2018 4 次提交
  7. 16 3月, 2018 4 次提交
  8. 09 12月, 2017 5 次提交
  9. 01 12月, 2017 1 次提交
  10. 07 11月, 2017 1 次提交
    • G
      USB: host: xhci: Remove redundant license text · 9ed64195
      Greg Kroah-Hartman 提交于
      Now that the SPDX tag is in all USB files, that identifies the license
      in a specific and legally-defined manner.  So the extra GPL text wording
      can be removed as it is no longer needed at all.
      
      This is done on a quest to remove the 700+ different ways that files in
      the kernel describe the GPL license text.  And there's unneeded stuff
      like the address (sometimes incorrect) for the FSF which is never
      needed.
      
      No copyright headers or other non-license-description text was removed.
      
      Cc: Matthias Brugger <matthias.bgg@gmail.com>
      Cc: Thierry Reding <thierry.reding@gmail.com>
      Cc: Jonathan Hunter <jonathanh@nvidia.com>
      Acked-by: NMathias Nyman <mathias.nyman@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      9ed64195
  11. 04 11月, 2017 1 次提交
  12. 17 10月, 2017 3 次提交
  13. 05 10月, 2017 2 次提交
    • A
      xhci: allow TRACE to work with EVENT ring dequeue · 49d5b05e
      Adam Wallis 提交于
      inc_deq() currently bails earlier for EVENT rings than the common return
      point of the function, due to the fact that EVENT rings do not have
      link TRBs. The unfortunate side effect of this is that the very useful
      trace_xhci_inc_deq() function is not called/usable for EVENT ring
      debug.
      
      This patch provides a refactor by removing the multiple return exit
      points into a single return which additionally allows for all rings to
      use the trace function.
      Signed-off-by: NAdam Wallis <awallis@codeaurora.org>
      Signed-off-by: NMathias Nyman <mathias.nyman@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      49d5b05e
    • A
      usb: xhci: reduce device initiated resume time variance. · 0914ea66
      Anshuman Gupta 提交于
      This patch will improve the variable auto-resume latency of an usb-port.
      
      The attempt to sync the start of root hub polling with resume time
      signaling finish was ruined by a later request to start immediate
      root hub polling.
      
      When xhci gets a port status change event interrupt due to PORT_PLC
      (port link state transition), linux Host controller driver drives the
      resume signalling on the bus for the amount of time defined by
      USB_REUME_TIMEOUT(40ms) macro.
      
      This 40ms delay for resume signalling is in acceptable limit, but
      it get worse when xhci goes for polling mode in order to detect other
      events on its ports and modify rh_timer timer with a variable time out of
      1ms to (HZ/4)ms.
      
      drivers/usb/core/hcd.c line 799
      mod_timer (&hcd->rh_timer, (jiffies/(HZ/4) + 1) * (HZ/4)).
      
      Due to above variable timeout usb auto-resume latency varies from
      40ms to ~300ms.
      
      Log Snippet:
      ~128ms latency
      [   53.112049] hub 1-0:1.0: state 7 ports 12 chg 0000 evt 0000
      [   53.229200] hub 1-0:1.0: state 7 ports 12 chg 0000 evt 0004
      [   53.240177] usb 1-2: usb wakeup-resume
      [   53.240195] usb 1-2: finish resume
      [   53.240357] usb usb1-port2: resume, status 0
      -----------------------------------------------------------------
      ~300ms latency
      [   59.946620] hub 1-0:1.0: state 7 ports 12 chg 0000 evt 0000
      [   59.979341] hub 1-0:1.0: state 7 ports 12 chg 0000 evt 0000
      [   60.229342] hub 1-0:1.0: state 7 ports 12 chg 0000 evt 0004
      [   60.251321] usb 1-2: usb wakeup-resume
      [   60.251335] usb 1-2: finish resume
      [   60.251539] usb usb1-port2: resume, status 0
      
      This variable resume latency can be optimized, as in case of PORT_PLC
      change event rh_timer has already been modified with USB_RESUME_TIMEOUT
      (40ms) delay,leaving the rest to GetPortStatus and started polling for
      root hub status (invoking usb_hcd_poll_rh_status).
      We can avoid polling as we have already modified rh_timer with
      delay of 40ms.
      
      This patch set the HCD_FLAG_POLL_RH to hcd->flags after modification of
      rh_timer, and avoids polling of root hub status. so rh_timer can fire
      after 40ms and usb device auto-resuem latency will be around 40ms.
      
      [topic and first two senctences of commit message changed -Mathias]
      Signed-off-by: NAnshuman Gupta <anshuman.gupta@intel.com>
      Signed-off-by: NMathias Nyman <mathias.nyman@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      0914ea66
  14. 17 8月, 2017 2 次提交
  15. 20 7月, 2017 1 次提交
  16. 16 6月, 2017 6 次提交
  17. 03 6月, 2017 1 次提交