<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/usb/core, branch v4.11</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=v4.11</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.11'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2017-03-27T07:24:13Z</updated>
<entry>
<title>USB: fix linked-list corruption in rh_call_control()</title>
<updated>2017-03-27T07:24:13Z</updated>
<author>
<name>Alan Stern</name>
<email>stern@rowland.harvard.edu</email>
</author>
<published>2017-03-24T17:38:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1633682053a7ee8058e10c76722b9b28e97fb73f'/>
<id>urn:sha1:1633682053a7ee8058e10c76722b9b28e97fb73f</id>
<content type='text'>
Using KASAN, Dmitry found a bug in the rh_call_control() routine: If
buffer allocation fails, the routine returns immediately without
unlinking its URB from the control endpoint, eventually leading to
linked-list corruption.

This patch fixes the problem by jumping to the end of the routine
(where the URB is unlinked) when an allocation failure occurs.

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Reported-and-tested-by: Dmitry Vyukov &lt;dvyukov@google.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: hub: Fix crash after failure to read BOS descriptor</title>
<updated>2017-03-17T04:36:58Z</updated>
<author>
<name>Guenter Roeck</name>
<email>linux@roeck-us.net</email>
</author>
<published>2017-03-08T18:19:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7b2db29fbb4e766fcd02207eb2e2087170bd6ebc'/>
<id>urn:sha1:7b2db29fbb4e766fcd02207eb2e2087170bd6ebc</id>
<content type='text'>
If usb_get_bos_descriptor() returns an error, usb-&gt;bos will be NULL.
Nevertheless, it is dereferenced unconditionally in
hub_set_initial_usb2_lpm_policy() if usb2_hw_lpm_capable is set.
This results in a crash.

usb 5-1: unable to get BOS descriptor
...
Unable to handle kernel NULL pointer dereference at virtual address 00000008
pgd = ffffffc00165f000
[00000008] *pgd=000000000174f003, *pud=000000000174f003,
		*pmd=0000000001750003, *pte=00e8000001751713
