<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/usb/chipidea, branch v4.4.73</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>usb: chipidea: debug: check before accessing ci_role</title>
<updated>2017-06-14T11:16:22+00:00</updated>
<author>
<name>Michael Thalmeier</name>
<email>michael.thalmeier@hale.at</email>
</author>
<published>2017-05-18T14:14:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=bd2e8f0a72c5608625f9501c07d446f9a48daf7e'/>
<id>bd2e8f0a72c5608625f9501c07d446f9a48daf7e</id>
<content type='text'>
commit 0340ff83cd4475261e7474033a381bc125b45244 upstream.

ci_role BUGs when the role is &gt;= CI_ROLE_END.

Signed-off-by: Michael Thalmeier &lt;michael.thalmeier@hale.at&gt;
Signed-off-by: Peter Chen &lt;peter.chen@nxp.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 0340ff83cd4475261e7474033a381bc125b45244 upstream.

ci_role BUGs when the role is &gt;= CI_ROLE_END.

Signed-off-by: Michael Thalmeier &lt;michael.thalmeier@hale.at&gt;
Signed-off-by: Peter Chen &lt;peter.chen@nxp.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>usb: chipidea: udc: fix NULL pointer dereference if udc_start failed</title>
<updated>2017-06-14T11:16:22+00:00</updated>
<author>
<name>Jisheng Zhang</name>
<email>jszhang@marvell.com</email>
</author>
<published>2017-04-24T12:35:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=942dcb0ffa9d459af821167bd7cce94415e8278a'/>
<id>942dcb0ffa9d459af821167bd7cce94415e8278a</id>
<content type='text'>
commit aa1f058d7d9244423b8c5a75b9484b1115df7f02 upstream.

Fix below NULL pointer dereference. we set ci-&gt;roles[CI_ROLE_GADGET]
too early in ci_hdrc_gadget_init(), if udc_start() fails due to some
reason, the ci-&gt;roles[CI_ROLE_GADGET] check in  ci_hdrc_gadget_destroy
can't protect us.

We fix this issue by only setting ci-&gt;roles[CI_ROLE_GADGET] if
udc_start() succeed.

[    1.398550] Unable to handle kernel NULL pointer dereference at
virtual address 00000000
...
[    1.448600] PC is at dma_pool_free+0xb8/0xf0
[    1.453012] LR is at dma_pool_free+0x28/0xf0
[    2.113369] [&lt;ffffff80081817d8&gt;] dma_pool_free+0xb8/0xf0
[    2.118857] [&lt;ffffff800841209c&gt;] destroy_eps+0x4c/0x68
[    2.124165] [&lt;ffffff8008413770&gt;] ci_hdrc_gadget_destroy+0x28/0x50
[    2.130461] [&lt;ffffff800840fa30&gt;] ci_hdrc_probe+0x588/0x7e8
[    2.136129] [&lt;ffffff8008380fb8&gt;] platform_drv_probe+0x50/0xb8
[    2.142066] [&lt;ffffff800837f494&gt;] driver_probe_device+0x1fc/0x2a8
[    2.148270] [&lt;ffffff800837f68c&gt;] __device_attach_driver+0x9c/0xf8
[    2.154563] [&lt;ffffff800837d570&gt;] bus_for_each_drv+0x58/0x98
[    2.160317] [&lt;ffffff800837f174&gt;] __device_attach+0xc4/0x138
[    2.166072] [&lt;ffffff800837f738&gt;] device_initial_probe+0x10/0x18
[    2.172185] [&lt;ffffff800837e58c&gt;] bus_probe_device+0x94/0xa0
[    2.177940] [&lt;ffffff800837c560&gt;] device_add+0x3f0/0x560
[    2.183337] [&lt;ffffff8008380d20&gt;] platform_device_add+0x180/0x240
[    2.189541] [&lt;ffffff800840f0e8&gt;] ci_hdrc_add_device+0x440/0x4f8
[    2.195654] [&lt;ffffff8008414194&gt;] ci_hdrc_usb2_probe+0x13c/0x2d8
[    2.201769] [&lt;ffffff8008380fb8&gt;] platform_drv_probe+0x50/0xb8
[    2.207705] [&lt;ffffff800837f494&gt;] driver_probe_device+0x1fc/0x2a8
[    2.213910] [&lt;ffffff800837f5ec&gt;] __driver_attach+0xac/0xb0
[    2.219575] [&lt;ffffff800837d4b0&gt;] bus_for_each_dev+0x60/0xa0
[    2.225329] [&lt;ffffff800837ec80&gt;] driver_attach+0x20/0x28
[    2.230816] [&lt;ffffff800837e880&gt;] bus_add_driver+0x1d0/0x238
[    2.236571] [&lt;ffffff800837fdb0&gt;] driver_register+0x60/0xf8
[    2.242237] [&lt;ffffff8008380ef4&gt;] __platform_driver_register+0x44/0x50
[    2.248891] [&lt;ffffff80086fd440&gt;] ci_hdrc_usb2_driver_init+0x18/0x20
[    2.255365] [&lt;ffffff8008082950&gt;] do_one_initcall+0x38/0x128
[    2.261121] [&lt;ffffff80086e0d00&gt;] kernel_init_freeable+0x1ac/0x250
[    2.267414] [&lt;ffffff800852f0b8&gt;] kernel_init+0x10/0x100
[    2.272810] [&lt;ffffff8008082680&gt;] ret_from_fork+0x10/0x50

Fixes: 3f124d233e97 ("usb: chipidea: add role init and destroy APIs")
Signed-off-by: Jisheng Zhang &lt;jszhang@marvell.com&gt;
Signed-off-by: Peter Chen &lt;peter.chen@nxp.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit aa1f058d7d9244423b8c5a75b9484b1115df7f02 upstream.

