<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/drivers/usb/misc/usbtest.c, branch v3.16.46</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.16.46</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.16.46'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2016-11-20T01:17:09Z</updated>
<entry>
<title>usb: misc: usbtest: add fix for driver hang</title>
<updated>2016-11-20T01:17:09Z</updated>
<author>
<name>Lu Baolu</name>
<email>baolu.lu@linux.intel.com</email>
</author>
<published>2016-08-11T02:31:14Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=69d8e8f4b5efc876b1d150ae50d2898afdc24723'/>
<id>urn:sha1:69d8e8f4b5efc876b1d150ae50d2898afdc24723</id>
<content type='text'>
commit 539587511835ea12d8daa444cbed766cf2bc3612 upstream.

In sg_timeout(), req-&gt;status is set to "-ETIMEDOUT" before calling
into usb_sg_cancel(). usb_sg_cancel() will do nothing and return
directly if req-&gt;status has been set to a non-zero value. This will
cause driver hang whenever transfer time out is triggered.

This patch fixes this issue. It could be backported to stable kernel
with version later than v3.15.

Cc: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Lu Baolu &lt;baolu.lu@linux.intel.com&gt;
Suggested-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Acked-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>USB: usbtest: add a timeout for scatter-gather tests</title>
<updated>2014-06-18T00:05:50Z</updated>
<author>
<name>Alan Stern</name>
<email>stern@rowland.harvard.edu</email>
</author>
<published>2014-06-03T15:11:34Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=32b36eeae6a859670d2939a7d6136cb5e9ed64f8'/>
<id>urn:sha1:32b36eeae6a859670d2939a7d6136cb5e9ed64f8</id>
<content type='text'>
In usbtest, tests 5 - 8 use the scatter-gather library in usbcore
without any sort of timeout.  If there's a problem in the gadget or
host controller being tested, the test can hang.

This patch adds a 10-second timeout to the tests, so that they will
fail gracefully with an ETIMEDOUT error instead of hanging.

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Reported-by: Huang Rui &lt;ray.huang@amd.com&gt;
Tested-by: Huang Rui &lt;ray.huang@amd.com&gt;
CC: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: usbtest: add pattern check on pipe in phase of unlink read</title>
<updated>2014-05-27T23:23:43Z</updated>
<author>
<name>Huang Rui</name>
<email>ray.huang@amd.com</email>
</author>
<published>2014-05-22T10:06:14Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=a7683eb3af6df30e3a3f3666d834e9abba8f5c22'/>
<id>urn:sha1:a7683eb3af6df30e3a3f3666d834e9abba8f5c22</id>
<content type='text'>
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: Huang Rui &lt;ray.huang@amd.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: usbtest: fix unlink write error with pattern 1</title>
<updated>2014-05-27T23:23:43Z</updated>
<author>
<name>Huang Rui</name>
<email>ray.huang@amd.com</email>
</author>
<published>2014-05-26T02:55:36Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=e4d58f5dcb7d7be45df8def31881ebfae99c75da'/>
<id>urn:sha1:e4d58f5dcb7d7be45df8def31881ebfae99c75da</id>
<content type='text'>
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 --&gt; 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 ===&gt; 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 --&gt; 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 --&gt; 0

Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Huang Rui &lt;ray.huang@amd.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'for-usb-next-2013-12-20' of git://git.kernel.org/pub/scm/linux/kernel/git/sarah/xhci into usb-next</title>
<updated>2013-12-21T23:58:40Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2013-12-21T23:58:40Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=e2a3a64855f2f906e0ba9056a3a57aeb73b1a968'/>
<id>urn:sha1:e2a3a64855f2f906e0ba9056a3a57aeb73b1a968</id>
<content type='text'>
Sarah writes:

xhci: Cleanups, non-urgent fixes for 3.14.

Happy Holidays, Greg!

Here's four patches to be queued to usb-next for 3.14.

One adds a module parameter to the xHCI driver to allow users to enable
xHCI quirks without recompiling their kernel, which you've already said
is fine.  The second patch is a bug fix for new usbtest code that's only
in usb-next.  The third patch is simple cleanup.

The last patch is a non-urgent bug fix for xHCI platform devices.  The
bug has been in the code since 3.9.  You've been asking me to hold off
on non-urgent bug fixes after -rc4/-rc5, so it can go into usb-next, and
be backported to stable once 3.14 is out.

These have all been tested over the past week.  I did run across one
oops, but it turned out to be a bug in 3.12, and therefore not related
to any of these patches.

Please queue these for usb-next and 3.14.

