1. 14 9月, 2021 1 次提交
  2. 26 8月, 2021 2 次提交
  3. 21 6月, 2021 1 次提交
  4. 17 6月, 2021 1 次提交
  5. 13 5月, 2021 1 次提交
  6. 06 4月, 2021 2 次提交
  7. 23 3月, 2021 1 次提交
  8. 11 3月, 2021 2 次提交
  9. 10 3月, 2021 1 次提交
  10. 29 1月, 2021 1 次提交
    • M
      xhci: split handling halted endpoints into two steps · 674f8438
      Mathias Nyman 提交于
      Don't queue both a reset endpoint command and a
      set TR deq command at once when handling a halted endpoint.
      
      split this into two steps.
      Initially only queue a reset endpoint command, and then if needed queue a
      set TR deq command in the reset endpoint handler.
      
      Note: This removes the RESET_EP_QUIRK handling which was added in
      commit ac9d8fe7 ("USB: xhci: Add quirk for Fresco Logic xHCI hardware.")
      
      This quirk was added in 2009 for prototype xHCI hardware meant for
      evaluation purposes only, and should not reach consumers.
      This hardware could not handle two commands queued at once, and had
      bad data in the output context after a reset endpoint command.
      
      After this patch two command are no longer queued at once, so that
      part is solved  in this rewrite, but the workaround for bad data in the
      output context solved by issuing an extra configure endpoint command is
      bluntly removed.
      
      Adding this workaround to the new rewrite just adds complexity, and I
      think it's time to let this quirk go.
      Print a debug message instead.
      Signed-off-by: NMathias Nyman <mathias.nyman@linux.intel.com>
      Link: https://lore.kernel.org/r/20210129130044.206855-22-mathias.nyman@linux.intel.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      674f8438
  11. 26 1月, 2021 1 次提交
  12. 28 12月, 2020 1 次提交
  13. 09 12月, 2020 1 次提交
    • T
      usb: xhci: Use temporary buffer to consolidate SG · 2017a1e5
      Tejas Joglekar 提交于
      The Synopsys xHC has an internal TRB cache of size TRB_CACHE_SIZE for
      each endpoint. The default value for TRB_CACHE_SIZE is 16 for SS and 8
      for HS. The controller loads and updates the TRB cache from the transfer
      ring in system memory whenever the driver issues a start transfer or
      update transfer command.
      
      For chained TRBs, the Synopsys xHC requires that the total amount of
      bytes for all TRBs loaded in the TRB cache be greater than or equal to 1
      MPS. Or the chain ends within the TRB cache (with a last TRB).
      
      If this requirement is not met, the controller will not be able to send
      or receive a packet and it will hang causing a driver timeout and error.
      
      This can be a problem if a class driver queues SG requests with many
      small-buffer entries. The XHCI driver will create a chained TRB for each
      entry which may trigger this issue.
      
      This patch adds logic to the XHCI driver to detect and prevent this from
      happening.
      
      For every (TRB_CACHE_SIZE - 2), we check the total buffer size of
      the SG list and if the last window of (TRB_CACHE_SIZE - 2) SG list length
      and we don't make up at least 1 MPS, we create a temporary buffer to
      consolidate full SG list into the buffer.
      
      We check at (TRB_CACHE_SIZE - 2) window because it is possible that there
      would be a link and/or event data TRB that take up to 2 of the cache
      entries.
      
      We discovered this issue with devices on other platforms but have not
      yet come across any device that triggers this on Linux. But it could be
      a real problem now or in the future. All it takes is N number of small
      chained TRBs. And other instances of the Synopsys IP may have smaller
      values for the TRB_CACHE_SIZE which would exacerbate the problem.
      Signed-off-by: NTejas Joglekar <joglekar@synopsys.com>
      Signed-off-by: NMathias Nyman <mathias.nyman@linux.intel.com>
      Link: https://lore.kernel.org/r/20201208092912.1773650-3-mathias.nyman@linux.intel.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      2017a1e5
  14. 29 10月, 2020 1 次提交
  15. 28 10月, 2020 1 次提交
  16. 20 9月, 2020 3 次提交
  17. 24 8月, 2020 1 次提交
  18. 23 8月, 2020 1 次提交
  19. 09 7月, 2020 1 次提交
  20. 24 6月, 2020 3 次提交
  21. 21 4月, 2020 1 次提交
  22. 13 3月, 2020 1 次提交
  23. 11 12月, 2019 2 次提交
  24. 16 11月, 2019 1 次提交
    • S
      usb: host: xhci: Support running urb giveback in tasklet context · 36dc0165
      Suwan Kim 提交于
      Patch "USB: HCD: support giveback of URB in tasklet context"[1]
      introduced giveback of urb in tasklet context. [1] This patch was
      applied to ehci but not xhci. [2] This patch significantly reduces
      the hard irq time of xhci. Especially for uvc driver, the hard irq
      including the uvc completion function runs quite long but applying
      this patch reduces the hard irq time of xhci.
      
      I have tested four SS devices to check if performance degradation
      occurs when urb completion functions run in the tasklet context.
      
      As a result of the test, all devices works well and shows very
      similar performance with the upstream kernel. Moreover, usb ethernet
      adapter show better performance than the upstream kernel about 5% for
      RX and 2% for TX. Four SS devices is as follows.
      
      SS devices for test
      
      1. WD My Passport 2TB (external hard drive)
      2. Sandisk Ultra Flair USB 3.0 32GB
      3. Logitech Brio webcam
      4. Iptime 1gigabit ethernet adapter (Mediatek RTL8153)
      
      Test description
      
      1. Mass storage (hard drive) performance test
      - run below command 10 times and compute the average performance
      
          dd if=/dev/sdN iflag=direct of=/dev/null bs=1G count=1
      
      2. Mass storage (flash memory) performance test
      - run below command 10 times and compute the average performance
      
          dd if=/dev/sdN iflag=direct of=/dev/null bs=1G count=1
      
      3. Webcam streaming performance test
      - run simple capture program and get the average frame rate per second
      - capture 1500 frames
      - program link
      
          https://github.com/asfaca/Webcam-performance-analyzing-tool
      
      - video resolution : 4096 X 2160 (4K) at 30 or 24 fps
      - device (Logitech Brio) spec url for the highest resolution and fps
      
          https://support.logitech.com/en_gb/product/brio-stream/specs
      
      4. USB Ethernet adapter performance test
      - directly connect two linux machines with ethernet cable
      - run pktgen of linux kernel and send 1500 bytes packets
      - run vnstat to measure the network bandwidth for 180 seconds
      
      Test machine
      
      - CPU : Intel i5-7600 @ 3.5GHz
      
      Test results
      
      1. Mass storage (hard drive) performance test
      
                  WD My Passport 2TB (external hard drive)
      --------------------------------------------------------------------
          xhci without tasklet        |          xhci with tasklet
      --------------------------------------------------------------------
               103.667MB/s            |            103.692MB/s
      --------------------------------------------------------------------
      
      2. Mass storage (flash memory) performance test
      
                     Sandisk Ultra Flair USB 3.0 32GB
      --------------------------------------------------------------------
          xhci without tasklet        |          xhci with tasklet
      --------------------------------------------------------------------
               129.727MB/s            |            130.2MB/s
      --------------------------------------------------------------------
      
      3. Webcam streaming performance test
      
                           Logitech Brio webcam
      --------------------------------------------------------------------
          xhci without tasklet        |          xhci with tasklet
      --------------------------------------------------------------------
                26.4451 fps           |            26.3949 fps
      --------------------------------------------------------------------
      
      4. USB Ethernet adapter performance test
      
            Iptime 1gigabit ethernet adapter (Mediatek RTL8153)
      --------------------------------------------------------------------
          xhci without tasklet        |          xhci with tasklet
      --------------------------------------------------------------------
      RX      933.86 Mbit/s           |            983.86 Mbit/s
      --------------------------------------------------------------------
      TX      830.18 Mbit/s           |            882.75 Mbit/s
      --------------------------------------------------------------------
      
      [1], https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=94dfd7edfd5c9b605caf7b562de7a813d216e011
      [2], https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=428aac8a81058e2303677a8fbf26670229e51d3aSigned-off-by: NSuwan Kim <suwan.kim027@gmail.com>
      Signed-off-by: NMathias Nyman <mathias.nyman@linux.intel.com>
      Link: https://lore.kernel.org/r/1573836603-10871-4-git-send-email-mathias.nyman@linux.intel.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      36dc0165
  25. 29 10月, 2019 1 次提交
  26. 04 10月, 2019 7 次提交