Fix below NULL pointer dereference. we set ci-&gt;roles[CI_ROLE_GADGET]
too early in ci_hdrc_gadget_init(), if udc_start() fails due to some
reason, the ci-&gt;roles[CI_ROLE_GADGET] check in  ci_hdrc_gadget_destroy
can't protect us.

We fix this issue by only setting ci-&gt;roles[CI_ROLE_GADGET] if
udc_start() succeed.

[    1.398550] Unable to handle kernel NULL pointer dereference at
virtual address 00000000
...
[    1.448600] PC is at dma_pool_free+0xb8/0xf0
[    1.453012] LR is at dma_pool_free+0x28/0xf0
[    2.113369] [&lt;ffffff80081817d8&gt;] dma_pool_free+0xb8/0xf0
[    2.118857] [&lt;ffffff800841209c&gt;] destroy_eps+0x4c/0x68
[    2.124165] [&lt;ffffff8008413770&gt;] ci_hdrc_gadget_destroy+0x28/0x50
[    2.130461] [&lt;ffffff800840fa30&gt;] ci_hdrc_probe+0x588/0x7e8
[    2.136129] [&lt;ffffff8008380fb8&gt;] platform_drv_probe+0x50/0xb8
[    2.142066] [&lt;ffffff800837f494&gt;] driver_probe_device+0x1fc/0x2a8
[    2.148270] [&lt;ffffff800837f68c&gt;] __device_attach_driver+0x9c/0xf8
[    2.154563] [&lt;ffffff800837d570&gt;] bus_for_each_drv+0x58/0x98
[    2.160317] [&lt;ffffff800837f174&gt;] __device_attach+0xc4/0x138
[    2.166072] [&lt;ffffff800837f738&gt;] device_initial_probe+0x10/0x18
[    2.172185] [&lt;ffffff800837e58c&gt;] bus_probe_device+0x94/0xa0
[    2.177940] [&lt;ffffff800837c560&gt;] device_add+0x3f0/0x560
[    2.183337] [&lt;ffffff8008380d20&gt;] platform_device_add+0x180/0x240
[    2.189541] [&lt;ffffff800840f0e8&gt;] ci_hdrc_add_device+0x440/0x4f8
[    2.195654] [&lt;ffffff8008414194&gt;] ci_hdrc_usb2_probe+0x13c/0x2d8
[    2.201769] [&lt;ffffff8008380fb8&gt;] platform_drv_probe+0x50/0xb8
[    2.207705] [&lt;ffffff800837f494&gt;] driver_probe_device+0x1fc/0x2a8
[    2.213910] [&lt;ffffff800837f5ec&gt;] __driver_attach+0xac/0xb0
[    2.219575] [&lt;ffffff800837d4b0&gt;] bus_for_each_dev+0x60/0xa0
[    2.225329] [&lt;ffffff800837ec80&gt;] driver_attach+0x20/0x28
[    2.230816] [&lt;ffffff800837e880&gt;] bus_add_driver+0x1d0/0x238
[    2.236571] [&lt;ffffff800837fdb0&gt;] driver_register+0x60/0xf8
[    2.242237] [&lt;ffffff8008380ef4&gt;] __platform_driver_register+0x44/0x50
[    2.248891] [&lt;ffffff80086fd440&gt;] ci_hdrc_usb2_driver_init+0x18/0x20
[    2.255365] [&lt;ffffff8008082950&gt;] do_one_initcall+0x38/0x128
[    2.261121] [&lt;ffffff80086e0d00&gt;] kernel_init_freeable+0x1ac/0x250
[    2.267414] [&lt;ffffff800852f0b8&gt;] kernel_init+0x10/0x100
[    2.272810] [&lt;ffffff8008082680&gt;] ret_from_fork+0x10/0x50

Fixes: 3f124d233e97 ("usb: chipidea: add role init and destroy APIs")
Signed-off-by: Jisheng Zhang &lt;jszhang@marvell.com&gt;
Signed-off-by: Peter Chen &lt;peter.chen@nxp.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>usb: chipidea: Handle extcon events properly</title>
<updated>2017-05-14T11:32:56+00:00</updated>
<author>
<name>Stephen Boyd</name>
<email>stephen.boyd@linaro.org</email>
</author>
<published>2016-12-28T22:56:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2428776eb1e60acf636a48a76acd8a27ccf92aa8'/>
<id>2428776eb1e60acf636a48a76acd8a27ccf92aa8</id>
<content type='text'>
commit a89b94b53371bbfa582787c2fa3378000ea4263d upstream.

We're currently emulating the vbus and id interrupts in the OTGSC
read API, but we also need to make sure that if we're handling
the events with extcon that we don't enable the interrupts for
those events in the hardware. Therefore, properly emulate this
register if we're using extcon, but don't enable the interrupts.
This allows me to get my cable connect/disconnect working
properly without getting spurious interrupts on my device that
uses an extcon for these two events.

Acked-by: Peter Chen &lt;peter.chen@nxp.com&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: "Ivan T. Ivanov" &lt;iivanov.xz@gmail.com&gt;
Fixes: 3ecb3e09b042 ("usb: chipidea: Use extcon framework for VBUS and ID detect")
Signed-off-by: Stephen Boyd &lt;stephen.boyd@linaro.org&gt;
Signed-off-by: Peter Chen &lt;peter.chen@nxp.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit a89b94b53371bbfa582787c2fa3378000ea4263d upstream.

We're currently emulating the vbus and id interrupts in the OTGSC
read API, but we also need to make sure that if we're handling
the events with extcon that we don't enable the interrupts for
those events in the hardware. Therefore, properly emulate this
register if we're using extcon, but don't enable the interrupts.
This allows me to get my cable connect/disconnect working
properly without getting spurious interrupts on my device that
uses an extcon for these two events.

