<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/usb/dwc3/ep0.c, branch linux-3.3.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.3.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.3.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2012-04-27T17:16:53Z</updated>
<entry>
<title>usb: dwc3: ep0: increment "actual" on bounced ep0 case</title>
<updated>2012-04-27T17:16:53Z</updated>
<author>
<name>Felipe Balbi</name>
</author>
<published>2012-03-21T09:44:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=36de412a4eb52d3558b946f7055e83c19c31b1ba'/>
<id>urn:sha1:36de412a4eb52d3558b946f7055e83c19c31b1ba</id>
<content type='text'>
commit cd423dd3634a5232a3019eb372b144619a61cd16 upstream.

due to a HW limitation we have a bounce buffer for ep0
out transfers which are not aligned with MaxPacketSize.

On such case we were not increment r-&gt;actual as we should.

This patch fixes that mistake.

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: dwc3: ep0: fix compile warning</title>
<updated>2012-01-24T13:42:25Z</updated>
<author>
<name>Felipe Balbi</name>
</author>
<published>2012-01-10T15:29:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1a0955fed11363bea66742fffc6f8ad1e6800a6d'/>
<id>urn:sha1:1a0955fed11363bea66742fffc6f8ad1e6800a6d</id>
<content type='text'>
commit 34c60a7 (usb: dwc3: ep0: tidy up Pending
Request handling) introduced a compile warning
by leaving an unused variable.

This patch fixes that warning:

drivers/usb/dwc3/ep0.c: In function ‘__dwc3_gadget_ep0_queue’:
drivers/usb/dwc3/ep0.c:129:8: warning: unused variable ‘type’
[-Wunused-variable]

Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</content>
</entry>
<entry>
<title>usb: dwc3: ep0: tidy up Pending Request handling</title>
<updated>2012-01-24T13:41:22Z</updated>
<author>
<name>Felipe Balbi</name>
</author>
<published>2011-12-29T04:32:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=68d8a781575d7be490f97eb2c403fb13b083da6a'/>
<id>urn:sha1:68d8a781575d7be490f97eb2c403fb13b083da6a</id>
<content type='text'>
The way our code was written, we should never have
a DWC3_EP_PENDING_REQUEST flag set out of a Data Phase
and the code in __dwc3_gadget_ep0_queue() did not
reflect that situation properly.

Tidy up that case to avoid any possible mistakes
when starting requests for IRQs which are long
gone.

Cc: stable@vger.kernel.org
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</content>
</entry>
<entry>
<title>usb: dwc3: ep0: fix for possible early delayed_status</title>
<updated>2011-12-12T09:48:47Z</updated>
<author>
<name>Felipe Balbi</name>
</author>
<published>2011-12-08T11:56:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=68d3e668d245bb8300c7c6ddbc8508ddfe352e0f'/>
<id>urn:sha1:68d3e668d245bb8300c7c6ddbc8508ddfe352e0f</id>
<content type='text'>
There is a very small possibility (previously unimagined
by us) that the whole Mass Storage delayed status happens
rather early, before we even get our XferNotReady event.

In that case, we will be queueing a request to ep0 while
we're still on Setup Phase and we would be waiting for
another usb_ep_queue() forever.

Handle such cases by clearing dwc-&gt;delayed_status so that
we start control status from the next XferNotReady like
there was no wait for Delayed Status.

Tested against Linux 3.2-rc3 and USB30CV tool from USB-IF
(on a Windows XP with USB3 PCIe card).

Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</content>
</entry>
<entry>
<title>usb: dwc3: ep0: fix GetStatus handling (again)</title>
<updated>2011-12-12T09:48:46Z</updated>
<author>
<name>Felipe Balbi</name>
</author>
<published>2011-11-29T08:35:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e2617796053437df586c53e462076f74bcf268b4'/>
<id>urn:sha1:e2617796053437df586c53e462076f74bcf268b4</id>
<content type='text'>
previous commit fixed part of it but it was still
calling usb_ep_queue() from IRQ context without
loosing locks. That cannot be done otherwise we will
have a recursive locking.

