<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/usb/chipidea/udc.c, branch linux-3.9.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.9.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.9.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2013-05-08T03:33:06Z</updated>
<entry>
<title>usb: chipidea: udc: fix memory leak in _ep_nuke</title>
<updated>2013-05-08T03:33:06Z</updated>
<author>
<name>Michael Grzeschik</name>
</author>
<published>2013-04-04T10:13:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=062e3257b83ba5013389d5ac40fa1d471663d6c3'/>
<id>urn:sha1:062e3257b83ba5013389d5ac40fa1d471663d6c3</id>
<content type='text'>
commit 7ca2cd291fd84ae499390f227a255ccba2780a81 upstream.

In hardware_enqueue code adds one extra td with dma_pool_alloc if
mReq-&gt;req.zero is true. When _ep_nuke will be called for that endpoint,
dma_pool_free will not be called to free that memory again. That patch
fixes this.

Signed-off-by: Michael Grzeschik &lt;m.grzeschik@pengutronix.de&gt;
Signed-off-by: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>usb: chipidea: udc: fix memory access of shared memory on armv5 machines</title>
<updated>2013-05-08T03:33:06Z</updated>
<author>
<name>Michael Grzeschik</name>
</author>
<published>2013-04-04T10:13:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d7a47d57560718f0d2f96e2a3f89887ff1be2669'/>
<id>urn:sha1:d7a47d57560718f0d2f96e2a3f89887ff1be2669</id>
<content type='text'>
commit a9c174302b1590ef3ead485d804a303c5f89174b upstream.

The udc uses an shared dma memory space between hard and software. This
memory layout is described in ci13xxx_qh and ci13xxx_td which are marked
with the attribute ((packed)).

The compiler currently does not know about the alignment of the memory
layout, and will create strb and ldrb operations.

The Datasheet of the synopsys core describes, that some operations on
the mapped memory need to be atomic double word operations. I.e. the
next pointer addressing in the qhead, as otherwise the hardware will
read wrong data and totally stuck.

This is also possible while working with the current active td queue,
and preparing the td-&gt;ptr.next in software while the hardware is still
working with the current active td which is supposed to be changed:

writeb(0xde, &amp;td-&gt;ptr.next + 0x0); /* strb */
writeb(0xad, &amp;td-&gt;ptr.next + 0x1); /* strb */

&lt;----- hardware reads value of td-&gt;ptr.next and get stuck!

writeb(0xbe, &amp;td-&gt;ptr.next + 0x2); /* strb */
writeb(0xef, &amp;td-&gt;ptr.next + 0x3); /* strb */

This appeares on armv5 machines where the hardware does not support
unaligned 32bit operations.

This patch adds the attribute ((aligned(4))) to the structures to tell
the compiler to use 32bit operations. It also adds an wmb() for the
prepared TD data before it gets enqueued into the qhead.

Signed-off-by: Michael Grzeschik &lt;m.grzeschik@pengutronix.de&gt;
Reviewed-by: Felipe Balbi &lt;balbi@ti.com&gt;
Signed-off-by: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>usb: chipidea: register debugging sysfs on our device</title>
<updated>2013-03-04T07:33:25Z</updated>
<author>
<name>Felipe Balbi</name>
</author>
<published>2013-01-24T15:34:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2b7dc3b1a6cd23cb75ada8505fa80687acd4fa04'/>
<id>urn:sha1:2b7dc3b1a6cd23cb75ada8505fa80687acd4fa04</id>
<content type='text'>
Don't register anything non-generic under
the gadget's device as we don't really *own*
it.

Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</content>
</entry>
<entry>
<title>USB: chipidea: add vbus detect for udc</title>
<updated>2012-09-12T18:20:38Z</updated>
<author>
<name>Richard Zhao</name>
</author>
<published>2012-09-12T11:58:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8c4fc031954b4eb72daf13d3c907a985a3eee208'/>
<id>urn:sha1:8c4fc031954b4eb72daf13d3c907a985a3eee208</id>
<content type='text'>
Using vbus valid interrupt to detect vbus.

Tested-by: Michael Grzeschik &lt;m.grzeschik@pengutronix.de&gt;
Tested-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
Signed-off-by: Richard Zhao &lt;richard.zhao@freescale.com&gt;
Signed-off-by: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: chipidea: udc: don't stall endpoint if request list is empty in isr_tr_complete_low</title>
<updated>2012-09-12T17:58:38Z</updated>
<author>
<name>Michael Grzeschik</name>
</author>
<published>2012-09-12T11:58:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=db89960e50f45274c07dc60926b5a49489b8a7a0'/>
<id>urn:sha1:db89960e50f45274c07dc60926b5a49489b8a7a0</id>
<content type='text'>
When attaching an imx28 or imx53 in USB gadget mode to a Windows host and
starting a rndis connection we see this message every 4-10 seconds:

    g_ether gadget: high speed config #2: RNDIS