Acked-by: Peter Chen &lt;peter.chen@nxp.com&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: "Ivan T. Ivanov" &lt;iivanov.xz@gmail.com&gt;
Fixes: 3ecb3e09b042 ("usb: chipidea: Use extcon framework for VBUS and ID detect")
Signed-off-by: Stephen Boyd &lt;stephen.boyd@linaro.org&gt;
Signed-off-by: Peter Chen &lt;peter.chen@nxp.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>usb: chipidea: Only read/write OTGSC from one place</title>
<updated>2017-05-14T11:32:56+00:00</updated>
<author>
<name>Stephen Boyd</name>
<email>stephen.boyd@linaro.org</email>
</author>
<published>2016-12-28T22:56:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=4cf7ba56277dec5ab0e7d3ce45c140fe465bc34b'/>
<id>4cf7ba56277dec5ab0e7d3ce45c140fe465bc34b</id>
<content type='text'>
commit f60f8ccd54e03c1afafb2b20ceb029a0eaf7a134 upstream.

With the id and vbus detection done via extcon we need to make
sure we poll the status of OTGSC properly by considering what the
extcon is saying, and not just what the register is saying. Let's
move this hw_wait_reg() function to the only place it's used and
simplify it for polling the OTGSC register. Then we can make
certain we only use the hw_read_otgsc() API to read OTGSC, which
will make sure we properly handle extcon events.

Acked-by: Peter Chen &lt;peter.chen@nxp.com&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: "Ivan T. Ivanov" &lt;iivanov.xz@gmail.com&gt;
Fixes: 3ecb3e09b042 ("usb: chipidea: Use extcon framework for VBUS and ID detect")
Signed-off-by: Stephen Boyd &lt;stephen.boyd@linaro.org&gt;
Signed-off-by: Peter Chen &lt;peter.chen@nxp.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit f60f8ccd54e03c1afafb2b20ceb029a0eaf7a134 upstream.

With the id and vbus detection done via extcon we need to make
sure we poll the status of OTGSC properly by considering what the
extcon is saying, and not just what the register is saying. Let's
move this hw_wait_reg() function to the only place it's used and
simplify it for polling the OTGSC register. Then we can make
certain we only use the hw_read_otgsc() API to read OTGSC, which
will make sure we properly handle extcon events.

Acked-by: Peter Chen &lt;peter.chen@nxp.com&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: "Ivan T. Ivanov" &lt;iivanov.xz@gmail.com&gt;
Fixes: 3ecb3e09b042 ("usb: chipidea: Use extcon framework for VBUS and ID detect")
Signed-off-by: Stephen Boyd &lt;stephen.boyd@linaro.org&gt;
Signed-off-by: Peter Chen &lt;peter.chen@nxp.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "usb: chipidea: imx: enable CI_HDRC_SET_NON_ZERO_TTHA"</title>
<updated>2017-02-26T10:07:51+00:00</updated>
<author>
<name>Peter Chen</name>
<email>peter.chen@nxp.com</email>
</author>
<published>2016-01-29T08:47:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e0913cc300c735a858b9a28c909f9661625cd822'/>
<id>e0913cc300c735a858b9a28c909f9661625cd822</id>
<content type='text'>
commit 1bc7da87c7410c6990c3251589e3854e64c55af2 upstream.

This reverts commit e765bfb73ff7.

In the most of cases, we only use one transaction per frame and the
frame rate may be high, If the platforms want to support multiple
transactions but less frame rate cases like [1] and [2], it can set
"non-zero-ttctrl-ttha" at dts.

[1] http://www.spinics.net/lists/linux-usb/msg123125.html
[2] http://www.spinics.net/lists/linux-usb/msg118679.html

Signed-off-by: Peter Chen &lt;peter.chen@nxp.com&gt;
Cc: Martin Fuzzey &lt;mfuzzey@parkeon.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 1bc7da87c7410c6990c3251589e3854e64c55af2 upstream.

This reverts commit e765bfb73ff7.

In the most of cases, we only use one transaction per frame and the
frame rate may be high, If the platforms want to support multiple
transactions but less frame rate cases like [1] and [2], it can set
"non-zero-ttctrl-ttha" at dts.

[1] http://www.spinics.net/lists/linux-usb/msg123125.html
[2] http://www.spinics.net/lists/linux-usb/msg118679.html

Signed-off-by: Peter Chen &lt;peter.chen@nxp.com&gt;
Cc: Martin Fuzzey &lt;mfuzzey@parkeon.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>usb: chipidea: move the lock initialization to core file</title>
<updated>2016-12-02T08:09:00+00:00</updated>
<author>
<name>Peter Chen</name>
<email>peter.chen@nxp.com</email>
</author>
<published>2016-11-15T10:05:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=55d061bf9d23bb8c5ada8c4f00b083894a146f2c'/>
<id>55d061bf9d23bb8c5ada8c4f00b083894a146f2c</id>
<content type='text'>
commit a5d906bb261cde5f881a949d3b0fbaa285dcc574 upstream.

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

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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit a5d906bb261cde5f881a949d3b0fbaa285dcc574 upstream.

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

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;

</pre>
</div>
</content>
</entry>
<entry>
<title>usb: chipidea: udc: fix NULL ptr dereference in isr_setup_status_phase</title>
<updated>2016-09-24T08:07:39+00:00</updated>
<author>
<name>Clemens Gruber</name>
<email>clemens.gruber@pqgruber.com</email>
</author>
<published>2016-09-05T17:29:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=34e255a63b415fbcb36190b9e4f2a24a846cd1fe'/>
<id>34e255a63b415fbcb36190b9e4f2a24a846cd1fe</id>
<content type='text'>
commit 6f3c4fb6d05e63c9c6d8968302491c3a5457be61 upstream.

Problems with the signal integrity of the high speed USB data lines or
noise on reference ground lines can cause the i.MX6 USB controller to
violate USB specs and exhibit unexpected behavior.