Thanks,
Sarah Sharp
</content>
</entry>
<entry>
<title>usb: usbtest: Always clear halt else further tests will fail</title>
<updated>2013-12-19T00:26:12Z</updated>
<author>
<name>Roger Quadros</name>
<email>rogerq@ti.com</email>
</author>
<published>2013-12-18T10:10:11Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=824d752b04765fc513fe17666a539f6c73960c4e'/>
<id>urn:sha1:824d752b04765fc513fe17666a539f6c73960c4e</id>
<content type='text'>
In test_halt() we set an endpoint halt condition and return on halt verification
failure, then the enpoint will remain halted and all further tests related
to that enpoint will fail. This is because we don't tackle endpoint halt error condition
in any of the tests. To avoid that situation, make sure to clear the
halt condition before exiting test_halt().

Signed-off-by: Roger Quadros &lt;rogerq@ti.com&gt;
Reviewed-by: Felipe Balbi &lt;balbi@ti.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: usbtest: Add timetout to simple_io()</title>
<updated>2013-12-19T00:26:12Z</updated>
<author>
<name>Roger Quadros</name>
<email>rogerq@ti.com</email>
</author>
<published>2013-12-18T10:10:10Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=e5e4746510d140261918aecce2e5e3aa4456f7e9'/>
<id>urn:sha1:e5e4746510d140261918aecce2e5e3aa4456f7e9</id>
<content type='text'>
Without a timetout some tests e.g. test_halt() can remain stuck forever.

Signed-off-by: Roger Quadros &lt;rogerq@ti.com&gt;
Reviewed-by: Felipe Balbi &lt;balbi@ti.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usbtest: Fix BOS control test for USB 2.01 devices.</title>
<updated>2013-12-17T21:40:29Z</updated>
<author>
<name>Sarah Sharp</name>
<email>sarah.a.sharp@linux.intel.com</email>
</author>
<published>2013-12-13T21:44:17Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=8cf4328569acc37ac5c5b4eb27ae86c3758f627b'/>
<id>urn:sha1:8cf4328569acc37ac5c5b4eb27ae86c3758f627b</id>
<content type='text'>
Commit c952a8ba7136505cd1ca01735cc748ddc08c7d2f "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: Sarah Sharp &lt;sarah.a.sharp@linux.intel.com&gt;
Acked-by: Huang Rui &lt;ray.huang@amd.com&gt;
</content>
</entry>
<entry>
<title>usb: usbtest: update bos test coverage to usb 2.1 device</title>
<updated>2013-12-09T01:42:45Z</updated>
<author>
<name>Huang Rui</name>
<email>ray.huang@amd.com</email>
</author>
<published>2013-11-13T14:35:13Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f625099f1a504742aef4c6ab20ba0ca981847e3c'/>
<id>urn:sha1:f625099f1a504742aef4c6ab20ba0ca981847e3c</id>
<content type='text'>
The commit "usb: usbtest: support bos descriptor test for usb 3.0"
introduced a test for bos descriptor. And USB 2.1 device also can be
checked. So this patch extends the test coverage to support USB 2.1 device.

Reported-by: Sarah Sharp &lt;sarah.a.sharp@linux.intel.com&gt;
Signed-off-by: Huang Rui &lt;ray.huang@amd.com&gt;
Acked-by: Felipe Balbi &lt;balbi@ti.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: usbtest: fix the bit mask of usb 2.0 extension descriptor</title>
<updated>2013-12-09T01:42:45Z</updated>
<author>
<name>Huang Rui</name>
<email>ray.huang@amd.com</email>
</author>
<published>2013-11-13T14:35:14Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=875bc23ac041519b24bd2c1faf71822e4b3e4322'/>
<id>urn:sha1:875bc23ac041519b24bd2c1faf71822e4b3e4322</id>
<content type='text'>
USB 2.1 Link PM adds to use bits[1:15] according to USB 2.0 ECN Errata for
Link Power Management spec.

Bit	Encoding
0	Reserved
1	LPM
2	BESL &amp; Altemate HIRD definitions supported
3	Recommended Baseline BESL valid
4	Recommended Deep BESL valid
11:8	Recommended Baseline BESL value
15:12	Recommended Deep BESL value
31:16	Reserved

So fix the bit mask from 0x1e to 0xfffe.

Reported-by: Sarah Sharp &lt;sarah.a.sharp@linux.intel.com&gt;
Signed-off-by: Huang Rui &lt;ray.huang@amd.com&gt;
Acked-by: Felipe Balbi &lt;balbi@ti.com&gt;
Acked-by: Sarah Sharp &lt;sarah.a.sharp@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
