<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/usb/core, branch v3.12</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.12</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.12'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2013-10-16T17:21:07Z</updated>
<entry>
<title>USB: quirks: add touchscreen that is dazzeled by remote wakeup</title>
<updated>2013-10-16T17:21:07Z</updated>
<author>
<name>Oliver Neukum</name>
<email>oneukum@suse.de</email>
</author>
<published>2013-10-16T10:26:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=614ced91fc6fbb5a1cdd12f0f1b6c9197d9f1350'/>
<id>urn:sha1:614ced91fc6fbb5a1cdd12f0f1b6c9197d9f1350</id>
<content type='text'>
The device descriptors are messed up after remote wakeup

Signed-off-by: Oliver Neukum &lt;oneukum@suse.de&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>USB: quirks.c: add one device that cannot deal with suspension</title>
<updated>2013-10-14T18:17:31Z</updated>
<author>
<name>Oliver Neukum</name>
<email>oneukum@suse.de</email>
</author>
<published>2013-10-14T14:22:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4294bca7b423d1a5aa24307e3d112a04075e3763'/>
<id>urn:sha1:4294bca7b423d1a5aa24307e3d112a04075e3763</id>
<content type='text'>
The device is not responsive when resumed, unless it is reset.

Signed-off-by: Oliver Neukum &lt;oneukum@suse.de&gt;
CC: stable@vger.kernel.org
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: check usb device's state before sending a Set SEL control transfer</title>
<updated>2013-09-23T22:43:32Z</updated>
<author>
<name>Xenia Ragiadakou</name>
<email>burzalodowa@gmail.com</email>
</author>
<published>2013-09-04T14:24:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=38d7f6885164b114fdfae84bc18397e8fced9b00'/>
<id>urn:sha1:38d7f6885164b114fdfae84bc18397e8fced9b00</id>
<content type='text'>
Set SEL control urbs cannot be sent to a device in unconfigured state.
This patch adds a check in usb_req_set_sel() to ensure the usb device's
state is USB_STATE_CONFIGURED.

Signed-off-by: Xenia Ragiadakou &lt;burzalodowa@gmail.com&gt;
Reported-by: Martin MOKREJS &lt;mmokrejs@gmail.com&gt;
Suggested-by: Sarah Sharp &lt;sarah.a.sharp@linux.intel.com&gt;
Signed-off-by: Sarah Sharp &lt;sarah.a.sharp@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>usbcore: fix incorrect type in assignment in descriptors_changed()</title>
<updated>2013-08-31T01:50:43Z</updated>
<author>
<name>Xenia Ragiadakou</name>
<email>burzalodowa@gmail.com</email>
</author>
<published>2013-08-31T01:40:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b9a1048137f4ae43ee90f61a3f34f0efe863cfeb'/>
<id>urn:sha1:b9a1048137f4ae43ee90f61a3f34f0efe863cfeb</id>
<content type='text'>
This patch fixes the incorrect assignment of a variable with type 'le16'
to a variable with type 'unsigned int'.

Signed-off-by: Xenia Ragiadakou &lt;burzalodowa@gmail.com&gt;
Reported-by: kbuild test robot &lt;fengguang.wu@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usbcore: compare and release one bos descriptor in usb_reset_and_verify_device()</title>
<updated>2013-08-30T19:02:08Z</updated>
<author>
<name>Xenia Ragiadakou</name>
<email>burzalodowa@gmail.com</email>
</author>
<published>2013-08-29T18:45:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e3376d6c87eea09bd65ece6073f6e5d47aa560a3'/>
<id>urn:sha1:e3376d6c87eea09bd65ece6073f6e5d47aa560a3</id>
<content type='text'>
In usb_reset_and_verify_device(), hub_port_init() allocates a new bos
descriptor to hold the value read by the device. The new bos descriptor
has to be compared with the old one in order to figure out if device 's
firmware has changed in which case the device has to be reenumerated.
In the original code, none of the two descriptors was deallocated leading
to memory leaks.

This patch compares the old bos descriptor with the new one to detect change
in firmware and releases the newly allocated bos descriptor to prevent memory
leak.

Signed-off-by: Xenia Ragiadakou &lt;burzalodowa@gmail.com&gt;
Reported-by: Martin MOKREJS &lt;mmokrejs@gmail.com&gt;
Tested-by: Martin MOKREJS &lt;mmokrejs@gmail.com&gt;
Suggested-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: core: be specific about attribute permissions</title>
<updated>2013-08-25T22:12:03Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2013-08-23T23:05:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d03f254f2ee2a708af9a7347402d9aed7f6cc4c1'/>
<id>urn:sha1:d03f254f2ee2a708af9a7347402d9aed7f6cc4c1</id>
<content type='text'>
Instead of having to audit all sysfs attributes, to ensure we get them
right, use the default macros the driver core provides us (read-only,
read-write) to make the code simpler, and to prevent any mistakes from
ever happening.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>USB: core: use DRIVER_ATTR_RW()</title>
<updated>2013-08-23T22:12:14Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2013-08-23T22:12:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=598d03610a0169eb88d2b08d6743be31b3b9c258'/>
<id>urn:sha1:598d03610a0169eb88d2b08d6743be31b3b9c258</id>
<content type='text'>
Use DRIVER_ATTR_RW() to make it easier to audit sysfs file permissions.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: don't use bNbrPorts after initialization</title>
<updated>2013-08-23T17:47:17Z</updated>
<author>
<name>Krzysztof Mazur</name>
<email>krzysiek@podlesie.net</email>
</author>
<published>2013-08-22T12:49:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3bbc47d8b07abad56780a8e214520259808c4f8b'/>
<id>urn:sha1:3bbc47d8b07abad56780a8e214520259808c4f8b</id>
<content type='text'>
After successful initialization hub-&gt;descriptor-&gt;bNbrPorts and
hub-&gt;hdev-&gt;maxchild are equal, but using hub-&gt;hdev-&gt;maxchild is
preferred because that value is explicitly used for initialization
of hub-&gt;ports[].

Signed-off-by: Krzysztof Mazur &lt;krzysiek@podlesie.net&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: fail on usb_hub_create_port_device() errors</title>
<updated>2013-08-23T17:47:17Z</updated>
<author>
<name>Krzysztof Mazur</name>
<email>krzysiek@podlesie.net</email>
</author>
<published>2013-08-22T12:49:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e58547eb9561a8a72d46e2d411090a614d33ac0e'/>
<id>urn:sha1:e58547eb9561a8a72d46e2d411090a614d33ac0e</id>
<content type='text'>
Ignoring usb_hub_create_port_device() errors cause later NULL pointer
deference when uninitialized hub-&gt;ports[i] entries are dereferenced
after port memory allocation error.

Signed-off-by: Krzysztof Mazur &lt;krzysiek@podlesie.net&gt;
Acked-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