It was observed that USBi_UI interrupts were triggered first and when
isr_setup_status_phase was called, ci-&gt;status was NULL, which lead to a
NULL pointer dereference kernel panic.

This patch fixes the kernel panic, emits a warning once and returns
-EPIPE to halt the device and let the host get stalled.
It also adds a comment to point people, who are experiencing this issue,
to their USB hardware design.

Signed-off-by: Clemens Gruber &lt;clemens.gruber@pqgruber.com&gt;
Signed-off-by: Peter Chen &lt;peter.chen@nxp.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 6f3c4fb6d05e63c9c6d8968302491c3a5457be61 upstream.

Problems with the signal integrity of the high speed USB data lines or
noise on reference ground lines can cause the i.MX6 USB controller to
violate USB specs and exhibit unexpected behavior.

It was observed that USBi_UI interrupts were triggered first and when
isr_setup_status_phase was called, ci-&gt;status was NULL, which lead to a
NULL pointer dereference kernel panic.

This patch fixes the kernel panic, emits a warning once and returns
-EPIPE to halt the device and let the host get stalled.
It also adds a comment to point people, who are experiencing this issue,
to their USB hardware design.

Signed-off-by: Clemens Gruber &lt;clemens.gruber@pqgruber.com&gt;
Signed-off-by: Peter Chen &lt;peter.chen@nxp.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>usb: chipidea: udc: don't touch DP when controller is in host mode</title>
<updated>2016-09-07T06:32:44+00:00</updated>
<author>
<name>Li Jun</name>
<email>jun.li@nxp.com</email>
</author>
<published>2016-08-16T11:19:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=8136b595bfa36a09a6e1b357f280d368df3d1cc5'/>
<id>8136b595bfa36a09a6e1b357f280d368df3d1cc5</id>
<content type='text'>
commit c4e94174983a86c935be1537a73e496b778b0287 upstream.

When the controller is configured to be dual role and it's in host mode,
if bind udc and gadgt driver, those gadget operations will do gadget
disconnect and finally pull down DP line, which will break host function.

Signed-off-by: Li Jun &lt;jun.li@nxp.com&gt;
Signed-off-by: Peter Chen &lt;peter.chen@nxp.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit c4e94174983a86c935be1537a73e496b778b0287 upstream.

When the controller is configured to be dual role and it's in host mode,
if bind udc and gadgt driver, those gadget operations will do gadget
disconnect and finally pull down DP line, which will break host function.

Signed-off-by: Li Jun &lt;jun.li@nxp.com&gt;
Signed-off-by: Peter Chen &lt;peter.chen@nxp.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>usb: chipidea: otg: change workqueue ci_otg as freezable</title>
<updated>2016-03-09T23:34:55+00:00</updated>
<author>
<name>Peter Chen</name>
<email>peter.chen@nxp.com</email>
</author>
<published>2016-02-24T03:05:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0ba460a5fd15673ad895a8fc51d378eb30f1922b'/>
<id>0ba460a5fd15673ad895a8fc51d378eb30f1922b</id>
<content type='text'>
commit d144dfea8af7108f613139623e63952ed7e69c0c upstream.

If we use USB ID pin as wakeup source, and there is a USB block
device on this USB OTG (ID) cable, the system will be deadlock
after system resume.

The root cause for this problem is: the workqueue ci_otg may try
to remove hcd before the driver resume has finished, and hcd will
disconnect the device on it, then, it will call device_release_driver,
and holds the device lock "dev-&gt;mutex", but it is never unlocked since
it waits workqueue writeback to run to flush the block information, but
the workqueue writeback is freezable, it is not thawed before driver
resume has finished.

When the driver (device: sd 0:0:0:0:) resume goes to dpm_complete, it
tries to get its device lock "dev-&gt;mutex", but it can't get it forever,
then the deadlock occurs. Below call stacks show the situation.

So, in order to fix this problem, we need to change workqueue ci_otg
as freezable, then the work item in this workqueue will be run after
driver's resume, this workqueue will not be blocked forever like above
case since the workqueue writeback has been thawed too.

Tested at: i.mx6qdl-sabresd and i.mx6sx-sdb.

