<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/usb, branch v4.9</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.9</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.9'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2016-11-18T14:49:31Z</updated>
<entry>
<title>Merge tag 'usb-serial-4.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus</title>
<updated>2016-11-18T14:49:31Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2016-11-18T14:49:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c0da038d7afed2892346fdb9601e4fefee13a800'/>
<id>urn:sha1:c0da038d7afed2892346fdb9601e4fefee13a800</id>
<content type='text'>
Johan writes:

USB-serial fixes for v4.9-rc6

Here are a couple of new device ids.

Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'fixes-for-v4.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus</title>
<updated>2016-11-18T12:43:49Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2016-11-18T12:43:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=268200bcafe4741db27667a42e5165a02800fb02'/>
<id>urn:sha1:268200bcafe4741db27667a42e5165a02800fb02</id>
<content type='text'>
Felipe writes:

usb: fixes for v4.9-rc5

One single fix for FunctionFS to make sure we're checking
ffs_func_req_match()'s return code correctly.
</content>
</entry>
<entry>
<title>usb: gadget: f_fs: fix wrong parenthesis in ffs_func_req_match()</title>
<updated>2016-11-18T11:50:37Z</updated>
<author>
<name>Felix Hädicke</name>
<email>felixhaedicke@web.de</email>
</author>
<published>2016-11-03T23:23:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=05e78c6933d613a7da0d0473f4c19c865af04c2c'/>
<id>urn:sha1:05e78c6933d613a7da0d0473f4c19c865af04c2c</id>
<content type='text'>
Properly check the return code of ffs_func_revmap_intf() and
ffs_func_revmap_ep() for a non-negative value.

Instead of checking the return code, the comparison was performed for the last
parameter of the function calls, because of wrong parenthesis.

This also fixes the following static checker warning:
drivers/usb/gadget/function/f_fs.c:3152 ffs_func_req_match()
warn: always true condition '(((creq-&gt;wIndex)) &gt;= 0) =&gt; (0-u16max &gt;= 0)'

Reported-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Felix Hädicke &lt;felixhaedicke@web.de&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>usb: musb: Drop pointless PM runtime code for dsps glue</title>
<updated>2016-11-17T15:25:40Z</updated>
<author>
<name>Tony Lindgren</name>
<email>tony@atomide.com</email>
</author>
<published>2016-11-16T19:21:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=247529170d72ee16bbdfc94c3a696c79ea645c3a'/>
<id>urn:sha1:247529170d72ee16bbdfc94c3a696c79ea645c3a</id>
<content type='text'>
This already gets done automatically by PM runtime and we have
a separate autosuspend timeout in musb_core.c.

Reviewed-by: Johan Hovold &lt;johan@kernel.org&gt;
Tested-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Tony Lindgren &lt;tony@atomide.com&gt;
Signed-off-by: Bin Liu &lt;b-liu@ti.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: musb: Add missing pm_runtime_disable and drop 2430 PM timeout</title>
<updated>2016-11-17T15:25:39Z</updated>
<author>
<name>Tony Lindgren</name>
<email>tony@atomide.com</email>
</author>
<published>2016-11-16T19:21:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=536d599d4a5104a8f1f771d3a8db97138b0c9ebb'/>
<id>urn:sha1:536d599d4a5104a8f1f771d3a8db97138b0c9ebb</id>
<content type='text'>
We are missing pm_runtime_disable() in 2430 glue layer. Further,
we only need to enable PM runtime and disable it on exit. With
musb_core.c doing PM, the glue layer as a parent will always be
active when musb_core.c is active.

This fixes host enumeration issues with some devices as reported
by Ladislav Michl &lt;ladis@linux-mips.org&gt;.

And holding an RPM reference while deregistering the child would
lead to a crash in omap2430_runtime_suspend() which dereferences
the now freed child's driver data on put as pointed out by
Johan Hovold &lt;johan@kernel.org&gt;:

Unable to handle kernel paging request at virtual address 6b6b6f17
...
[&lt;c05453d4&gt;] (omap2430_runtime_suspend) from [&lt;c0481410&gt;]
 (pm_generic_runtime_suspend+0x3c/0x48)
[&lt;c0481410&gt;] (pm_generic_runtime_suspend) from [&lt;c0121028&gt;]
 (_od_runtime_suspend+0x1c/0x30)