Internal error: Oops: 96000005 [#1] PREEMPT SMP
Modules linked in: uinput uvcvideo videobuf2_vmalloc cmac [ ... ]
CPU: 5 PID: 3353 Comm: kworker/5:3 Tainted: G    B 4.4.52 #480
Hardware name: Google Kevin (DT)
Workqueue: events driver_set_config_work
task: ffffffc0c3690000 ti: ffffffc0ae9a8000 task.ti: ffffffc0ae9a8000
PC is at hub_port_init+0xc3c/0xd10
LR is at hub_port_init+0xc3c/0xd10
...
Call trace:
[&lt;ffffffc0007fbbfc&gt;] hub_port_init+0xc3c/0xd10
[&lt;ffffffc0007fbe2c&gt;] usb_reset_and_verify_device+0x15c/0x82c
[&lt;ffffffc0007fc5e0&gt;] usb_reset_device+0xe4/0x298
[&lt;ffffffbffc0e3fcc&gt;] rtl8152_probe+0x84/0x9b0 [r8152]
[&lt;ffffffc00080ca8c&gt;] usb_probe_interface+0x244/0x2f8
[&lt;ffffffc000774a24&gt;] driver_probe_device+0x180/0x3b4
[&lt;ffffffc000774e48&gt;] __device_attach_driver+0xb4/0xe0
[&lt;ffffffc000772168&gt;] bus_for_each_drv+0xb4/0xe4
[&lt;ffffffc0007747ec&gt;] __device_attach+0xd0/0x158
[&lt;ffffffc000775080&gt;] device_initial_probe+0x24/0x30
[&lt;ffffffc0007739d4&gt;] bus_probe_device+0x50/0xe4
[&lt;ffffffc000770bd0&gt;] device_add+0x414/0x738
[&lt;ffffffc000809fe8&gt;] usb_set_configuration+0x89c/0x914
[&lt;ffffffc00080a120&gt;] driver_set_config_work+0xc0/0xf0
[&lt;ffffffc000249bb8&gt;] process_one_work+0x390/0x6b8
[&lt;ffffffc00024abcc&gt;] worker_thread+0x480/0x610
[&lt;ffffffc000251a80&gt;] kthread+0x164/0x178
[&lt;ffffffc0002045d0&gt;] ret_from_fork+0x10/0x40

Since we don't know anything about LPM capabilities without BOS descriptor,
don't attempt to enable LPM if it is not available.

Fixes: 890dae886721 ("xhci: Enable LPM support only for hardwired ...")
Cc: stable &lt;stable@vger.kernel.org&gt;
Cc: Mathias Nyman &lt;mathias.nyman@linux.intel.com&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Acked-by: Mathias Nyman &lt;mathias.nyman@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb-core: Add LINEAR_FRAME_INTR_BINTERVAL USB quirk</title>
<updated>2017-03-14T09:07:31Z</updated>
<author>
<name>Samuel Thibault</name>
<email>samuel.thibault@ens-lyon.org</email>
</author>
<published>2017-03-13T19:50:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3243367b209faed5c320a4e5f9a565ee2a2ba958'/>
<id>urn:sha1:3243367b209faed5c320a4e5f9a565ee2a2ba958</id>
<content type='text'>
Some USB 2.0 devices erroneously report millisecond values in
bInterval. The generic config code manages to catch most of them,
but in some cases it's not completely enough.

The case at stake here is a USB 2.0 braille device, which wants to
announce 10ms and thus sets bInterval to 10, but with the USB 2.0
computation that yields to 64ms.  It happens that one can type fast
enough to reach this interval and get the device buffers overflown,
leading to problematic latencies.  The generic config code does not
catch this case because the 64ms is considered a sane enough value.

This change thus adds a USB_QUIRK_LINEAR_FRAME_INTR_BINTERVAL quirk
to mark devices which actually report milliseconds in bInterval,
and marks Vario Ultra devices as needing it.

Signed-off-by: Samuel Thibault &lt;samuel.thibault@ens-lyon.org&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>sched/headers: Prepare to move the memalloc_noio_*() APIs to &lt;linux/sched/mm.h&gt;</title>
<updated>2017-03-02T07:42:33Z</updated>
<author>
<name>Ingo Molnar</name>
<email>mingo@kernel.org</email>
</author>
<published>2017-02-02T19:43:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5b3cc15aff243cb518cbeed8b1a220cbfd023d9c'/>
<id>urn:sha1:5b3cc15aff243cb518cbeed8b1a220cbfd023d9c</id>
<content type='text'>
Update the .c files that depend on these APIs.

Acked-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Mike Galbraith &lt;efault@gmx.de&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>sched/headers: Prepare for new header dependencies before moving code to &lt;linux/sched/signal.h&gt;</title>
<updated>2017-03-02T07:42:29Z</updated>
<author>
<name>Ingo Molnar</name>
<email>mingo@kernel.org</email>
</author>
<published>2017-02-08T17:51:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3f07c0144132e4f59d88055ac8ff3e691a5fa2b8'/>
<id>urn:sha1:3f07c0144132e4f59d88055ac8ff3e691a5fa2b8</id>
<content type='text'>
We are going to split &lt;linux/sched/signal.h&gt; out of &lt;linux/sched.h&gt;, which
will have to be picked up from other headers and a couple of .c files.

Create a trivial placeholder &lt;linux/sched/signal.h&gt; file that just
maps to &lt;linux/sched.h&gt; to make this patch obviously correct and
bisectable.

Include the new header in the files that are going to need it.

Acked-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Mike Galbraith &lt;efault@gmx.de&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>scripts/spelling.txt: add "an one" pattern and fix typo instances</title>
<updated>2017-02-28T02:43:46Z</updated>
<author>
<name>Masahiro Yamada</name>
<email>yamada.masahiro@socionext.com</email>
</author>
<published>2017-02-27T22:28:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0f5e1558306076adec7255b317b89480d8aaa304'/>
<id>urn:sha1:0f5e1558306076adec7255b317b89480d8aaa304</id>
<content type='text'>
Fix typos and add the following to the scripts/spelling.txt:

  an one||a one

I dropped the "an" before "one or more" in
drivers/net/ethernet/sfc/mcdi_pcol.h.

Link: http://lkml.kernel.org/r/1481573103-11329-6-git-send-email-yamada.masahiro@socionext.com
Signed-off-by: Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Merge 4.10-rc7 into usb-next</title>
<updated>2017-02-06T08:32:06Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2017-02-06T08:32:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7bddba775026d51dede9d726bd8158574c0ec5a6'/>
<id>urn:sha1:7bddba775026d51dede9d726bd8158574c0ec5a6</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: Add quirk for WORLDE easykey.25 MIDI keyboard</title>
<updated>2017-01-25T10:02:29Z</updated>
<author>
<name>Lukáš Lalinský</name>
<email>lukas@oxygene.sk</email>
</author>
<published>2017-01-20T18:46:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d9b2997e4a0a874e452df7cdd7de5a54502bd0aa'/>
<id>urn:sha1:d9b2997e4a0a874e452df7cdd7de5a54502bd0aa</id>
<content type='text'>
Add a quirk for WORLDE easykey.25 MIDI keyboard (idVendor=0218,
idProduct=0401). The device reports that it has config string
descriptor at index 3, but when the system selects the configuration
and tries to get the description, it returns a -EPROTO error,
the communication restarts and this keeps repeating over and over again.
Not requesting the string descriptor makes the device work correctly.

Relevant info from Wireshark:

[...]

CONFIGURATION DESCRIPTOR
    bLength: 9
    bDescriptorType: 0x02 (CONFIGURATION)
    wTotalLength: 101
    bNumInterfaces: 2
    bConfigurationValue: 1
    iConfiguration: 3
    Configuration bmAttributes: 0xc0  SELF-POWERED  NO REMOTE-WAKEUP
        1... .... = Must be 1: Must be 1 for USB 1.1 and higher
        .1.. .... = Self-Powered: This device is SELF-POWERED
        ..0. .... = Remote Wakeup: This device does NOT support remote wakeup
    bMaxPower: 50  (100mA)

[...]

     45 0.369104       host                  2.38.0                USB      64     GET DESCRIPTOR Request STRING

[...]

URB setup
    bmRequestType: 0x80
        1... .... = Direction: Device-to-host
        .00. .... = Type: Standard (0x00)
        ...0 0000 = Recipient: Device (0x00)
    bRequest: GET DESCRIPTOR (6)
    Descriptor Index: 0x03
    bDescriptorType: 0x03
    Language Id: English (United States) (0x0409)
    wLength: 255

     46 0.369255       2.38.0                host                  USB      64     GET DESCRIPTOR Response STRING[Malformed Packet]

[...]

Frame 46: 64 bytes on wire (512 bits), 64 bytes captured (512 bits) on interface 0
USB URB
    [Source: 2.38.0]
    [Destination: host]
    URB id: 0xffff88021f62d480
    URB type: URB_COMPLETE ('C')
    URB transfer type: URB_CONTROL (0x02)
    Endpoint: 0x80, Direction: IN
    Device: 38
    URB bus id: 2
    Device setup request: not relevant ('-')
    Data: present (0)
    URB sec: 1484896277
    URB usec: 455031
    URB status: Protocol error (-EPROTO) (-71)
    URB length [bytes]: 0
    Data length [bytes]: 0
    [Request in: 45]
    [Time from request: 0.000151000 seconds]
    Unused Setup Header
    Interval: 0
    Start frame: 0
    Copy of Transfer Flags: 0x00000200
    Number of ISO descriptors: 0
[Malformed Packet: USB]
    [Expert Info (Error/Malformed): Malformed Packet (Exception occurred)]
        [Malformed Packet (Exception occurred)]
        [Severity level: Error]
        [Group: Malformed]

Signed-off-by: Lukáš Lalinský &lt;lukas@oxygene.sk&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: hcd: initialize hcd-&gt;flags to 0 when rm hcd</title>
<updated>2017-01-19T09:34:41Z</updated>
<author>
<name>William wu</name>
<email>wulf@rock-chips.com</email>
</author>
<published>2017-01-13T03:04:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=76b8db0d480e8045e1a1902fc9ab143b3b9ef115'/>
<id>urn:sha1:76b8db0d480e8045e1a1902fc9ab143b3b9ef115</id>
<content type='text'>
On some platforms(e.g. rk3399 board), we can call hcd_add/remove
consecutively without calling usb_put_hcd/usb_create_hcd in between,
so hcd-&gt;flags can be stale.

If the HC dies due to whatever reason then without this patch we get
the below error on next hcd_add.

[173.296154] xhci-hcd xhci-hcd.2.auto: HC died; cleaning up
[173.296209] xhci-hcd xhci-hcd.2.auto: xHCI Host Controller
[173.296762] xhci-hcd xhci-hcd.2.auto: new USB bus registered, assigned bus number 6
[173.296931] usb usb6: We don't know the algorithms for LPM for this host, disabling LPM.
[173.297179] usb usb6: New USB device found, idVendor=1d6b, idProduct=0003
[173.297203] usb usb6: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[173.297222] usb usb6: Product: xHCI Host Controller
[173.297240] usb usb6: Manufacturer: Linux 4.4.21 xhci-hcd
[173.297257] usb usb6: SerialNumber: xhci-hcd.2.auto
[173.298680] hub 6-0:1.0: USB hub found
[173.298749] hub 6-0:1.0: 1 port detected
[173.299382] rockchip-dwc3 usb@fe800000: USB HOST connected
[173.395418] hub 5-0:1.0: activate --&gt; -19
[173.603447] irq 228: nobody cared (try booting with the "irqpoll" option)
[173.603493] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.4.21 #9
[173.603513] Hardware name: Google Kevin (DT)
[173.603531] Call trace:
[173.603568] [&lt;ffffffc0002087dc&gt;] dump_backtrace+0x0/0x160
[173.603596] [&lt;ffffffc00020895c&gt;] show_stack+0x20/0x28
[173.603623] [&lt;ffffffc0004b28a8&gt;] dump_stack+0x90/0xb0
[173.603650] [&lt;ffffffc00027347c&gt;] __report_bad_irq+0x48/0xe8
[173.603674] [&lt;ffffffc0002737cc&gt;] note_interrupt+0x1e8/0x28c
[173.603698] [&lt;ffffffc000270a38&gt;] handle_irq_event_percpu+0x1d4/0x25c
[173.603722] [&lt;ffffffc000270b0c&gt;] handle_irq_event+0x4c/0x7c
[173.603748] [&lt;ffffffc00027456c&gt;] handle_fasteoi_irq+0xb4/0x124
[173.603777] [&lt;ffffffc00026fe3c&gt;] generic_handle_irq+0x30/0x44
[173.603804] [&lt;ffffffc0002701a8&gt;] __handle_domain_irq+0x90/0xbc
[173.603827] [&lt;ffffffc0002006f4&gt;] gic_handle_irq+0xcc/0x188
...
[173.604500] [&lt;ffffffc000203700&gt;] el1_irq+0x80/0xf8
[173.604530] [&lt;ffffffc000261388&gt;] cpu_startup_entry+0x38/0x3cc
[173.604558] [&lt;ffffffc00090f7d8&gt;] rest_init+0x8c/0x94
[173.604585] [&lt;ffffffc000e009ac&gt;] start_kernel+0x3d0/0x3fc
[173.604607] [&lt;0000000000b16000&gt;] 0xb16000
[173.604622] handlers:
[173.604648] [&lt;ffffffc000642084&gt;] usb_hcd_irq
[173.604673] Disabling IRQ #228

Signed-off-by: William wu &lt;wulf@rock-chips.com&gt;
Acked-by: Roger Quadros &lt;rogerq@ti.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: core: update comments for send message functions</title>
<updated>2017-01-19T09:34:40Z</updated>
<author>
<name>Jaejoong Kim</name>
<email>climbbb.kim@gmail.com</email>
</author>
<published>2017-01-18T06:19:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=123b7b30814221b007aaa47584eb2c87b4450d97'/>
<id>urn:sha1:123b7b30814221b007aaa47584eb2c87b4450d97</id>
<content type='text'>
The commonly use of bottom halves are tasklet and workqueue. The big
difference between tasklet and workqueue is that the tasklet runs in
an interrupt context and the workqueue runs in a process context,
which means it can sleep if need be.

The comment for usb_control/interrupt/bulk_msg() functions note that do
not use this function within an interrupt context, like a 'bottom half'
handler. With this comment, it makes confuse about usage of these
functions.

To more clarify, remove 'bottom half' comment.

Signed-off-by: Jaejoong Kim &lt;climbbb.kim@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