[  555.178869] kworker/u2:13   D c07de74c     0   826      2 0x00000000
[  555.185310] Workqueue: ci_otg ci_otg_work
[  555.189353] Backtrace:
[  555.191849] [&lt;c07de4fc&gt;] (__schedule) from [&lt;c07dec6c&gt;] (schedule+0x48/0xa0)
[  555.198912]  r10:ee471ba0 r9:00000000 r8:00000000 r7:00000002 r6:ee470000 r5:ee471ba4
[  555.206867]  r4:ee470000
[  555.209453] [&lt;c07dec24&gt;] (schedule) from [&lt;c07e2fc4&gt;] (schedule_timeout+0x15c/0x1e0)
[  555.217212]  r4:7fffffff r3:edc2b000
[  555.220862] [&lt;c07e2e68&gt;] (schedule_timeout) from [&lt;c07df6c8&gt;] (wait_for_common+0x94/0x144)
[  555.229140]  r8:00000000 r7:00000002 r6:ee470000 r5:ee471ba4 r4:7fffffff
[  555.235980] [&lt;c07df634&gt;] (wait_for_common) from [&lt;c07df790&gt;] (wait_for_completion+0x18/0x1c)
[  555.244430]  r10:00000001 r9:c0b5563c r8:c0042e48 r7:ef086000 r6:eea4372c r5:ef131b00
[  555.252383]  r4:00000000
[  555.254970] [&lt;c07df778&gt;] (wait_for_completion) from [&lt;c0043cb8&gt;] (flush_work+0x19c/0x234)
[  555.263177] [&lt;c0043b1c&gt;] (flush_work) from [&lt;c0043fac&gt;] (flush_delayed_work+0x48/0x4c)
[  555.271106]  r8:ed5b5000 r7:c0b38a3c r6:eea439cc r5:eea4372c r4:eea4372c
[  555.277958] [&lt;c0043f64&gt;] (flush_delayed_work) from [&lt;c00eae18&gt;] (bdi_unregister+0x84/0xec)
[  555.286236]  r4:eea43520 r3:20000153
[  555.289885] [&lt;c00ead94&gt;] (bdi_unregister) from [&lt;c02c2154&gt;] (blk_cleanup_queue+0x180/0x29c)
[  555.298250]  r5:eea43808 r4:eea43400
[  555.301909] [&lt;c02c1fd4&gt;] (blk_cleanup_queue) from [&lt;c0417914&gt;] (__scsi_remove_device+0x48/0xb8)
[  555.310623]  r7:00000000 r6:20000153 r5:ededa950 r4:ededa800
[  555.316403] [&lt;c04178cc&gt;] (__scsi_remove_device) from [&lt;c0415e90&gt;] (scsi_forget_host+0x64/0x68)
[  555.325028]  r5:ededa800 r4:ed5b5000
[  555.328689] [&lt;c0415e2c&gt;] (scsi_forget_host) from [&lt;c0409828&gt;] (scsi_remove_host+0x78/0x104)
[  555.337054]  r5:ed5b5068 r4:ed5b5000
[  555.340709] [&lt;c04097b0&gt;] (scsi_remove_host) from [&lt;c04cdfcc&gt;] (usb_stor_disconnect+0x50/0xb4)
[  555.349247]  r6:ed5b56e4 r5:ed5b5818 r4:ed5b5690 r3:00000008
[  555.355025] [&lt;c04cdf7c&gt;] (usb_stor_disconnect) from [&lt;c04b3bc8&gt;] (usb_unbind_interface+0x78/0x25c)
[  555.363997]  r8:c13919b4 r7:edd3c000 r6:edd3c020 r5:ee551c68 r4:ee551c00 r3:c04cdf7c
[  555.371892] [&lt;c04b3b50&gt;] (usb_unbind_interface) from [&lt;c03dc248&gt;] (__device_release_driver+0x8c/0x118)
[  555.381213]  r10:00000001 r9:edd90c00 r8:c13919b4 r7:ee551c68 r6:c0b546e0 r5:c0b5563c
[  555.389167]  r4:edd3c020
[  555.391752] [&lt;c03dc1bc&gt;] (__device_release_driver) from [&lt;c03dc2fc&gt;] (device_release_driver+0x28/0x34)
[  555.401071]  r5:edd3c020 r4:edd3c054
[  555.404721] [&lt;c03dc2d4&gt;] (device_release_driver) from [&lt;c03db304&gt;] (bus_remove_device+0xe0/0x110)
[  555.413607]  r5:edd3c020 r4:ef17f04c
[  555.417253] [&lt;c03db224&gt;] (bus_remove_device) from [&lt;c03d8128&gt;] (device_del+0x114/0x21c)
[  555.425270]  r6:edd3c028 r5:edd3c020 r4:ee551c00 r3:00000000
[  555.431045] [&lt;c03d8014&gt;] (device_del) from [&lt;c04b1560&gt;] (usb_disable_device+0xa4/0x1e8)
[  555.439061]  r8:edd3c000 r7:eded8000 r6:00000000 r5:00000001 r4:ee551c00
[  555.445906] [&lt;c04b14bc&gt;] (usb_disable_device) from [&lt;c04a8e54&gt;] (usb_disconnect+0x74/0x224)
[  555.454271]  r9:edd90c00 r8:ee551000 r7:ee551c68 r6:ee551c9c r5:ee551c00 r4:00000001
[  555.462156] [&lt;c04a8de0&gt;] (usb_disconnect) from [&lt;c04a8fb8&gt;] (usb_disconnect+0x1d8/0x224)
[  555.470259]  r10:00000001 r9:edd90000 r8:ee471e2c r7:ee551468 r6:ee55149c r5:ee551400
[  555.478213]  r4:00000001
[  555.480797] [&lt;c04a8de0&gt;] (usb_disconnect) from [&lt;c04ae5ec&gt;] (usb_remove_hcd+0xa0/0x1ac)
[  555.488813]  r10:00000001 r9:ee471eb0 r8:00000000 r7:ef3d9500 r6:eded810c r5:eded80b0
[  555.496765]  r4:eded8000
[  555.499351] [&lt;c04ae54c&gt;] (usb_remove_hcd) from [&lt;c04d4158&gt;] (host_stop+0x28/0x64)
[  555.506847]  r6:eeb50010 r5:eded8000 r4:eeb51010
[  555.511563] [&lt;c04d4130&gt;] (host_stop) from [&lt;c04d09b8&gt;] (ci_otg_work+0xc4/0x124)
[  555.518885]  r6:00000001 r5:eeb50010 r4:eeb502a0 r3:c04d4130
[  555.524665] [&lt;c04d08f4&gt;] (ci_otg_work) from [&lt;c00454f0&gt;] (process_one_work+0x194/0x420)
[  555.532682]  r6:ef086000 r5:eeb502a0 r4:edc44480
[  555.537393] [&lt;c004535c&gt;] (process_one_work) from [&lt;c00457b0&gt;] (worker_thread+0x34/0x514)
[  555.545496]  r10:edc44480 r9:ef086000 r8:c0b1a100 r7:ef086034 r6:00000088 r5:edc44498
[  555.553450]  r4:ef086000
[  555.556032] [&lt;c004577c&gt;] (worker_thread) from [&lt;c004bab4&gt;] (kthread+0xdc/0xf8)
[  555.563268]  r10:00000000 r9:00000000 r8:00000000 r7:c004577c r6:edc44480 r5:eddc15c0
[  555.571221]  r4:00000000
[  555.573804] [&lt;c004b9d8&gt;] (kthread) from [&lt;c000fef0&gt;] (ret_from_fork+0x14/0x24)
[  555.581040]  r7:00000000 r6:00000000 r5:c004b9d8 r4:eddc15c0

