<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/usb/misc/usbtest.c, branch v3.4.30</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/usb/misc/usbtest.c?h=v3.4.30</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/usb/misc/usbtest.c?h=v3.4.30'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2012-06-01T07:18:21Z</updated>
<entry>
<title>usb: usbtest: two super speed fixes for usbtest</title>
<updated>2012-06-01T07:18:21Z</updated>
<author>
<name>Paul Zimmerman</name>
<email>Paul.Zimmerman@synopsys.com</email>
</author>
<published>2012-04-16T21:19:07Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=0053c7e96ee9a516e7e8499f6fc28c0d9c43d40c'/>
<id>urn:sha1:0053c7e96ee9a516e7e8499f6fc28c0d9c43d40c</id>
<content type='text'>
commit 6a23ccd216b6a8ba2c67a9f9d8969b4431ad2920 upstream.

bMaxPacketSize0 field for super speed is a power of 2, not a count.
The size itself is always 512.

Max packet size for a super speed bulk endpoint is 1024, so
allocate the urb size in halt_simple() accordingly.

Signed-off-by: Paul Zimmerman &lt;paulz@synopsys.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>drivers/usb/misc/usbtest.c: add kfrees</title>
<updated>2012-04-18T21:13:52Z</updated>
<author>
<name>Julia Lawall</name>
<email>Julia.Lawall@lip6.fr</email>
</author>
<published>2012-03-25T19:08:32Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f4a728d09a96d6a83d9c3f39035b1aa7726892ea'/>
<id>urn:sha1:f4a728d09a96d6a83d9c3f39035b1aa7726892ea</id>
<content type='text'>
Free the two previously allocated buffers before exiting the function in an
error case.

Signed-off-by: Julia Lawall &lt;Julia.Lawall@lip6.fr&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: usbtest: avoid integer overflow in alloc_sglist()</title>
<updated>2012-04-17T22:54:57Z</updated>
<author>
<name>Xi Wang</name>
<email>xi.wang@gmail.com</email>
</author>
<published>2012-04-09T19:48:45Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8bde9a62ee74afa89f593c563e926d163b1f6ada'/>
<id>urn:sha1:8bde9a62ee74afa89f593c563e926d163b1f6ada</id>
<content type='text'>
A large `nents' from userspace could overflow the allocation size,
leading to memory corruption.

| alloc_sglist()
| usbtest_ioctl()

Use kmalloc_array() to avoid the overflow.

Signed-off-by: Xi Wang &lt;xi.wang@gmail.com&gt;
Acked-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: usbtest: avoid integer overflow in test_ctrl_queue()</title>
<updated>2012-04-17T22:54:57Z</updated>
<author>
<name>Xi Wang</name>
<email>xi.wang@gmail.com</email>
</author>
<published>2012-04-09T19:48:55Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e65cdfae71cecec0fcd43a3f9ac8b5e4ae52db08'/>
<id>urn:sha1:e65cdfae71cecec0fcd43a3f9ac8b5e4ae52db08</id>
<content type='text'>
Avoid overflowing context.count = param-&gt;sglen * param-&gt;iterations,
where both `sglen' and `iterations' are from userspace.

| test_ctrl_queue()
| usbtest_ioctl()

Keep -EOPNOTSUPP for error code.

Signed-off-by: Xi Wang &lt;xi.wang@gmail.com&gt;
Acked-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>USB: remove BKL comments</title>
<updated>2011-11-27T03:58:46Z</updated>
<author>
<name>Davidlohr Bueso</name>
<email>dave@gnu.org</email>
</author>
<published>2011-11-24T15:23:44Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=568987116ed5fce7e9e9c731ffe5f5af193ab2e3'/>
<id>urn:sha1:568987116ed5fce7e9e9c731ffe5f5af193ab2e3</id>
<content type='text'>
The BKL is a gonner.