Also, we need to assign the 'dep' pointer on
dwc-&gt;ep0_usb_req otherwise we will have a NULL
pointer dereference on dwc3_map_buffer_to_dma().

Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</content>
</entry>
<entry>
<title>usb: dwc3: ep0: use dwc3_request for ep0 requsts instead of usb_request</title>
<updated>2011-12-12T09:48:45Z</updated>
<author>
<name>Sebastian Andrzej Siewior</name>
</author>
<published>2011-11-25T11:03:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e0ce0b0a0ae5a31ee96b38a7c5390f867634b4f6'/>
<id>urn:sha1:e0ce0b0a0ae5a31ee96b38a7c5390f867634b4f6</id>
<content type='text'>
Instead of special functions and shortcuts for sending our internal
answers to the host we started doing what the gadget does and used the
public API for this. Since we only were using a few fields the
usb_request was enough. Later added the list handling in order to
synchronize the host / gadget events and now we require to have the
dwc3_request struct around our usb_request or else we touch memory that
does not belong to us. So this patch does this.

Reported-by: Partha Basak &lt;p-basak2@ti.com&gt;
Signed-off-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</content>
</entry>
<entry>
<title>usb: dwc3: workaround: missing disconnect event</title>
<updated>2011-12-12T09:48:42Z</updated>
<author>
<name>Felipe Balbi</name>
</author>
<published>2011-10-14T12:11:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=df62df56e13d73cb0dd4c54649d4fe13557128f8'/>
<id>urn:sha1:df62df56e13d73cb0dd4c54649d4fe13557128f8</id>
<content type='text'>
DWC3 revisions &lt;1.88a have an issue which would
case a missing Disconnect event if cable is
disconnected while there's a Setup packet
pending the FIFO.

Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</content>
</entry>
<entry>
<title>usb: dwc3: ep0: handle delayed_status again</title>
<updated>2011-12-12T09:48:31Z</updated>
<author>
<name>Sebastian Andrzej Siewior</name>
</author>
<published>2011-11-02T12:30:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5bdb1dcc63304a407e70020c1118fca1642bebaa'/>
<id>urn:sha1:5bdb1dcc63304a407e70020c1118fca1642bebaa</id>
<content type='text'>
Since the re-worked ep0 handling (which uses HW's hints to recognize the ep0
status) we lost the delayed status handling. This is used by the file and mass
storage gadget to gain some extra time so setup its internal status before it
can proceed further requests.
In particular the storage gadget does nothing on USB_REQ_SET_CONFIGURATION but
wakes up a thread which handles the request. If the udc driver continues ep0
handling before the thread did its work then then endpoint is not yet
configured and further requests will fail. Once the gadget is ready, it will
enqueue an empty packet which is used for synchronization.
In order to fix this issue, the patch does the following:
Set -&gt;delayed_status once the delayed_status has been notices and do not
continue on the next XferNotReady event. We will continues ep0 processing once
the gadget enqueued the zero packet for synchronization.

A cleaner approach would be to enforce the gadget to enqueue an empty
(zero) request even for the status phase but this would do for now.

Signed-off-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</content>
</entry>
<entry>
<title>usb: dwc3: ep0: push ep0state into xfernotready processing</title>
<updated>2011-12-12T09:48:30Z</updated>
<author>
<name>Sebastian Andrzej Siewior</name>
</author>
<published>2011-11-02T12:30:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f0f2b2a2db85f99637376caf25e46623af56acad'/>
<id>urn:sha1:f0f2b2a2db85f99637376caf25e46623af56acad</id>
<content type='text'>
We wait for the XferNotReady before we start the transfer and by then we
know ep0 state in which we supposed to be.
This is some cleanup work for the following patch in which we require to
know the ep0 state before the transfer completes.
While here, also change the argument to dwc3_ep0_do_control_status() so
we don't require the complete event structure but only the required
piece of information.

Inspired-by: Felipe Balbi &lt;balbi@ti.com&gt;
Signed-off-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</content>
</entry>
<entry>
<title>usb: dwc3: fix sparse errors</title>
<updated>2011-12-12T09:48:29Z</updated>
<author>
<name>Felipe Balbi</name>
</author>
<published>2011-11-04T10:40:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8becf2704415d2bf471a0a73ae84c3cc24da8a90'/>
<id>urn:sha1:8becf2704415d2bf471a0a73ae84c3cc24da8a90</id>
<content type='text'>
sparse caught three mistakes on this driver,
fix them:

drivers/usb/dwc3/ep0.c:806:29: warning: duplicate const
drivers/usb/dwc3/debugfs.c:481:15: warning: symbol 'dwc3_debugfs_init' \
	was not declared. Should it be static?
drivers/usb/dwc3/debugfs.c:518:16: warning: symbol 'dwc3_debugfs_exit' \
	was not declared. Should it be static?

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