[  553.429383] sh              D c07de74c     0   694    691 0x00000000
[  553.435801] Backtrace:
[  553.438295] [&lt;c07de4fc&gt;] (__schedule) from [&lt;c07dec6c&gt;] (schedule+0x48/0xa0)
[  553.445358]  r10:edd3c054 r9:edd3c078 r8:edddbd50 r7:edcbbc00 r6:c1377c34 r5:60000153
[  553.453313]  r4:eddda000
[  553.455896] [&lt;c07dec24&gt;] (schedule) from [&lt;c07deff8&gt;] (schedule_preempt_disabled+0x10/0x14)
[  553.464261]  r4:edd3c058 r3:0000000a
[  553.467910] [&lt;c07defe8&gt;] (schedule_preempt_disabled) from [&lt;c07e0bbc&gt;] (mutex_lock_nested+0x1a0/0x3e8)
[  553.477254] [&lt;c07e0a1c&gt;] (mutex_lock_nested) from [&lt;c03e927c&gt;] (dpm_complete+0xc0/0x1b0)
[  553.485358]  r10:00561408 r9:edd3c054 r8:c0b4863c r7:edddbd90 r6:c0b485d8 r5:edd3c020
[  553.493313]  r4:edd3c0d0
[  553.495896] [&lt;c03e91bc&gt;] (dpm_complete) from [&lt;c03e9388&gt;] (dpm_resume_end+0x1c/0x20)
[  553.503652]  r9:00000000 r8:c0b1a9d0 r7:c1334ec0 r6:c1334edc r5:00000003 r4:00000010
[  553.511544] [&lt;c03e936c&gt;] (dpm_resume_end) from [&lt;c0079894&gt;] (suspend_devices_and_enter+0x158/0x504)
[  553.520604]  r4:00000000 r3:c1334efc
[  553.524250] [&lt;c007973c&gt;] (suspend_devices_and_enter) from [&lt;c0079e74&gt;] (pm_suspend+0x234/0x2cc)
[  553.532961]  r10:00561408 r9:ed6b7300 r8:00000004 r7:c1334eec r6:00000000 r5:c1334ee8
[  553.540914]  r4:00000003
[  553.543493] [&lt;c0079c40&gt;] (pm_suspend) from [&lt;c0078a6c&gt;] (state_store+0x6c/0xc0)

[  555.703684] 7 locks held by kworker/u2:13/826:
[  555.708140]  #0:  ("%s""ci_otg"){++++.+}, at: [&lt;c0045484&gt;] process_one_work+0x128/0x420
[  555.716277]  #1:  ((&amp;ci-&gt;work)){+.+.+.}, at: [&lt;c0045484&gt;] process_one_work+0x128/0x420
[  555.724317]  #2:  (usb_bus_list_lock){+.+.+.}, at: [&lt;c04ae5e4&gt;] usb_remove_hcd+0x98/0x1ac
[  555.732626]  #3:  (&amp;dev-&gt;mutex){......}, at: [&lt;c04a8e28&gt;] usb_disconnect+0x48/0x224
[  555.740403]  #4:  (&amp;dev-&gt;mutex){......}, at: [&lt;c04a8e28&gt;] usb_disconnect+0x48/0x224
[  555.748179]  #5:  (&amp;dev-&gt;mutex){......}, at: [&lt;c03dc2f4&gt;] device_release_driver+0x20/0x34
[  555.756487]  #6:  (&amp;shost-&gt;scan_mutex){+.+.+.}, at: [&lt;c04097d0&gt;] scsi_remove_host+0x20/0x104

Cc: Jun Li &lt;jun.li@nxp.com&gt;
Signed-off-by: Peter Chen &lt;peter.chen@nxp.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit d144dfea8af7108f613139623e63952ed7e69c0c upstream.

If we use USB ID pin as wakeup source, and there is a USB block
device on this USB OTG (ID) cable, the system will be deadlock
after system resume.

The root cause for this problem is: the workqueue ci_otg may try
to remove hcd before the driver resume has finished, and hcd will
disconnect the device on it, then, it will call device_release_driver,
and holds the device lock "dev-&gt;mutex", but it is never unlocked since
it waits workqueue writeback to run to flush the block information, but
the workqueue writeback is freezable, it is not thawed before driver
resume has finished.

When the driver (device: sd 0:0:0:0:) resume goes to dpm_complete, it
tries to get its device lock "dev-&gt;mutex", but it can't get it forever,
then the deadlock occurs. Below call stacks show the situation.

So, in order to fix this problem, we need to change workqueue ci_otg
as freezable, then the work item in this workqueue will be run after
driver's resume, this workqueue will not be blocked forever like above
case since the workqueue writeback has been thawed too.

Tested at: i.mx6qdl-sabresd and i.mx6sx-sdb.