Signed-off-by: Davidlohr Bueso &lt;dave@gnu.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>usb: Provide usb_speed_string() function</title>
<updated>2011-09-18T08:29:04Z</updated>
<author>
<name>Michal Nazarewicz</name>
<email>mina86@mina86.com</email>
</author>
<published>2011-08-30T15:11:19Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e538dfdae85244fd2c4231725d82cc1f1bc4942c'/>
<id>urn:sha1:e538dfdae85244fd2c4231725d82cc1f1bc4942c</id>
<content type='text'>
In a few places in the kernel, the code prints
a human-readable USB device speed (eg. "high speed").
This involves a switch statement sometimes wrapped
around in ({ ... }) block leading to code repetition.

To mitigate this issue, this commit introduces
usb_speed_string() function, which returns
a human-readable name of provided speed.

It also changes a few places switch was used to use
this new function.  This changes a bit the way the
speed is printed in few instances at the same time
standardising it.

Signed-off-by: Michal Nazarewicz &lt;mina86@mina86.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>USB: use usb_endpoint_maxp() instead of le16_to_cpu()</title>
<updated>2011-08-23T16:47:40Z</updated>
<author>
<name>Kuninori Morimoto</name>
<email>kuninori.morimoto.gx@renesas.com</email>
</author>
<published>2011-08-23T10:12:03Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=29cc88979a8818cd8c5019426e945aed118b400e'/>
<id>urn:sha1:29cc88979a8818cd8c5019426e945aed118b400e</id>
<content type='text'>
Now ${LINUX}/drivers/usb/* can use usb_endpoint_maxp(desc) to get maximum packet size
instead of le16_to_cpu(desc-&gt;wMaxPacketSize).
This patch fix it up

Cc: Armin Fuerst &lt;fuerst@in.tum.de&gt;
Cc: Pavel Machek &lt;pavel@ucw.cz&gt;
Cc: Johannes Erdfelt &lt;johannes@erdfelt.com&gt;
Cc: Vojtech Pavlik &lt;vojtech@suse.cz&gt;
Cc: Oliver Neukum &lt;oliver@neukum.name&gt;
Cc: David Kubicek &lt;dave@awk.cz&gt;
Cc: Johan Hovold &lt;jhovold@gmail.com&gt;
Cc: Brad Hards &lt;bhards@bigpond.net.au&gt;
Acked-by: Felipe Balbi &lt;balbi@ti.com&gt;
Cc: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Cc: Thomas Dahlmann &lt;dahlmann.thomas@arcor.de&gt;
Cc: David Brownell &lt;david-b@pacbell.net&gt;
Cc: David Lopo &lt;dlopo@chipidea.mips.com&gt;
Cc: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Cc: Michal Nazarewicz &lt;m.nazarewicz@samsung.com&gt;
Cc: Xie Xiaobo &lt;X.Xie@freescale.com&gt;
Cc: Li Yang &lt;leoli@freescale.com&gt;
Cc: Jiang Bo &lt;tanya.jiang@freescale.com&gt;
Cc: Yuan-hsin Chen &lt;yhchen@faraday-tech.com&gt;
Cc: Darius Augulis &lt;augulis.darius@gmail.com&gt;
Cc: Xiaochen Shen &lt;xiaochen.shen@intel.com&gt;
Cc: Yoshihiro Shimoda &lt;yoshihiro.shimoda.uh@renesas.com&gt;
Cc: OKI SEMICONDUCTOR, &lt;toshiharu-linux@dsn.okisemi.com&gt;
Cc: Robert Jarzmik &lt;robert.jarzmik@free.fr&gt;
Cc: Ben Dooks &lt;ben@simtec.co.uk&gt;
Cc: Thomas Abraham &lt;thomas.ab@samsung.com&gt;
Cc: Herbert Pötzl &lt;herbert@13thfloor.at&gt;
Cc: Arnaud Patard &lt;arnaud.patard@rtp-net.org&gt;
Cc: Roman Weissgaerber &lt;weissg@vienna.at&gt;
Acked-by: Sarah Sharp &lt;sarah.a.sharp@linux.intel.com&gt;
Cc: Tony Olech &lt;tony.olech@elandigitalsystems.com&gt;
Cc: Florian Floe Echtler &lt;echtler@fs.tum.de&gt;
Cc: Christian Lucht &lt;lucht@codemercs.com&gt;
Cc: Juergen Stuber &lt;starblue@sourceforge.net&gt;
Cc: Georges Toth &lt;g.toth@e-biz.lu&gt;
Cc: Bill Ryder &lt;bryder@sgi.com&gt;
Cc: Kuba Ober &lt;kuba@mareimbrium.org&gt;
Cc: Inaky Perez-Gonzalez &lt;inaky.perez-gonzalez@intel.com&gt;
Signed-off-by: Kuninori Morimoto &lt;kuninori.morimoto.gx@renesas.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>USB: usbtest: use URB_ZERO_PACKET for BULK-OUT transfers</title>
<updated>2011-08-23T16:47:39Z</updated>
<author>
<name>Sebastian Andrzej Siewior</name>
<email>bigeasy@linutronix.de</email>
</author>
<published>2011-08-23T08:44:54Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=7c79d094358326132693279bfb22e4f8454cc652'/>
<id>urn:sha1:7c79d094358326132693279bfb22e4f8454cc652</id>
<content type='text'>
Executing
| testusb -a -c 1 -t 3 -v 421 -s 2048

does not complete on the gadget side.
g_zero enqueues a 4096 bytes long buffer. The host sends 2048bytes which
is a multiple of wMaxPacketSize (either 64 or 512 bytes). The host is
done with sending data but the gadget waits for more.
Since the protocol does not include transfer-length-field sending a
terminating zero packet seems the only way out.

Reviewed-by: Felipe Balbi &lt;balbi@ti.com&gt;
Signed-off-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>Merge branch 'usb-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6</title>
<updated>2011-05-23T19:33:02Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2011-05-23T19:33:02Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c44dead70a841d90ddc01968012f323c33217c9e'/>
<id>urn:sha1:c44dead70a841d90ddc01968012f323c33217c9e</id>
<content type='text'>
* 'usb-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (205 commits)
  USB: EHCI: Remove SPARC_LEON {read,write}_be definitions from ehci.h
  USB: UHCI: Support big endian GRUSBHC HC
  sparc: add {read,write}*_be routines
  USB: UHCI: Add support for big endian descriptors
  USB: UHCI: Use ACCESS_ONCE rather than using a full compiler barrier
  USB: UHCI: Add support for big endian mmio
  usb-storage: Correct adjust_quirks to include latest flags
  usb/isp1760: Fix possible unlink problems
  usb/isp1760: Move function isp1760_endpoint_disable() within file.
  USB: remove remaining usages of hcd-&gt;state from usbcore and fix regression
  usb: musb: ux500: add configuration and build options for ux500 dma
  usb: musb: ux500: add dma glue layer for ux500
  usb: musb: ux500: add dma name for ux500
  usb: musb: ux500: add ux500 specific code for gadget side
  usb: musb: fix compile error
  usb-storage: fix up the unusual_realtek device list
  USB: gadget: f_audio: Fix invalid dereference of initdata
  EHCI: don't rescan interrupt QHs needlessly
  OHCI: fix regression caused by nVidia shutdown workaround
  USB: OTG: msm: Free VCCCX regulator even if we can't set the voltage
  ...
</content>
</entry>
<entry>
<title>usb: fix warning in usbtest module v2</title>
<updated>2011-05-10T21:14:59Z</updated>
<author>
<name>Greg Dietsche</name>
<email>Gregory.Dietsche@cuw.edu</email>
</author>
<published>2011-05-09T03:51:43Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=304b0b572c66bcd89df13e856db16503609c1a24'/>
<id>urn:sha1:304b0b572c66bcd89df13e856db16503609c1a24</id>
<content type='text'>
On amd64 unsigned is not as wide as pointer and this causes a compiler
warning. Switching to unsigned long corrects the problem.

Signed-off-by: Greg Dietsche &lt;Gregory.Dietsche@cuw.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
</feed>
