<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/usb/core/devio.c, branch v3.14</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v3.14</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.14'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2014-01-08T00:17:40Z</updated>
<entry>
<title>USB: core: correct spelling mistakes in comments and warning</title>
<updated>2014-01-08T00:17:40Z</updated>
<author>
<name>Rahul Bedarkar</name>
<email>rahulbedarkar89@gmail.com</email>
</author>
<published>2014-01-04T05:54:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=025d44309f92bd5e3d1b2c7fab66836ab25b541b'/>
<id>urn:sha1:025d44309f92bd5e3d1b2c7fab66836ab25b541b</id>
<content type='text'>
Signed-off-by: Rahul Bedarkar &lt;rahulbedarkar89@gmail.com&gt;
Acked-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>drivers: usb: core: devio.c: Spaces to tabs for proc_control_compat()</title>
<updated>2013-10-16T20:38:37Z</updated>
<author>
<name>Matthias Beyer</name>
<email>mail@beyermatthias.de</email>
</author>
<published>2013-10-14T19:46:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=06793f2d0cf9daabeeb5b024d4bf7082dcc71505'/>
<id>urn:sha1:06793f2d0cf9daabeeb5b024d4bf7082dcc71505</id>
<content type='text'>
Replaced spaces by tabs for proc_control_compat() function.

Signed-off-by: Matthias Beyer &lt;mail@beyermatthias.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>drivers: usb: core: devio.c: Spaces to tabs for proc_reapurbnonblock()</title>
<updated>2013-10-16T20:38:37Z</updated>
<author>
<name>Matthias Beyer</name>
<email>mail@beyermatthias.de</email>
</author>
<published>2013-10-14T19:46:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5b32c385bef17fd3d3b8ce7d5af2ee2aa2225ff5'/>
<id>urn:sha1:5b32c385bef17fd3d3b8ce7d5af2ee2aa2225ff5</id>
<content type='text'>
Replaced spaces by tabs for proc_reapurbnonblock() function.

Signed-off-by: Matthias Beyer &lt;mail@beyermatthias.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Merge 3.12-rc3 into usb-next</title>
<updated>2013-09-30T01:45:55Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2013-09-30T01:45:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=df9b17f5868bdafd46cad18b08f1e70fa22b8854'/>
<id>urn:sha1:df9b17f5868bdafd46cad18b08f1e70fa22b8854</id>
<content type='text'>
We want the USB fixes in here as well.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb/core/devio.c: Don't reject control message to endpoint with wrong direction bit</title>
<updated>2013-09-26T00:30:39Z</updated>
<author>
<name>Kurt Garloff</name>
<email>kurt@garloff.de</email>
</author>
<published>2013-09-24T12:13:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=831abf76643555a99b80a3b54adfa7e4fa0a3259'/>
<id>urn:sha1:831abf76643555a99b80a3b54adfa7e4fa0a3259</id>
<content type='text'>
Trying to read data from the Pegasus Technologies NoteTaker (0e20:0101)
[1] with the Windows App (EasyNote) works natively but fails when
Windows is running under KVM (and the USB device handed to KVM).

The reason is a USB control message
 usb 4-2.2: control urb: bRequestType=22 bRequest=09 wValue=0200 wIndex=0001 wLength=0008
This goes to endpoint address 0x01 (wIndex); however, endpoint address
0x01 does not exist. There is an endpoint 0x81 though (same number,
but other direction); the app may have meant that endpoint instead.

The kernel thus rejects the IO and thus we see the failure.

Apparently, Linux is more strict here than Windows ... we can't change
the Win app easily, so that's a problem.

It seems that the Win app/driver is buggy here and the driver does not
behave fully according to the USB HID class spec that it claims to
belong to.  The device seems to happily deal with that though (and
seems to not really care about this value much).

So the question is whether the Linux kernel should filter here.
Rejecting has the risk that somewhat non-compliant userspace apps/
drivers (most likely in a virtual machine) are prevented from working.
Not rejecting has the risk of confusing an overly sensitive device with
such a transfer. Given the fact that Windows does not filter it makes
this risk rather small though.