[  555.178869] kworker/u2:13   D c07de74c     0   826      2 0x00000000
[  555.185310] Workqueue: ci_otg ci_otg_work
[  555.189353] Backtrace:
[  555.191849] [&lt;c07de4fc&gt;] (__schedule) from [&lt;c07dec6c&gt;] (schedule+0x48/0xa0)
[  555.198912]  r10:ee471ba0 r9:00000000 r8:00000000 r7:00000002 r6:ee470000 r5:ee471ba4
[  555.206867]  r4:ee470000
[  555.209453] [&lt;c07dec24&gt;] (schedule) from [&lt;c07e2fc4&gt;] (schedule_timeout+0x15c/0x1e0)
[  555.217212]  r4:7fffffff r3:edc2b000
[  555.220862] [&lt;c07e2e68&gt;] (schedule_timeout) from [&lt;c07df6c8&gt;] (wait_for_common+0x94/0x144)
[  555.229140]  r8:00000000 r7:00000002 r6:ee470000 r5:ee471ba4 r4:7fffffff
[  555.235980] [&lt;c07df634&gt;] (wait_for_common) from [&lt;c07df790&gt;] (wait_for_completion+0x18/0x1c)
[  555.244430]  r10:00000001 r9:c0b5563c r8:c0042e48 r7:ef086000 r6:eea4372c r5:ef131b00
[  555.252383]  r4:00000000
[  555.254970] [&lt;c07df778&gt;] (wait_for_completion) from [&lt;c0043cb8&gt;] (flush_work+0x19c/0x234)
[  555.263177] [&lt;c0043b1c&gt;] (flush_work) from [&lt;c0043fac&gt;] (flush_delayed_work+0x48/0x4c)
[  555.271106]  r8:ed5b5000 r7:c0b38a3c r6:eea439cc r5:eea4372c r4:eea4372c
[  555.277958] [&lt;c0043f64&gt;] (flush_delayed_work) from [&lt;c00eae18&gt;] (bdi_unregister+0x84/0xec)
[  555.286236]  r4:eea43520 r3:20000153
[  555.289885] [&lt;c00ead94&gt;] (bdi_unregister) from [&lt;c02c2154&gt;] (blk_cleanup_queue+0x180/0x29c)
[  555.298250]  r5:eea43808 r4:eea43400
[  555.301909] [&lt;c02c1fd4&gt;] (blk_cleanup_queue) from [&lt;c0417914&gt;] (__scsi_remove_device+0x48/0xb8)
[  555.310623]  r7:00000000 r6:20000153 r5:ededa950 r4:ededa800
[  555.316403] [&lt;c04178cc&gt;] (__scsi_remove_device) from [&lt;c0415e90&gt;] (scsi_forget_host+0x64/0x68)
[  555.325028]  r5:ededa800 r4:ed5b5000
[  555.328689] [&lt;c0415e2c&gt;] (scsi_forget_host) from [&lt;c0409828&gt;] (scsi_remove_host+0x78/0x104)
[  555.337054]  r5:ed5b5068 r4:ed5b5000
[  555.340709] [&lt;c04097b0&gt;] (scsi_remove_host) from [&lt;c04cdfcc&gt;] (usb_stor_disconnect+0x50/0xb4)
[  555.349247]  r6:ed5b56e4 r5:ed5b5818 r4:ed5b5690 r3:00000008
[  555.355025] [&lt;c04cdf7c&gt;] (usb_stor_disconnect) from [&lt;c04b3bc8&gt;] (usb_unbind_interface+0x78/0x25c)
[  555.363997]  r8:c13919b4 r7:edd3c000 r6:edd3c020 r5:ee551c68 r4:ee551c00 r3:c04cdf7c
[  555.371892] [&lt;c04b3b50&gt;] (usb_unbind_interface) from [&lt;c03dc248&gt;] (__device_release_driver+0x8c/0x118)
[  555.381213]  r10:00000001 r9:edd90c00 r8:c13919b4 r7:ee551c68 r6:c0b546e0 r5:c0b5563c
[  555.389167]  r4:edd3c020
[  555.391752] [&lt;c03dc1bc&gt;] (__device_release_driver) from [&lt;c03dc2fc&gt;] (device_release_driver+0x28/0x34)
[  555.401071]  r5:edd3c020 r4:edd3c054
[  555.404721] [&lt;c03dc2d4&gt;] (device_release_driver) from [&lt;c03db304&gt;] (bus_remove_device+0xe0/0x110)
[  555.413607]  r5:edd3c020 r4:ef17f04c
[  555.417253] [&lt;c03db224&gt;] (bus_remove_device) from [&lt;c03d8128&gt;] (device_del+0x114/0x21c)
[  555.425270]  r6:edd3c028 r5:edd3c020 r4:ee551c00 r3:00000000
[  555.431045] [&lt;c03d8014&gt;] (device_del) from [&lt;c04b1560&gt;] (usb_disable_device+0xa4/0x1e8)
[  555.439061]  r8:edd3c000 r7:eded8000 r6:00000000 r5:00000001 r4:ee551c00
[  555.445906] [&lt;c04b14bc&gt;] (usb_disable_device) from [&lt;c04a8e54&gt;] (usb_disconnect+0x74/0x224)
[  555.454271]  r9:edd90c00 r8:ee551000 r7:ee551c68 r6:ee551c9c r5:ee551c00 r4:00000001
[  555.462156] [&lt;c04a8de0&gt;] (usb_disconnect) from [&lt;c04a8fb8&gt;] (usb_disconnect+0x1d8/0x224)
[  555.470259]  r10:00000001 r9:edd90000 r8:ee471e2c r7:ee551468 r6:ee55149c r5:ee551400
[  555.478213]  r4:00000001
[  555.480797] [&lt;c04a8de0&gt;] (usb_disconnect) from [&lt;c04ae5ec&gt;] (usb_remove_hcd+0xa0/0x1ac)
[  555.488813]  r10:00000001 r9:ee471eb0 r8:00000000 r7:ef3d9500 r6:eded810c r5:eded80b0
[  555.496765]  r4:eded8000
[  555.499351] [&lt;c04ae54c&gt;] (usb_remove_hcd) from [&lt;c04d4158&gt;] (host_stop+0x28/0x64)
[  555.506847]  r6:eeb50010 r5:eded8000 r4:eeb51010
[  555.511563] [&lt;c04d4130&gt;] (host_stop) from [&lt;c04d09b8&gt;] (ci_otg_work+0xc4/0x124)
[  555.518885]  r6:00000001 r5:eeb50010 r4:eeb502a0 r3:c04d4130
[  555.524665] [&lt;c04d08f4&gt;] (ci_otg_work) from [&lt;c00454f0&gt;] (process_one_work+0x194/0x420)
[  555.532682]  r6:ef086000 r5:eeb502a0 r4:edc44480
[  555.537393] [&lt;c004535c&gt;] (process_one_work) from [&lt;c00457b0&gt;] (worker_thread+0x34/0x514)
[  555.545496]  r10:edc44480 r9:ef086000 r8:c0b1a100 r7:ef086034 r6:00000088 r5:edc44498
[  555.553450]  r4:ef086000
[  555.556032] [&lt;c004577c&gt;] (worker_thread) from [&lt;c004bab4&gt;] (kthread+0xdc/0xf8)
[  555.563268]  r10:00000000 r9:00000000 r8:00000000 r7:c004577c r6:edc44480 r5:eddc15c0
[  555.571221]  r4:00000000
[  555.573804] [&lt;c004b9d8&gt;] (kthread) from [&lt;c000fef0&gt;] (ret_from_fork+0x14/0x24)
[  555.581040]  r7:00000000 r6:00000000 r5:c004b9d8 r4:eddc15c0

