<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/usb/musb, branch linux-3.14.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.14.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.14.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2016-07-27T16:55:48Z</updated>
<entry>
<title>usb: musb: Ensure rx reinit occurs for shared_fifo endpoints</title>
<updated>2016-07-27T16:55:48Z</updated>
<author>
<name>Andrew Goodbody</name>
</author>
<published>2016-05-31T15:05:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=160eecd6412238092c03028c85f32a0e08f0241d'/>
<id>urn:sha1:160eecd6412238092c03028c85f32a0e08f0241d</id>
<content type='text'>
commit f3eec0cf784e0d6c47822ca6b66df3d5812af7e6 upstream.

shared_fifo endpoints would only get a previous tx state cleared
out, the rx state was only cleared for non shared_fifo endpoints
Change this so that the rx state is cleared for all endpoints.
This addresses an issue that resulted in rx packets being dropped
silently.

Signed-off-by: Andrew Goodbody &lt;andrew.goodbody@cambrionix.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: Stop bulk endpoint while queue is rotated</title>
<updated>2016-07-27T16:55:48Z</updated>
<author>
<name>Andrew Goodbody</name>
</author>
<published>2016-05-31T15:05:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0680a4cbe70c0370e94e91441b0bbf8eac0be230'/>
<id>urn:sha1:0680a4cbe70c0370e94e91441b0bbf8eac0be230</id>
<content type='text'>
commit 7b2c17f829545df27a910e8d82e133c21c9a8c9c upstream.

Ensure that the endpoint is stopped by clearing REQPKT before
clearing DATAERR_NAKTIMEOUT before rotating the queue on the
dedicated bulk endpoint.
This addresses an issue where a race could result in the endpoint
receiving data before it was reprogrammed resulting in a warning
about such data from musb_rx_reinit before it was thrown away.
The data thrown away was a valid packet that had been correctly
ACKed which meant the host and device got out of sync.

Signed-off-by: Andrew Goodbody &lt;andrew.goodbody@cambrionix.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: core: fix order of arguments to ulpi write callback</title>
<updated>2015-12-09T18:42:59Z</updated>
<author>
<name>Uwe Kleine-König</name>
</author>
<published>2015-10-23T07:53:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9da23de71e10dcc94e5398aaa7d9d8a0ae1f58e9'/>
<id>urn:sha1:9da23de71e10dcc94e5398aaa7d9d8a0ae1f58e9</id>
<content type='text'>
commit 705e63d2b29c8bbf091119084544d353bda70393 upstream.

There is a bit of a mess in the order of arguments to the ulpi write
callback. There is

	int ulpi_write(struct ulpi *ulpi, u8 addr, u8 val)

in drivers/usb/common/ulpi.c;

	struct usb_phy_io_ops {
		...
		int (*write)(struct usb_phy *x, u32 val, u32 reg);
	}

in include/linux/usb/phy.h.

The callback registered by the musb driver has to comply to the latter,
but up to now had "offset" first which effectively made the function
broken for correct users. So flip the order and while at it also
switch to the parameter names of struct usb_phy_io_ops's write.

Fixes: ffb865b1e460 ("usb: musb: add ulpi access operations")
Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.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: host: rely on port_mode to call musb_start()</title>
<updated>2015-08-03T16:29:55Z</updated>
<author>
<name>Felipe Balbi</name>
</author>
<published>2015-06-02T18:03:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=26cbf8ea380a3e1ed1c22697c476e0576531d7a3'/>
<id>urn:sha1:26cbf8ea380a3e1ed1c22697c476e0576531d7a3</id>
<content type='text'>
commit be9d39881fc4fa39a64b6eed6bab5d9ee5125344 upstream.

Currently, we're calling musb_start() twice for DRD ports
in some situations. This has been observed to cause enumeration
issues after suspend/resume cycles with AM335x.

In order to fix the problem, we just have to fix the check
on musb_has_gadget() so that it only returns true if
current mode is Host and ignore the fact that we have or
not a gadget driver loaded.

Fixes: ae44df2e21b5 (usb: musb: call musb_start() only once in OTG mode)
Cc: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Tested-by: Sekhar Nori &lt;nsekhar@ti.com&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: use new USB_RESUME_TIMEOUT</title>
<updated>2015-05-13T12:16:58Z</updated>
<author>
<name>Felipe Balbi</name>
</author>
<published>2015-02-13T20:46:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0e0fc26cb3ebaf37450eae399c92601d21388f70'/>
<id>urn:sha1:0e0fc26cb3ebaf37450eae399c92601d21388f70</id>
<content type='text'>
commit 309be239369609929d5d3833ee043f7c5afc95d1 upstream.

Make sure we're using the new macro, so our
resume signaling will always pass certification.

Based on original work by Bin Liu &lt;Bin Liu &lt;b-liu@ti.com&gt;&gt;

