<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/git/stable/linux.git/drivers/usb/musb, branch linux-3.15.y</title>
<subtitle>Linux kernel stable tree</subtitle>
<id>https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/atom?h=linux-3.15.y</id>
<link rel='self' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/atom?h=linux-3.15.y'/>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/'/>
<updated>2014-07-09T18:21:24+00:00</updated>
<entry>
<title>usb: musb: Fix panic upon musb_am335x module removal</title>
<updated>2014-07-09T18:21:24+00:00</updated>
<author>
<name>Ezequiel Garcia</name>
<email>ezequiel@vanguardiasur.com.ar</email>
</author>
<published>2014-06-23T18:34:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=ee5263f5765a6b7df12c0bfa4ef7c1637238f799'/>
<id>urn:sha1:ee5263f5765a6b7df12c0bfa4ef7c1637238f799</id>
<content type='text'>
commit 7adb5c876e9c0677078a1e1094c6eafd29c30b74 upstream.

At probe time, the musb_am335x driver register its childs by
calling of_platform_populate(), which registers all childs in
the devicetree hierarchy recursively.

On the other side, the driver's remove() function uses of_device_unregister()
to remove each child of musb_am335x's.

However, when musb_dsps is loaded, its devices are attached to the musb_am335x
device as musb_am335x childs. Hence, musb_am335x remove() will attempt to
unregister the devices registered by musb_dsps, which produces a kernel panic.

In other words, the childs in the "struct device" hierarchy are not the same
as the childs in the "devicetree" hierarchy.

Ideally, we should enforce the removal of the devices registered by
musb_am335x *only*, instead of all its child devices. However, because of the
recursive nature of of_platform_populate, this doesn't seem possible.

Therefore, as the only solution at hand, this commit disables musb_am335x
driver removal capability, preventing it from being ever removed. This was
originally suggested by Sebastian Siewior:

https://www.mail-archive.com/linux-omap@vger.kernel.org/msg104946.html

And for reference, here's the panic upon module removal:

musb-hdrc musb-hdrc.0.auto: remove, state 4
usb usb1: USB disconnect, device number 1
musb-hdrc musb-hdrc.0.auto: USB bus 1 deregistered
Unable to handle kernel NULL pointer dereference at virtual address 0000008c
pgd = de11c000
[0000008c] *pgd=9e174831, *pte=00000000, *ppte=00000000
Internal error: Oops: 17 [#1] ARM
Modules linked in: musb_am335x(-) musb_dsps musb_hdrc usbcore usb_common
CPU: 0 PID: 623 Comm: modprobe Not tainted 3.15.0-rc4-00001-g24efd13 #69
task: de1b7500 ti: de122000 task.ti: de122000
PC is at am335x_shutdown+0x10/0x28
LR is at am335x_shutdown+0xc/0x28
pc : [&lt;c0327798&gt;]    lr : [&lt;c0327794&gt;]    psr: a0000013
sp : de123df8  ip : 00000004  fp : 00028f00
r10: 00000000  r9 : de122000  r8 : c000e6c4
r7 : de0e3c10  r6 : de0e3800  r5 : de624010  r4 : de1ec750
r3 : de0e3810  r2 : 00000000  r1 : 00000001  r0 : 00000000
Flags: NzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
Control: 10c5387d  Table: 9e11c019  DAC: 00000015
Process modprobe (pid: 623, stack limit = 0xde122240)
Stack: (0xde123df8 to 0xde124000)
3de0:                                                       de0e3810 bf054488
3e00: bf05444c de624010 60000013 bf043650 000012fc de624010 de0e3810 bf043a20
3e20: de0e3810 bf04b240 c0635b88 c02ca37c c02ca364 c02c8db0 de1b7500 de0e3844
3e40: de0e3810 c02c8e28 c0635b88 de02824c de0e3810 c02c884c de0e3800 de0e3810
3e60: de0e3818 c02c5b20 bf05417c de0e3800 de0e3800 c0635b88 de0f2410 c02ca838
3e80: bf05417c de0e3800 bf055438 c02ca8cc de0e3c10 bf054194 de0e3c10 c02ca37c
3ea0: c02ca364 c02c8db0 de1b7500 de0e3c44 de0e3c10 c02c8e28 c0635b88 de02824c
3ec0: de0e3c10 c02c884c de0e3c10 de0e3c10 de0e3c18 c02c5b20 de0e3c10 de0e3c10
3ee0: 00000000 bf059000 a0000013 c02c5bc0 00000000 bf05900c de0e3c10 c02c5c48
3f00: de0dd0c0 de1ec970 de0f2410 bf05929c de0f2444 bf05902c de0f2410 c02ca37c
3f20: c02ca364 c02c8db0 bf05929c de0f2410 bf05929c c02c94c8 bf05929c 00000000
3f40: 00000800 c02c8ab4 bf0592e0 c007fc40 c00dd820 6273756d 336d615f 00783533
3f60: c064a0ac de1b7500 de122000 de1b7500 c000e590 00000001 c000e6c4 c0060160
3f80: 00028e70 00028e70 00028ea4 00000081 60000010 00028e70 00028e70 00028ea4
3fa0: 00000081 c000e500 00028e70 00028e70 00028ea4 00000800 becb59f8 00027608
3fc0: 00028e70 00028e70 00028ea4 00000081 00000001 00000001 00000000 00028f00
3fe0: b6e6b6f0 becb59d4 000160e8 b6e6b6fc 60000010 00028ea4 00000000 00000000
[&lt;c0327798&gt;] (am335x_shutdown) from [&lt;bf054488&gt;] (dsps_musb_exit+0x3c/0x4c [musb_dsps])
[&lt;bf054488&gt;] (dsps_musb_exit [musb_dsps]) from [&lt;bf043650&gt;] (musb_shutdown+0x80/0x90 [musb_hdrc])
[&lt;bf043650&gt;] (musb_shutdown [musb_hdrc]) from [&lt;bf043a20&gt;] (musb_remove+0x24/0x68 [musb_hdrc])
[&lt;bf043a20&gt;] (musb_remove [musb_hdrc]) from [&lt;c02ca37c&gt;] (platform_drv_remove+0x18/0x1c)
[&lt;c02ca37c&gt;] (platform_drv_remove) from [&lt;c02c8db0&gt;] (__device_release_driver+0x70/0xc8)
[&lt;c02c8db0&gt;] (__device_release_driver) from [&lt;c02c8e28&gt;] (device_release_driver+0x20/0x2c)
[&lt;c02c8e28&gt;] (device_release_driver) from [&lt;c02c884c&gt;] (bus_remove_device+0xdc/0x10c)
[&lt;c02c884c&gt;] (bus_remove_device) from [&lt;c02c5b20&gt;] (device_del+0x104/0x198)
[&lt;c02c5b20&gt;] (device_del) from [&lt;c02ca838&gt;] (platform_device_del+0x14/0x9c)
[&lt;c02ca838&gt;] (platform_device_del) from [&lt;c02ca8cc&gt;] (platform_device_unregister+0xc/0x20)
[&lt;c02ca8cc&gt;] (platform_device_unregister) from [&lt;bf054194&gt;] (dsps_remove+0x18/0x38 [musb_dsps])
[&lt;bf054194&gt;] (dsps_remove [musb_dsps]) from [&lt;c02ca37c&gt;] (platform_drv_remove+0x18/0x1c)
[&lt;c02ca37c&gt;] (platform_drv_remove) from [&lt;c02c8db0&gt;] (__device_release_driver+0x70/0xc8)
[&lt;c02c8db0&gt;] (__device_release_driver) from [&lt;c02c8e28&gt;] (device_release_driver+0x20/0x2c)
[&lt;c02c8e28&gt;] (device_release_driver) from [&lt;c02c884c&gt;] (bus_remove_device+0xdc/0x10c)
[&lt;c02c884c&gt;] (bus_remove_device) from [&lt;c02c5b20&gt;] (device_del+0x104/0x198)
[&lt;c02c5b20&gt;] (device_del) from [&lt;c02c5bc0&gt;] (device_unregister+0xc/0x20)
[&lt;c02c5bc0&gt;] (device_unregister) from [&lt;bf05900c&gt;] (of_remove_populated_child+0xc/0x14 [musb_am335x])
[&lt;bf05900c&gt;] (of_remove_populated_child [musb_am335x]) from [&lt;c02c5c48&gt;] (device_for_each_child+0x44/0x70)
[&lt;c02c5c48&gt;] (device_for_each_child) from [&lt;bf05902c&gt;] (am335x_child_remove+0x18/0x30 [musb_am335x])
[&lt;bf05902c&gt;] (am335x_child_remove [musb_am335x]) from [&lt;c02ca37c&gt;] (platform_drv_remove+0x18/0x1c)
[&lt;c02ca37c&gt;] (platform_drv_remove) from [&lt;c02c8db0&gt;] (__device_release_driver+0x70/0xc8)
[&lt;c02c8db0&gt;] (__device_release_driver) from [&lt;c02c94c8&gt;] (driver_detach+0xb4/0xb8)
[&lt;c02c94c8&gt;] (driver_detach) from [&lt;c02c8ab4&gt;] (bus_remove_driver+0x4c/0xa0)
[&lt;c02c8ab4&gt;] (bus_remove_driver) from [&lt;c007fc40&gt;] (SyS_delete_module+0x128/0x1cc)
[&lt;c007fc40&gt;] (SyS_delete_module) from [&lt;c000e500&gt;] (ret_fast_syscall+0x0/0x48)

Fixes: 97238b35d5bb ("usb: musb: dsps: use proper child nodes")
Acked-by: George Cherian &lt;george.cherian@ti.com&gt;
Signed-off-by: Ezequiel Garcia &lt;ezequiel@vanguardiasur.com.ar&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>usb: musb: Ensure that cppi41 timer gets armed on premature DMA TX irq</title>
<updated>2014-07-09T18:21:24+00:00</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2014-06-20T21:41:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=99941924ef77d4b24f53f0f45beabf47d5cbc6f0'/>
<id>urn:sha1:99941924ef77d4b24f53f0f45beabf47d5cbc6f0</id>
<content type='text'>
commit c58d80f523ffc15ef4d062fc7aeb03793fe39701 upstream.

Some TI chips raise the DMA complete interrupt before the actual
transfer has been completed. The code tries to busy wait for a few
microseconds and if that fails it arms an hrtimer to recheck. So far
so good, but that has the following issue:

CPU 0					CPU1

start_next_transfer(RQ1);

DMA interrupt
  if (premature_irq(RQ1))
    if (!hrtimer_active(timer))
       hrtimer_start(timer);

hrtimer expires
  timer-&gt;state = CALLBACK_RUNNING;
  timer-&gt;fn()
    cppi41_recheck_tx_req()
      complete_request(RQ1);
      if (requests_pending())
        start_next_transfer(RQ2);

					DMA interrupt
					  if (premature_irq(RQ2))
					    if (!hrtimer_active(timer))
					       hrtimer_start(timer);
  timer-&gt;state = INACTIVE;

The premature interrupt of request2 on CPU1 does not arm the timer and
therefor the request completion never happens because it checks for
!hrtimer_active(). hrtimer_active() evaluates:

  timer-&gt;state != HRTIMER_STATE_INACTIVE

which of course evaluates to true in the above case as timer-&gt;state is
CALLBACK_RUNNING.

That's clearly documented:

 * A timer is active, when it is enqueued into the rbtree or the
 * callback function is running or it's in the state of being migrated
 * to another cpu.

But that's not what the code wants to check. The code wants to check
whether the timer is queued, i.e. whether its armed and waiting for
expiry.

We have a helper function for this: hrtimer_is_queued(). This
evaluates:

  timer-&gt;state &amp; HRTIMER_STATE_QUEUED

So in the above case this evaluates to false and therefor forces the
DMA interrupt on CPU1 to call hrtimer_start().

Use hrtimer_is_queued() instead of hrtimer_active() and evrything is
good.

Reported-by: Torben Hohn &lt;torbenh@linutronix.de&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>usb: musb: ux500: don't propagate the OF node</title>
<updated>2014-07-09T18:21:24+00:00</updated>
<author>
<name>Linus Walleij</name>
<email>linus.walleij@linaro.org</email>
</author>
<published>2014-06-10T08:54:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=e4d30efe04ce5f01ede7ced6ed41859c693eb432'/>
<id>urn:sha1:e4d30efe04ce5f01ede7ced6ed41859c693eb432</id>
<content type='text'>
commit 82363cf2eeafeea6ba88849f5e2febdc8a05943f upstream.

There is a regression in the upcoming v3.16-rc1, that is caused
by a problem that has been around for a while but now finally
hangs the system. The bootcrawl looks like this:

pinctrl-nomadik soc:pinctrl: pin GPIO256_AF28 already
requested by a03e0000.usb_per5; cannot claim for musb-hdrc.0.auto
pinctrl-nomadik soc:pinctrl: pin-256 (musb-hdrc.0.auto) status -22
pinctrl-nomadik soc:pinctrl: could not request pin 256
(GPIO256_AF28) from group usb_a_1  on device pinctrl-nomadik
musb-hdrc musb-hdrc.0.auto: Error applying setting, reverse
things back
HS USB OTG: no transceiver configured
musb-hdrc musb-hdrc.0.auto: musb_init_controller failed
with status -517
platform musb-hdrc.0.auto: Driver musb-hdrc requests
probe deferral
(...)

The ux500 MUSB driver propagates the OF node to the dynamically
created musb-hdrc device, which is incorrect as it makes the OF
core believe there are two devices spun from the very same
DT node, which confuses other parts of the device core, notably
the pin control subsystem, which will try to apply all the pin
control settings also to the HDRC device as it gets
instantiated. (The OMAP2430 for example, does not set the
of_node member.)

Cc: Arnd Bergmann &lt;arnd@arndb.de&gt;
Acked-by: Lee Jones &lt;lee.jones@linaro.org&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>usb: musb: dsps: move debugfs_remove_recursive()</title>
<updated>2014-04-16T15:11:46+00:00</updated>
<author>
<name>Daniel Mack</name>
<email>zonque@gmail.com</email>
</author>
<published>2014-04-02T09:46:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=0fca91b8a446d4a38b8f3d4772c4a8665ebcd7b2'/>
<id>urn:sha1:0fca91b8a446d4a38b8f3d4772c4a8665ebcd7b2</id>
<content type='text'>
When the platform initialization fails due to missing resources, it will
return -EPROBE_DEFER after dsps_musb_init() has been called.

dsps_musb_init() calls dsps_musb_dbg_init() to allocate the debugfs
nodes. At a later point in time, the probe will be retried, and
dsps_musb_dbg_init() will be called again. debugfs_create_dir() will
fail this time, as the node already exists, and so the entire device
probe will fail with -ENOMEM.

Fix this by moving debugfs_remove_recursive() from dsps_remove() to the
plaform's exit function, so it will be cleanly torn down when the probe
fails. It also feels more natural this way, as .exit is the counterpart
to .init.

Signed-off-by: Daniel Mack &lt;zonque@gmail.com&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</content>
</entry>
<entry>
<title>usb: musb: omap2430: make sure clocks are enabled when running mailbox</title>
<updated>2014-04-15T17:08:02+00:00</updated>
<author>
<name>Felipe Balbi</name>
<email>balbi@ti.com</email>
</author>
<published>2014-04-07T15:58:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=8b2bc2c9351b4c09bc3d9096e2a7af3988565dbf'/>
<id>urn:sha1:8b2bc2c9351b4c09bc3d9096e2a7af3988565dbf</id>
<content type='text'>
on early initialization we could fall into
a situation where the mailbox is called before
MUSB's clocks are running, in order to avoid
that, make sure mailbox is always wrapped with
pm_runtime calls.

Reported-by: Stefan Roese &lt;sr@denx.de&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</content>
</entry>
<entry>
<title>usb: musb: fix PHY power on/off</title>
<updated>2014-04-15T17:07:33+00:00</updated>
<author>
<name>Felipe Balbi</name>
<email>balbi@ti.com</email>
</author>
<published>2014-03-28T19:31:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=3063a12be2b07c64e9802708a19489342e64c1a3'/>
<id>urn:sha1:3063a12be2b07c64e9802708a19489342e64c1a3</id>
<content type='text'>
commi 30a70b0 (usb: musb: fix obex in g_nokia.ko
causing kernel panic) removed phy_power_on()
and phy_power_off() calls from runtime PM callbacks
but it failed to note that the driver depended
on pm_runtime_get_sync() calls to power up the PHY,
thus leaving some platforms without any means to
have a working PHY.

Fix that by enabling the phy during omap2430_musb_init()
and killing it in omap2430_musb_exit().

Fixes: 30a70b0 (usb: musb: fix obex in g_nokia.ko causing kernel panic)
Cc: &lt;stable@vger.kernel.org&gt; # v3.14
Cc: Pali Rohár &lt;pali.rohar@gmail.com&gt;
Cc: Ivaylo Dimitrov &lt;ivo.g.dimitrov.75@gmail.com&gt;
Reported-by: Michael Scott &lt;hashcode0f@gmail.com&gt;
Tested-by: Michael Scott &lt;hashcode0f@gmail.com&gt;
Tested-by: Stefan Roese &lt;sr@denx.de&gt;
Reported-by: Rabin Vincent &lt;rabin@rab.in&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'for_3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy into usb-next</title>
<updated>2014-03-09T18:16:38+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2014-03-09T18:16:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=ea1990c3796e7550e6f240983f2d1b8e5ecf3891'/>
<id>urn:sha1:ea1990c3796e7550e6f240983f2d1b8e5ecf3891</id>
<content type='text'>
Kishon writes:

Add new PHY drivers for SATA and USB in exynos, for USB in sunxi,
and a multi-purpose PHY in APM, all adapted to generic PHY framework.
Adapted USB3 PHY driver in OMAP to generic PHY driver and also used
the same driver for SATA in OMAP. It also includes miscellaneous cleanups
and fixes.
</content>
</entry>
<entry>
<title>phy: rename struct omap_control_usb to struct omap_control_phy</title>
<updated>2014-03-09T07:15:08+00:00</updated>
<author>
<name>Kishon Vijay Abraham I</name>
<email>kishon@ti.com</email>
</author>
<published>2014-03-06T14:38:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=14da699bc04212559d5dda19d3f07c807fb58dfd'/>
<id>urn:sha1:14da699bc04212559d5dda19d3f07c807fb58dfd</id>
<content type='text'>
Rename struct omap_control_usb to struct omap_control_phy since it can
be used to control PHY of USB, SATA and PCIE. Also move the driver and
include files under *phy* and made the corresponding changes in the users
of phy-omap-control.

Signed-off-by: Kishon Vijay Abraham I &lt;kishon@ti.com&gt;
Signed-off-by: Roger Quadros &lt;rogerq@ti.com&gt;
Acked-by: Felipe Balbi &lt;balbi@ti.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'usb-for-v3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next</title>
<updated>2014-03-08T00:47:36+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2014-03-08T00:47:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=7338a0659365ec0fbdc6f79de8b9fba2280fd155'/>
<id>urn:sha1:7338a0659365ec0fbdc6f79de8b9fba2280fd155</id>
<content type='text'>
Felipe writes:

usb: patches for v3.15

another substantial pull request with new features all over
the place.

dwc3 got a bit closer towards hibernation support with after
a few patches re-factoring code to be reused for hibernation.
Also in dwc3 two new workarounds for known silicon bugs have
been implemented, some randconfig build errors have been fixed,
and it was taught about the new generic phy layer.

MUSB on AM335x now supports isochronous transfers thanks to
George Cherian's work.

The atmel_usba driver got two crash fixes: one when no endpoint
was specified in DeviceTree data and another when stopping the UDC
in DEBUG builds.

Function FS got a much needed fix to ffs_epfile_io() which was
copying too much data to userspace in some cases.

The printer gadget got a fix for a possible deadlock and plugged
a memory leak.

Ethernet drivers now use NAPI for RX which gives improved throughput.

Other than that, the usual miscelaneous fixes, cleanups, and
the like.

Signed-of-by: Felipe Balbi &lt;balbi@ti.com&gt;
</content>
</entry>
<entry>
<title>usb: musb: musb_cppi41: Dont reprogram DMA if tear down is initiated</title>
<updated>2014-03-05T20:40:05+00:00</updated>
<author>
<name>George Cherian</name>
<email>george.cherian@ti.com</email>
</author>
<published>2014-02-27T05:14:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=aecbc31d767cb549e93a44e50218e20d1bc66b59'/>
<id>urn:sha1:aecbc31d767cb549e93a44e50218e20d1bc66b59</id>
<content type='text'>
Reprogramming the DMA after tear down is initiated leads to warning.
This is mainly seen with ISOCH since we do a delayed completion for
ISOCH transfers. In ISOCH transfers dma_completion should not reprogram
if the channel tear down is initiated.

Signed-off-by: George Cherian &lt;george.cherian@ti.com&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</content>
</entry>
</feed>