[  553.429383] sh              D c07de74c     0   694    691 0x00000000
[  553.435801] Backtrace:
[  553.438295] [&lt;c07de4fc&gt;] (__schedule) from [&lt;c07dec6c&gt;] (schedule+0x48/0xa0)
[  553.445358]  r10:edd3c054 r9:edd3c078 r8:edddbd50 r7:edcbbc00 r6:c1377c34 r5:60000153
[  553.453313]  r4:eddda000
[  553.455896] [&lt;c07dec24&gt;] (schedule) from [&lt;c07deff8&gt;] (schedule_preempt_disabled+0x10/0x14)
[  553.464261]  r4:edd3c058 r3:0000000a
[  553.467910] [&lt;c07defe8&gt;] (schedule_preempt_disabled) from [&lt;c07e0bbc&gt;] (mutex_lock_nested+0x1a0/0x3e8)
[  553.477254] [&lt;c07e0a1c&gt;] (mutex_lock_nested) from [&lt;c03e927c&gt;] (dpm_complete+0xc0/0x1b0)
[  553.485358]  r10:00561408 r9:edd3c054 r8:c0b4863c r7:edddbd90 r6:c0b485d8 r5:edd3c020
[  553.493313]  r4:edd3c0d0
[  553.495896] [&lt;c03e91bc&gt;] (dpm_complete) from [&lt;c03e9388&gt;] (dpm_resume_end+0x1c/0x20)
[  553.503652]  r9:00000000 r8:c0b1a9d0 r7:c1334ec0 r6:c1334edc r5:00000003 r4:00000010
[  553.511544] [&lt;c03e936c&gt;] (dpm_resume_end) from [&lt;c0079894&gt;] (suspend_devices_and_enter+0x158/0x504)
[  553.520604]  r4:00000000 r3:c1334efc
[  553.524250] [&lt;c007973c&gt;] (suspend_devices_and_enter) from [&lt;c0079e74&gt;] (pm_suspend+0x234/0x2cc)
[  553.532961]  r10:00561408 r9:ed6b7300 r8:00000004 r7:c1334eec r6:00000000 r5:c1334ee8
[  553.540914]  r4:00000003
[  553.543493] [&lt;c0079c40&gt;] (pm_suspend) from [&lt;c0078a6c&gt;] (state_store+0x6c/0xc0)

[  555.703684] 7 locks held by kworker/u2:13/826:
[  555.708140]  #0:  ("%s""ci_otg"){++++.+}, at: [&lt;c0045484&gt;] process_one_work+0x128/0x420
[  555.716277]  #1:  ((&amp;ci-&gt;work)){+.+.+.}, at: [&lt;c0045484&gt;] process_one_work+0x128/0x420
[  555.724317]  #2:  (usb_bus_list_lock){+.+.+.}, at: [&lt;c04ae5e4&gt;] usb_remove_hcd+0x98/0x1ac
[  555.732626]  #3:  (&amp;dev-&gt;mutex){......}, at: [&lt;c04a8e28&gt;] usb_disconnect+0x48/0x224
[  555.740403]  #4:  (&amp;dev-&gt;mutex){......}, at: [&lt;c04a8e28&gt;] usb_disconnect+0x48/0x224
[  555.748179]  #5:  (&amp;dev-&gt;mutex){......}, at: [&lt;c03dc2f4&gt;] device_release_driver+0x20/0x34
[  555.756487]  #6:  (&amp;shost-&gt;scan_mutex){+.+.+.}, at: [&lt;c04097d0&gt;] scsi_remove_host+0x20/0x104

Cc: Jun Li &lt;jun.li@nxp.com&gt;
Signed-off-by: Peter Chen &lt;peter.chen@nxp.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>usb: chipidea: imx: fix a possible NULL dereference</title>
<updated>2015-11-18T07:27:31+00:00</updated>
<author>
<name>LABBE Corentin</name>
<email>clabbe.montjoie@gmail.com</email>
</author>
<published>2015-11-12T07:43:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=6f51bc340d2a1c71a2409f80f3e60fe2c44e35ae'/>
<id>6f51bc340d2a1c71a2409f80f3e60fe2c44e35ae</id>
<content type='text'>
of_match_device could return NULL, and so cause a NULL pointer
dereference later.

Reported-by: coverity (CID 1324138)
Signed-off-by: LABBE Corentin &lt;clabbe.montjoie@gmail.com&gt;
Signed-off-by: Peter Chen &lt;peter.chen@freescale.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
of_match_device could return NULL, and so cause a NULL pointer
dereference later.

Reported-by: coverity (CID 1324138)
Signed-off-by: LABBE Corentin &lt;clabbe.montjoie@gmail.com&gt;
Signed-off-by: Peter Chen &lt;peter.chen@freescale.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