Analysis shows that each time this message is printed, the rndis connection is
re-establish due to a reset because of a stalled endpoint (ep 0, dir 1). The
endpoint is stalled because the reqeust complete bit on that endpoint is set,
but in isr_tr_complete_low() the endpoint request list (mEp-&gt;qh.queue) is
empty.

This patch removed this check, because the code doesn't take the following
situation into account:

The loop over all endpoints in isr_tr_complete_handler() will call ep_nuke() on
both ep0/dir0 and ep/dir1 in the first loop. Pending reqeusts will be flushed
and completed here. There seems to be a race condition, the request is nuked,
but the request complete bit will be set, too. The subsequent check (in
ep0/dir1's loop cycle) for endpoint request list (mEp-&gt;qh.queue) empty will
fail.

Both other mainline chipidea drivers (mv_udc_core.c and fsl_udc_core.c) don't
have this check.

Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Michael Grzeschik &lt;m.grzeschik@pengutronix.de&gt;
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
Signed-off-by: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: chipidea: cleanup dma_pool if udc_start() fails</title>
<updated>2012-09-12T17:58:38Z</updated>
<author>
<name>Marc Kleine-Budde</name>
</author>
<published>2012-09-12T11:58:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ad6b1b97fe8504957d017cd6e4168cac8903d3f3'/>
<id>urn:sha1:ad6b1b97fe8504957d017cd6e4168cac8903d3f3</id>
<content type='text'>
If udc_start() fails the qh_pool dma-pool cannot be closed because
it's still in use. This patch factors out the dma_pool_free() loop
into destroy_eps() and calls it in the error path of udc_start(),
too.

Cc: stable &lt;stable@vger.kernel.org&gt;
Reviewed-by: Richard Zhao &lt;richard.zhao@freescale.com&gt;
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
Signed-off-by: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: chipidea: udc: fix error path in udc_start()</title>
<updated>2012-09-12T17:58:38Z</updated>
<author>
<name>Marc Kleine-Budde</name>
</author>
<published>2012-09-12T11:58:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c9d1f947a85e38b6dded469470c95ed62430cb3f'/>
<id>urn:sha1:c9d1f947a85e38b6dded469470c95ed62430cb3f</id>
<content type='text'>
This patch fixes the error path of udc_start(). Now NULL is used to
unset the peripheral with otg_set_peripheral().

Cc: stable &lt;stable@vger.kernel.org&gt;
Reviewed-by: Richard Zhao &lt;richard.zhao@freescale.com&gt;
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
Signed-off-by: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: chipidea: udc: add pullup fuction, needed by the uvc gadget</title>
<updated>2012-09-12T17:58:38Z</updated>
<author>
<name>Michael Grzeschik</name>
</author>
<published>2012-09-12T11:58:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c0a48e6c75f2ac190d812bea5fc339696e434c2e'/>
<id>urn:sha1:c0a48e6c75f2ac190d812bea5fc339696e434c2e</id>
<content type='text'>
Add function to physicaly enable or disable of pullup connection on the USB-D+
line. The uvc gaget will fail, if this function is not implemented.

Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Michael Grzeschik &lt;m.grzeschik@pengutronix.de&gt;
Acked-by: Felipe Balbi &lt;balbi@ti.com&gt;
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
Signed-off-by: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: chipidea: udc: fix setup of endpoint maxpacket size</title>
<updated>2012-09-12T17:58:37Z</updated>
<author>
<name>Michael Grzeschik</name>
</author>
<published>2012-09-12T11:58:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7f67c38bdcb6d8bce02e10521fbf1618b586319f'/>
<id>urn:sha1:7f67c38bdcb6d8bce02e10521fbf1618b586319f</id>
<content type='text'>
This patch changes the setup of the endpoint maxpacket size. All non control
endpoints are initialized with an undefined ((unsigned short)~0) maxpacket
size. The maxpacket size of Endpoint 0 will be kept at CTRL_PAYLOAD_MAX.

Some gadget drivers check for the maxpacket size before they enable the
endpoint, which leads to a wrong state in these drivers.

Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Michael Grzeschik &lt;m.grzeschik@pengutronix.de&gt;
Acked-by: Felipe Balbi &lt;balbi@ti.com&gt;
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
Signed-off-by: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: chipidea: permit driver bindings pass phy pointer</title>
<updated>2012-07-09T16:59:23Z</updated>
<author>
<name>Richard Zhao</name>
</author>
<published>2012-07-07T14:56:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a2c3d6902f6f9916b5376c44baa8c1d08bf92a27'/>
<id>urn:sha1:a2c3d6902f6f9916b5376c44baa8c1d08bf92a27</id>
<content type='text'>
Sometimes, the driver bindings may know what phy they use.
For example, when using device tree, the usb controller may have a
phandler pointing to usb phy.

Signed-off-by: Richard Zhao &lt;richard.zhao@freescale.com&gt;
Reviewed-by: Marek Vasut &lt;marex@denx.de&gt;
Acked-by: Felipe Balbi &lt;balbi@ti.com&gt;
Tested-by: Subodh Nijsure &lt;snijsure@grid-net.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
