1. 03 11月, 2016 2 次提交
  2. 12 8月, 2016 1 次提交
  3. 11 8月, 2016 1 次提交
  4. 09 8月, 2016 1 次提交
  5. 04 5月, 2016 1 次提交
  6. 29 4月, 2016 1 次提交
  7. 15 12月, 2015 2 次提交
    • D
      usb: misc: usbtest: Remove timeval usage · 75f5c434
      Deepa Dinamani 提交于
      timeval is deprecated and not y2038 safe.  Its size also changes according
      to 32 bit/ 64 bit compilation.  Replace it with 32 and 64 bit versions of
      its individual fields, giving two ioctls with different code values.
      The two ioctls are necessary to maintain the 32 bit and 64 bit userspace
      compatibility with a 64/32 bit kernel.
      
      Change unsigned to __u32 types for a definitive userspace interface.
      This is in accordance with the psABI that the unsigned type is always
      32 bits.
      
      Also use motonic timer instead of real time to ensure positive delta
      values.
      
      Refactor usbtest_ioctl for readability to isolate the handling of the
      testing timing measurement.
      
      The official testusb userspace tool can be changed in a separate patch
      to reflect the __u32 changes as well. It can use the usbtest_param_32
      struct, since 32 bit seconds is long enough for test durations.
      Reviewed-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NDeepa Dinamani <deepa.kernel@gmail.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      75f5c434
    • P
      usb: misc: usbtest: improve the description for error message · 4cee4fa5
      Peter Chen 提交于
      Now the function of complicated_callback is not only used for iso
      transfer, improve the error message to reflect it.
      Signed-off-by: NPeter Chen <peter.chen@freescale.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      4cee4fa5
  8. 02 12月, 2015 2 次提交
  9. 14 10月, 2015 1 次提交
    • P
      usb: misc: usbtest: add bulk queue test · 145f48c5
      Peter Chen 提交于
      The bulk queue tests are used to show 'best performance' for bulk
      transfer, we are often asked this question by users. The implementation
      is the same with iso test, that is queue request at interrupt completion,
      so we reuse the iso structures, and rename them as common one.
      
      It's result should be very close to IC simulation, in order
      to get that, the device side should also need to prepare enough
      queue.
      
      We have got the 'best performance' (IN: 41MB, OUT: 39MB) at i.mx platform
      (USB2, ARM Cortex A9, stream mode need to enable) with below command:
      
      Host side:
      modprobe usbtest
      ./testusb -a -t 27 -g 64 -s 16384
      ./testusb -a -t 28 -g 64 -s 16384
      Gadget side:
      modprobe g_zero loopdefault=1 qlen=64 buflen=16384
      Signed-off-by: NPeter Chen <peter.chen@freescale.com>
      Cc: Greg KH <gregkh@linuxfoundation.org>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      145f48c5
  10. 27 9月, 2015 4 次提交
  11. 19 8月, 2015 1 次提交
  12. 24 9月, 2014 1 次提交
  13. 30 8月, 2014 1 次提交
    • A
      usbtest: Add interrupt EP testcases · 457a0955
      Amit Virdi 提交于
      Two simple test cases for interrupt endpoints are added to the usbtest.c file.
      These are simple non-queued interrupt IN and interrupt OUT transfers. Currently,
      only gadget zero is capable of executing the interrupt EP test cases. However,
      extending the same to other gadgets is extremely simple and can be done
      on-demand.
      
      The two new tests added are
        - Test 25: To verify Interrupt OUT transfer
        - Test 26: To verify Interrupt IN transfer
      
      Since the default value of wMaxPacketSize is set as 1024, so interrupt
      IN transfers must be specified with the size parameter = multiple of
      1024. Otherwise the default value (512) in the usbtest application fails
      the transfer. See [RUN 4] for sample logs
      
      The application logs (usbtest) and corresponding kernel logs are as
      following:
      
      [Run 1]
      ./testusb -a -c 10 -s 2048 -t 26 -v 511
      usbtest 7-1:3.0: TEST 26: read 2048 bytes 10 times
      
      [Run 2]
      ./testusb -a -c 10 -s 1024 -t 25 -v 511
      usbtest 7-1:3.0: TEST 25: write 1024 bytes 10 times
      
      [Run 3]
      ./testusb -a -c 10 -s 1098 -t 25 -v 511
      usbtest 7-1:3.0: TEST 25: write 1098 bytes 10 times
      
      [Run 4 - Failure case scenario]
      ./testusb -a  -t 26
      unknown speed   /dev/bus/usb/007/004    0
      /dev/bus/usb/007/004 test 26 --> 75 (Value too large for defined data type)
      
      usbtest 7-1:3.0: TEST 26: read 512 bytes 1000 times
      usb 7-1: test26 failed, iterations left 999, status -75 (not 0)
      Signed-off-by: NAmit Virdi <amit.virdi@st.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      457a0955
  14. 18 6月, 2014 1 次提交
  15. 28 5月, 2014 2 次提交
    • H
      usb: usbtest: add pattern check on pipe in phase of unlink read · a7683eb3
      Huang Rui 提交于
      TEST 11 unlinks the URB read request for N times. When host and gadget
      both initialize pattern 1 (mod 63) data series to do IN transfer, the
      host side function should check the data buffer if it is as mod 63
      series, because the data packet which host receivced will follow
      pattern 1. So this patch adds this checking action.
      Signed-off-by: NHuang Rui <ray.huang@amd.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      a7683eb3
    • H
      usb: usbtest: fix unlink write error with pattern 1 · e4d58f5d
      Huang Rui 提交于
      TEST 12 and TEST 24 unlinks the URB write request for N times. When
      host and gadget both initialize pattern 1 (mod 63) data series to
      transfer, the gadget side will complain the wrong data which is not
      expected.  Because in host side, usbtest doesn't fill the data buffer
      as mod 63 and this patch fixed it.
      
      [20285.488974] dwc3 dwc3.0.auto: ep1out-bulk: Transfer Not Ready
      [20285.489181] dwc3 dwc3.0.auto: ep1out-bulk: reason Transfer Not Active
      [20285.489423] dwc3 dwc3.0.auto: ep1out-bulk: req ffff8800aa6cb480 dma aeb50800 length 512 last
      [20285.489727] dwc3 dwc3.0.auto: ep1out-bulk: cmd 'Start Transfer' params 00000000 a9eaf000 00000000
      [20285.490055] dwc3 dwc3.0.auto: Command Complete --> 0
      [20285.490281] dwc3 dwc3.0.auto: ep1out-bulk: Transfer Not Ready
      [20285.490492] dwc3 dwc3.0.auto: ep1out-bulk: reason Transfer Active
      [20285.490713] dwc3 dwc3.0.auto: ep1out-bulk: endpoint busy
      [20285.490909] dwc3 dwc3.0.auto: ep1out-bulk: Transfer Complete
      [20285.491117] dwc3 dwc3.0.auto: request ffff8800aa6cb480 from ep1out-bulk completed 512/512 ===> 0
      [20285.491431] zero gadget: bad OUT byte, buf[1] = 0
      [20285.491605] dwc3 dwc3.0.auto: ep1out-bulk: cmd 'Set Stall' params 00000000 00000000 00000000
      [20285.491915] dwc3 dwc3.0.auto: Command Complete --> 0
      [20285.492099] dwc3 dwc3.0.auto: queing request ffff8800aa6cb480 to ep1out-bulk length 512
      [20285.492387] dwc3 dwc3.0.auto: ep1out-bulk: Transfer Not Ready
      [20285.492595] dwc3 dwc3.0.auto: ep1out-bulk: reason Transfer Not Active
      [20285.492830] dwc3 dwc3.0.auto: ep1out-bulk: req ffff8800aa6cb480 dma aeb51000 length 512 last
      [20285.493135] dwc3 dwc3.0.auto: ep1out-bulk: cmd 'Start Transfer' params 00000000 a9eaf000 00000000
      [20285.493465] dwc3 dwc3.0.auto: Command Complete --> 0
      
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NHuang Rui <ray.huang@amd.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      e4d58f5d
  16. 19 12月, 2013 2 次提交
  17. 18 12月, 2013 1 次提交
    • S
      usbtest: Fix BOS control test for USB 2.01 devices. · 8cf43285
      Sarah Sharp 提交于
      Commit c952a8ba "usb: usbtest: add a
      test case to support bos for queue control" will cause USB 2.01 and USB
      2.10 devices with a BOS descriptor to fail case 15 of the control test.
      
      The Link PM errata (released in 2007, updated in 2011) says:
      
      "The value of the bcdUSB field in the standard USB 2.0 Device Descriptor
      is used to indicate that the device supports the request to read the BOS
      Descriptor (i.e.  GetDescriptor(BOS)). Devices that support the BOS
      descriptor must have a bcdUSB value of 0201H or larger."
      
      The current code says that non-SuperSpeed devices *must* return -EPIPE,
      as this comment shows:
      
                      /* sign of this variable means:
                       *  -: tested code must return this (negative) error code
                       *  +: tested code may return this (negative too) error code
                       */
                      int                     expected = 0;
      
      This means the test will fail with USB 2.01 and USB 2.10 devices that
      provide a BOS descriptor.  Change it to only require a stall response if
      the USB device bcdUSB is less than 2.01.
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Acked-by: NHuang Rui <ray.huang@amd.com>
      8cf43285
  18. 09 12月, 2013 3 次提交
  19. 31 10月, 2013 3 次提交
  20. 30 10月, 2013 2 次提交
  21. 01 10月, 2013 1 次提交
  22. 26 9月, 2013 1 次提交
  23. 01 8月, 2013 1 次提交
  24. 31 1月, 2013 1 次提交
    • A
      USB: altsetting overrides for usbtest · d0b4652f
      Alan Stern 提交于
      The usbtest driver includes some rather simple-minded logic for
      selecting an altsetting to test.  It doesn't work well for the g_zero
      gadget, because it selects altsetting 0 (which doesn't have
      isochronous endpoints) rather than altsetting 1 (which does have them,
      if the gadget's hardware supports them).  This prevents usbtest's
      isochronous tests (15, 16, 22, and 23) from working with g_zero.
      
      Since g_zero is one of the most common gadget drivers used for USB
      testing, usbtest should do a better job of supporting it.  But since
      some programs may rely on the current scheme for selecting
      altsettings, I didn't want to change it.
      
      Instead, this patch (as1655) adds a module parameter to usbtest, which
      can be used to override the default altsetting.  Since usbtest is
      never used by normal users (most distributions probably don't even
      build it), the new module parameter won't inconvenience anybody.  In
      any case, it is entirely optional -- leaving it unset preserves the
      existing behavior.
      
      The patch also fixes a related bug in usbtest: After selecting an
      altsetting, the driver neglects to store its selection.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      d0b4652f
  25. 08 1月, 2013 1 次提交
  26. 22 11月, 2012 1 次提交
  27. 15 11月, 2012 1 次提交