Cc: Bin Liu &lt;b-liu@ti.com&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: stuff leak of struct usb_hcd</title>
<updated>2015-01-27T16:18:57Z</updated>
<author>
<name>Sebastian Andrzej Siewior</name>
</author>
<published>2014-12-11T17:14:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=97ab28073bcc3299080bbaba025861d053e70f43'/>
<id>urn:sha1:97ab28073bcc3299080bbaba025861d053e70f43</id>
<content type='text'>
commit 68693b8ea4e284c46bff919ac62bd9ccdfdbb6ba upstream.

since the split of host+gadget mode in commit 74c2e9360058 ("usb: musb:
factor out hcd initalization") we leak the usb_hcd struct. We call now
musb_host_cleanup() which does basically usb_remove_hcd() and also sets
the hcd variable to NULL. Doing so makes the finall call to
musb_host_free() basically a nop and the usb_hcd remains around for ever
without anowner.
This patch drops that NULL assignment for that reason.

Fixes: 74c2e9360058 ("usb: musb: factor out hcd initalization")
Cc: Daniel Mack &lt;zonque@gmail.com&gt;
Signed-off-by: Sebastian Andrzej Siewior &lt;bigeasy@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: dsps: start OTG timer on resume again</title>
<updated>2014-11-14T17:00:05Z</updated>
<author>
<name>Sebastian Andrzej Siewior</name>
</author>
<published>2014-10-13T10:16:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b944ad83dbdaa0d02ed9e0a1d5749475f62561a4'/>
<id>urn:sha1:b944ad83dbdaa0d02ed9e0a1d5749475f62561a4</id>
<content type='text'>
commit 53185b3a441a6cc9bb3f57e924342d249138dcd6 upstream.

Commit 468bcc2a2ca ("usb: musb: dsps: kill OTG timer on suspend") stopped
the timer in suspend path but forgot the re-enable it in the resume
path. This patch fixes the behaviour.

Fixes 468bcc2a2ca "usb: musb: dsps: kill OTG timer on suspend"
Signed-off-by: Sebastian Andrzej Siewior &lt;bigeasy@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: cppi41: restart hrtimer only if not yet done</title>
<updated>2014-11-14T17:00:05Z</updated>
<author>
<name>Thomas Gleixner</name>
</author>
<published>2014-10-02T15:32:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=be7cabe556695e136f983623e22c3c52de25dc1b'/>
<id>urn:sha1:be7cabe556695e136f983623e22c3c52de25dc1b</id>
<content type='text'>
commit d2e6d62c9cbbc2da4211f672dbeea08960e29a80 upstream.

commit c58d80f52 ("usb: musb: Ensure that cppi41 timer gets armed on
premature DMA TX irq") fixed hrtimer scheduling bug. There is one left
which does not trigger that often.
The following scenario is still possible:

    lock(&amp;x-&gt;lock);
    hrtimer_start(&amp;x-&gt;t);
    unlock(&amp;x-&gt;lock);

expires:
    t-&gt;function();
                                lock(&amp;x-&gt;lock);
    lock(&amp;x-&gt;lock);             if (!hrtimer_queued(&amp;x-&gt;t))
                                        hrtimer_start(&amp;x-&gt;t);
                                unlock(&amp;x-&gt;lock);

    if (!list_empty(x-&gt;early_tx_list))
           ret = HRTIMER_RESTART;
-&gt;         hrtimer_forward_now(...)
    } else
           ret = HRTIMER_NORESTART;

    unlock(&amp;x-&gt;lock);

and the timer callback returns HRTIMER_RESTART for an armed timer. This
is wrong and we run into the BUG_ON() in __run_hrtimer().
This can happens on SMP or PREEMPT-RT.
The patch fixes the problem by only starting the timer if the timer is
not yet queued.

Reported-by: Torben Hohn &lt;torbenh@linutronix.de&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
[bigeasy: collected information and created a patch + description based
          on it]
Signed-off-by: Sebastian Andrzej Siewior &lt;bigeasy@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: dsps: kill OTG timer on suspend</title>
<updated>2014-10-15T06:36:43Z</updated>
<author>
<name>Felipe Balbi</name>
</author>
<published>2014-09-15T14:03:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=914435e6a2648d4f78aba661f9a5d178a011e35a'/>
<id>urn:sha1:914435e6a2648d4f78aba661f9a5d178a011e35a</id>
<content type='text'>
commit 468bcc2a2ca071f652009d2d20d97f2437630cae upstream.

if we don't make sure to kill the timer, it could
expire after we have already gated our clocks.

That will trigger a Data Abort exception because
we would try to access register while clock is gated.

Fix that bug.

Fixes 869c597 (usb: musb: dsps: add support for suspend and resume)
Tested-by: Dave Gerlach &lt;d-gerlach@ti.com&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: Fix panic upon musb_am335x module removal</title>
<updated>2014-07-09T18:18:24Z</updated>
<author>
<name>Ezequiel Garcia</name>
</author>
<published>2014-06-23T18:34:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6ea07d9b040bd42f4398e413a09d8f5795756886'/>
<id>urn:sha1:6ea07d9b040bd42f4398e413a09d8f5795756886</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>
</feed>