The patch makes the kernel more tolerant: If the endpoint address in
wIndex does not exist, but an endpoint with toggled direction bit does,
it will let the transfer through. (It does NOT change the message.)

With attached patch, the app in Windows in KVM works.
 usb 4-2.2: check_ctrlrecip: process 13073 (qemu-kvm) requesting ep 01 but needs 81

I suspect this will mostly affect apps in virtual environments; as on
Linux the apps would have been adapted to the stricter handling of the
kernel. I have done that for mine[2].

[1] http://www.pegatech.com/
[2] https://sourceforge.net/projects/notetakerpen/

Signed-off-by: Kurt Garloff &lt;kurt@garloff.de&gt;
Acked-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usbcore: fix read of usbdevfs_ctrltransfer fields in proc_control()</title>
<updated>2013-09-17T16:49:24Z</updated>
<author>
<name>Xenia Ragiadakou</name>
<email>burzalodowa@gmail.com</email>
</author>
<published>2013-08-31T15:09:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c8f2efc8f636506e0f0c2ba4035382076875f0c1'/>
<id>urn:sha1:c8f2efc8f636506e0f0c2ba4035382076875f0c1</id>
<content type='text'>
Urb fields are stored in struct usbdevfs_ctrltransfer in CPU byteorder
and not in little endian, so there is no need to be converted.
This bug was reported by sparse.

Signed-off-by: Xenia Ragiadakou &lt;burzalodowa@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usbfs: Allow printer class 'get_device_id' without needing to claim the intf</title>
<updated>2013-07-25T19:01:12Z</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2013-07-12T08:04:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5dc50c357d5ce8f78e148d20a38e4e66b12d550f'/>
<id>urn:sha1:5dc50c357d5ce8f78e148d20a38e4e66b12d550f</id>
<content type='text'>
For certain (HP) printers the printer device_id does not only contain a
static part identifying the printer, but it also contains a dynamic part
giving printer status, ink level, etc.

To get to this info various userspace utilities need to be able to make a
printer class 'get_device_id' request without first claiming the interface
(as that is in use for the actual printer driver).

Since the printer class 'get_device_id' request does not change interface
settings in anyway, allowing this without claiming the interface should not
cause any issues.

CC: Sanjay Kumar &lt;sanjay.kumar14@hp.com&gt;
CC: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Merge 3.10-rc5 into usb-next</title>
<updated>2013-06-09T04:27:51Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2013-06-09T04:27:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=141dc40ee343ab532717b235dd645e2d25ae3092'/>
<id>urn:sha1:141dc40ee343ab532717b235dd645e2d25ae3092</id>
<content type='text'>
We need the changes in this branch.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usbfs: Increase arbitrary limit for USB 3 isopkt length</title>
<updated>2013-05-29T08:06:36Z</updated>
<author>
<name>Federico Manzan</name>
<email>f.manzan@gmail.com</email>
</author>
<published>2013-05-24T16:18:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e2e2f0ea1c935edcf53feb4c4c8fdb4f86d57dd9'/>
<id>urn:sha1:e2e2f0ea1c935edcf53feb4c4c8fdb4f86d57dd9</id>
<content type='text'>
Increase the current arbitrary limit for isocronous packet size to a
value large enough to account for USB 3.0 super bandwidth streams,
bMaxBurst (0~15 allowed, 1~16 packets)
bmAttributes (bit 1:0, mult 0~2, 1~3 packets)
so the size max for one USB 3 isocronous transfer is
1024 byte * 16 * 3 = 49152 byte

Acked-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Federico Manzan &lt;f.manzan@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: devio: Fixed error: 'do not use assignment in if condition'</title>
<updated>2013-05-17T17:05:57Z</updated>
<author>
<name>Tülin İzer</name>
<email>tulinizer@gmail.com</email>
</author>
<published>2013-05-17T07:13:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4baf0df7010e8d975edcd778604fc1b1fce30f37'/>
<id>urn:sha1:4baf0df7010e8d975edcd778604fc1b1fce30f37</id>
<content type='text'>
This patch fixes error: 'do not use assignment in if condition'
in USB/devio.c.

Signed-off-by: Tülin İzer &lt;tulinizer@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