[&lt;c0121028&gt;] (_od_runtime_suspend) from [&lt;c04833b0&gt;] (__rpm_callback+0x3c/0x70)
[&lt;c04833b0&gt;] (__rpm_callback) from [&lt;c0483414&gt;] (rpm_callback+0x30/0x90)
[&lt;c0483414&gt;] (rpm_callback) from [&lt;c0483984&gt;] (rpm_suspend+0x118/0x6b4)
[&lt;c0483984&gt;] (rpm_suspend) from [&lt;c04840f4&gt;] (rpm_idle+0x104/0x440)
[&lt;c04840f4&gt;] (rpm_idle) from [&lt;c04844ac&gt;] (__pm_runtime_idle+0x7c/0xb0)
[&lt;c04844ac&gt;] (__pm_runtime_idle) from [&lt;c0545458&gt;] (omap2430_remove+0x38/0x58)
[&lt;c0545458&gt;] (omap2430_remove) from [&lt;c047b2bc&gt;] (platform_drv_remove+0x34/0x4c)

Note that if changes are needed to the autosuspend timeout, it should
be done in musb_core.c.

Reported-by: Ladislav Michl &lt;ladis@linux-mips.org&gt;
Fixes: 87326e858448 ("usb: musb: Remove extra PM runtime calls from
2430 glue layer")
Tested-by: Ladislav Michl &lt;ladis@linux-mips.org&gt;
Reviewed-by: Johan Hovold &lt;johan@kernel.org&gt;
Tested-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Tony Lindgren &lt;tony@atomide.com&gt;
Signed-off-by: Bin Liu &lt;b-liu@ti.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: musb: Fix PM for hub disconnect</title>
<updated>2016-11-17T15:25:39Z</updated>
<author>
<name>Tony Lindgren</name>
<email>tony@atomide.com</email>
</author>
<published>2016-11-16T19:21:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2bff3916fda9145587c0312b6f5c43d82504980c'/>
<id>urn:sha1:2bff3916fda9145587c0312b6f5c43d82504980c</id>
<content type='text'>
With a USB hub disconnected, devctl can be 0x19 for about a second
on am335x and will stay forever on at least omap3. And we get no
further interrupts when devctl session bit clears. This keeps
PM runtime active.

Let's fix the issue by polling devctl until the session bit clears
or times out. We can do this by making musb-&gt;irq_work into
delayed_work.

And with the polling implemented, we can now also have the quirk
for invalid VBUS it to avoid disconnecting too early while VBUS
is ramping up.

Fixes: 467d5c980709 ("usb: musb: Implement session bit based runtime
PM for musb-core")
Fixes: 65b3f50ed6fa ("usb: musb: Add PM runtime support for MUSB DSPS
Tested-by: Ladislav Michl &lt;ladis@linux-mips.org&gt;
Tested-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Tony Lindgren &lt;tony@atomide.com&gt;
Signed-off-by: Bin Liu &lt;b-liu@ti.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: musb: Fix sleeping function called from invalid context for hdrc glue</title>
<updated>2016-11-17T15:25:39Z</updated>
<author>
<name>Tony Lindgren</name>
<email>tony@atomide.com</email>
</author>
<published>2016-11-16T19:21:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ea2f35c01d5ea72b43b9b4fb4c5b9417a9eb2fb8'/>
<id>urn:sha1:ea2f35c01d5ea72b43b9b4fb4c5b9417a9eb2fb8</id>
<content type='text'>
Commit 65b3f50ed6fa ("usb: musb: Add PM runtime support for MUSB DSPS
glue layer") wrongly added a call for pm_runtime_get_sync to otg_timer
that runs in softirq context. That causes a "BUG: sleeping function called
from invalid context" every time when polling the cable status:

[&lt;c015ebb4&gt;] (__might_sleep) from [&lt;c0413d60&gt;] (__pm_runtime_resume+0x9c/0xa0)
[&lt;c0413d60&gt;] (__pm_runtime_resume) from [&lt;c04d0bc4&gt;] (otg_timer+0x3c/0x254)
[&lt;c04d0bc4&gt;] (otg_timer) from [&lt;c0191180&gt;] (call_timer_fn+0xfc/0x41c)
[&lt;c0191180&gt;] (call_timer_fn) from [&lt;c01915c0&gt;] (expire_timers+0x120/0x210)
[&lt;c01915c0&gt;] (expire_timers) from [&lt;c0191acc&gt;] (run_timer_softirq+0xa4/0xdc)
[&lt;c0191acc&gt;] (run_timer_softirq) from [&lt;c010168c&gt;] (__do_softirq+0x12c/0x594)

I did not notice that as I did not have CONFIG_DEBUG_ATOMIC_SLEEP enabled.
And looks like also musb_gadget_queue() suffers from the same problem.

Let's fix the issue by using a list of delayed work then call it on
resume. Note that we want to do this only when musb core and it's
parent devices are awake, and we need to make sure the DSPS glue
timer is stopped as noted by Johan Hovold &lt;johan@kernel.org&gt;.
Note that we already are re-enabling the timer with mod_timer() in
dsps_musb_enable().

Later on we may be able to remove other delayed work in the musb driver
and just do it from pending_resume_work. But this should be done only
for delayed work that does not have other timing requirements beyond
just being run on resume.

Fixes: 65b3f50ed6fa ("usb: musb: Add PM runtime support for MUSB DSPS
glue layer")
Reported-by: Johan Hovold &lt;johan@kernel.org&gt;
Reviewed-by: Johan Hovold &lt;johan@kernel.org&gt;
Tested-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Tony Lindgren &lt;tony@atomide.com&gt;
Signed-off-by: Bin Liu &lt;b-liu@ti.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: musb: Fix broken use of static variable for multiple instances</title>
<updated>2016-11-17T15:25:39Z</updated>
<author>
<name>Tony Lindgren</name>
<email>tony@atomide.com</email>
</author>
<published>2016-11-16T19:21:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c723bd6ec2b50e7c8b3424d9cb8febd8ffa3da1f'/>
<id>urn:sha1:c723bd6ec2b50e7c8b3424d9cb8febd8ffa3da1f</id>
<content type='text'>
We can't use static variable first for checking when musb is
initialized when we have multiple musb instances like on am335x.

Tested-by: Ladislav Michl &lt;ladis@linux-mips.org&gt;
Reviewed-by: Johan Hovold &lt;johan@hovoldconsulting.com&gt;
Tested-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Tony Lindgren &lt;tony@atomide.com&gt;
Signed-off-by: Bin Liu &lt;b-liu@ti.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>USB: serial: cp210x: add ID for the Zone DPMX</title>
<updated>2016-11-16T16:09:06Z</updated>
<author>
<name>Paul Jakma</name>
<email>paul@jakma.org</email>
</author>
<published>2016-11-16T10:13:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2ab13292d7a314fa45de0acc808e41aaad31989c'/>
<id>urn:sha1:2ab13292d7a314fa45de0acc808e41aaad31989c</id>
<content type='text'>
The BRIM Brothers Zone DPMX is a bicycle powermeter. This ID is for the USB
serial interface in its charging dock for the control pods, via which some
settings for the pods can be modified.

Signed-off-by: Paul Jakma &lt;paul@jakma.org&gt;
Cc: Barry Redmond &lt;barry@brimbrothers.com&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
</content>
</entry>
<entry>
<title>usb: chipidea: move the lock initialization to core file</title>
<updated>2016-11-15T18:25:25Z</updated>
<author>
<name>Peter Chen</name>
<email>peter.chen@nxp.com</email>
</author>
<published>2016-11-15T10:05:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a5d906bb261cde5f881a949d3b0fbaa285dcc574'/>
<id>urn:sha1:a5d906bb261cde5f881a949d3b0fbaa285dcc574</id>
<content type='text'>
This can fix below dump when the lock is accessed at host
mode due to it is not initialized.

[   46.119638] INFO: trying to register non-static key.
[   46.124643] the code is fine but needs lockdep annotation.
[   46.130144] turning off the locking correctness validator.
[   46.135659] CPU: 0 PID: 690 Comm: cat Not tainted 4.9.0-rc3-00079-g4b75f1d #1210
[   46.143075] Hardware name: Freescale i.MX6 SoloX (Device Tree)
[   46.148923] Backtrace:
[   46.151448] [&lt;c010c460&gt;] (dump_backtrace) from [&lt;c010c658&gt;] (show_stack+0x18/0x1c)
[   46.159038]  r7:edf52000
[   46.161412]  r6:60000193
[   46.163967]  r5:00000000
[   46.165035]  r4:c0e25c2c

[   46.169109] [&lt;c010c640&gt;] (show_stack) from [&lt;c03f58a4&gt;] (dump_stack+0xb4/0xe8)
[   46.176362] [&lt;c03f57f0&gt;] (dump_stack) from [&lt;c016d690&gt;] (register_lock_class+0x4fc/0x56c)
[   46.184554]  r10:c0e25d24
[   46.187014]  r9:edf53e70
[   46.189569]  r8:c1642444
[   46.190637]  r7:ee9da024
[   46.193191]  r6:00000000
[   46.194258]  r5:00000000
[   46.196812]  r4:00000000
[   46.199185]  r3:00000001

[   46.203259] [&lt;c016d194&gt;] (register_lock_class) from [&lt;c0171294&gt;] (__lock_acquire+0x80/0x10f0)
[   46.211797]  r10:c0e25d24
[   46.214257]  r9:edf53e70
[   46.216813]  r8:ee9da024
[   46.217880]  r7:c1642444
[   46.220435]  r6:edcd1800
[   46.221502]  r5:60000193
[   46.224057]  r4:00000000

[   46.227953] [&lt;c0171214&gt;] (__lock_acquire) from [&lt;c01726c0&gt;] (lock_acquire+0x74/0x94)
[   46.235710]  r10:00000001
[   46.238169]  r9:edf53e70
[   46.240723]  r8:edf53f80
[   46.241790]  r7:00000001
[   46.244344]  r6:00000001
[   46.245412]  r5:60000193
[   46.247966]  r4:00000000

[   46.251866] [&lt;c017264c&gt;] (lock_acquire) from [&lt;c096c8fc&gt;] (_raw_spin_lock_irqsave+0x40/0x54)
[   46.260319]  r7:ee1c6a00
[   46.262691]  r6:c062a570
[   46.265247]  r5:20000113
[   46.266314]  r4:ee9da014

[   46.270393] [&lt;c096c8bc&gt;] (_raw_spin_lock_irqsave) from [&lt;c062a570&gt;] (ci_port_test_show+0x2c/0x70)
[   46.279280]  r6:eebd2000
[   46.281652]  r5:ee9da010
[   46.284207]  r4:ee9da014

[   46.286810] [&lt;c062a544&gt;] (ci_port_test_show) from [&lt;c0248d04&gt;] (seq_read+0x1ac/0x4f8)
[   46.294655]  r9:edf53e70
[   46.297028]  r8:edf53f80
[   46.299583]  r7:ee1c6a00
[   46.300650]  r6:00000001
[   46.303205]  r5:00000000
[   46.304273]  r4:eebd2000
[   46.306850] [&lt;c0248b58&gt;] (seq_read) from [&lt;c039e864&gt;] (full_proxy_read+0x54/0x6c)
[   46.314348]  r10:00000000
[   46.316808]  r9:c0a6ad30
[   46.319363]  r8:edf53f80
[   46.320430]  r7:00020000
[   46.322986]  r6:b6de3000
[   46.324053]  r5:ee1c6a00
[   46.326607]  r4:c0248b58

[   46.330505] [&lt;c039e810&gt;] (full_proxy_read) from [&lt;c021ec98&gt;] (__vfs_read+0x34/0x118)
[   46.338262]  r9:edf52000
[   46.340635]  r8:c0107fc4
[   46.343190]  r7:00020000
[   46.344257]  r6:edf53f80
[   46.346812]  r5:c039e810
[   46.347879]  r4:ee1c6a00
[   46.350447] [&lt;c021ec64&gt;] (__vfs_read) from [&lt;c021fbd0&gt;] (vfs_read+0x8c/0x11c)
[   46.357597]  r9:edf52000
[   46.359969]  r8:c0107fc4
[   46.362524]  r7:edf53f80
[   46.363592]  r6:b6de3000
[   46.366147]  r5:ee1c6a00
[   46.367214]  r4:00020000
[   46.369782] [&lt;c021fb44&gt;] (vfs_read) from [&lt;c0220a4c&gt;] (SyS_read+0x4c/0xa8)
[   46.376672]  r8:c0107fc4
[   46.379045]  r7:00020000
[   46.381600]  r6:b6de3000
[   46.382667]  r5:ee1c6a00
[   46.385222]  r4:ee1c6a00

[   46.387817] [&lt;c0220a00&gt;] (SyS_read) from [&lt;c0107e20&gt;] (ret_fast_syscall+0x0/0x1c)
[   46.395314]  r7:00000003
[   46.397687]  r6:b6de3000
[   46.400243]  r5:00020000
[   46.401310]  r4:00020000

Cc: &lt;stable@vger.kernel.org&gt;
Fixes: 26c696c678c4 ("USB: Chipidea: rename struct
	       	ci13xxx variables from udc to ci")
Signed-off-by: Peter Chen &lt;peter.chen@nxp.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
