<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/usb/dwc3, 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-09-07T06:29:59Z</updated>
<entry>
<title>usb: dwc3: gadget: increment request-&gt;actual once</title>
<updated>2016-09-07T06:29:59Z</updated>
<author>
<name>Felipe Balbi</name>
</author>
<published>2016-07-29T00:17:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=baa329fab9da810d8e30a748aa22afa3b72e45e7'/>
<id>urn:sha1:baa329fab9da810d8e30a748aa22afa3b72e45e7</id>
<content type='text'>
commit c7de573471832dff7d31f0c13b0f143d6f017799 upstream.

When using SG lists, we would end up setting
request-&gt;actual to:

	num_mapped_sgs * (request-&gt;length - count)

Let's fix that up by incrementing request-&gt;actual
only once.

Reported-by: Brian E Rogers &lt;brian.e.rogers@intel.com&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>usb: dwc3: ep0: Fix mem corruption on OUT transfers of more than 512 bytes</title>
<updated>2015-09-21T17:02:18Z</updated>
<author>
<name>Kishon Vijay Abraham I</name>
</author>
<published>2015-07-27T06:55:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e3417b1051f6b16af929505241216774abefc2ec'/>
<id>urn:sha1:e3417b1051f6b16af929505241216774abefc2ec</id>
<content type='text'>
commit b2fb5b1a0f50d3ebc12342c8d8dead245e9c9d4e upstream.

DWC3 uses bounce buffer to handle non max packet aligned OUT transfers and
the size of bounce buffer is 512 bytes. However if the host initiates OUT
transfers of size more than 512 bytes (and non max packet aligned), the
driver throws a WARN dump but still programs the TRB to receive more than
512 bytes. This will cause bounce buffer to overflow and corrupt the
adjacent memory locations which can be fatal.

Fix it by programming the TRB to receive a maximum of DWC3_EP0_BOUNCE_SIZE
(512) bytes.

Signed-off-by: Kishon Vijay Abraham I &lt;kishon@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: dwc3: Reset the transfer resource index on SET_INTERFACE</title>
<updated>2015-08-03T16:29:54Z</updated>
<author>
<name>John Youn</name>
</author>
<published>2001-09-17T07:00:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=aeb166d2ab291475eeda9a7b42ca9d78c5de38ce'/>
<id>urn:sha1:aeb166d2ab291475eeda9a7b42ca9d78c5de38ce</id>
<content type='text'>
commit aebda618718157a69c0dc0adb978d69bc2b8723c upstream.

This fixes an issue introduced in commit b23c843992b6 (usb: dwc3:
gadget: fix DEPSTARTCFG for non-EP0 EPs) that made sure we would
only use DEPSTARTCFG once per SetConfig.

The trick is that we should use one DEPSTARTCFG per SetConfig *OR*
SetInterface. SetInterface was completely missed from the original
patch.

This problem became aparent after commit 76e838c9f776 (usb: dwc3:
gadget: return error if command sent to DEPCMD register fails)
added checking of the return status of device endpoint commands.

'Set Endpoint Transfer Resource' command was caught failing
occasionally. This is because the Transfer Resource
Index was not getting reset during a SET_INTERFACE request.

Finally, to fix the issue, was we have to do is make sure that
our start_config_issued flag gets reset whenever we receive a
SetInterface request.

To verify the problem (and its fix), all we have to do is run
test 9 from testusb with 'testusb -t 9 -s 2048 -a -c 5000'.

Tested-by: Huang Rui &lt;ray.huang@amd.com&gt;
Tested-by: Subbaraya Sundeep Bhatta &lt;subbaraya.sundeep.bhatta@xilinx.com&gt;
Fixes: b23c843992b6 (usb: dwc3: gadget: fix DEPSTARTCFG for non-EP0 EPs)
Signed-off-by: John Youn &lt;johnyoun@synopsys.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: dwc3: gadget: return error if command sent to DEPCMD register fails</title>
<updated>2015-08-03T16:29:54Z</updated>
<author>
<name>Subbaraya Sundeep Bhatta</name>
</author>
<published>2015-05-21T10:16:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=dfd5bab553dd52e1367c96e86965cbb345741bbe'/>
<id>urn:sha1:dfd5bab553dd52e1367c96e86965cbb345741bbe</id>
<content type='text'>
commit 76e838c9f7765f9a6205b4d558d75a66104bc60d upstream.

We need to return error to caller if command is not sent to
controller succesfully.

Signed-off-by: Subbaraya Sundeep Bhatta &lt;sbhatta@xilinx.com&gt;
Fixes: 72246da40f37 (usb: Introduce DesignWare USB3 DRD Driver)
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: gadget: return error if command sent to DGCMD register fails</title>
<updated>2015-08-03T16:29:54Z</updated>
<author>
<name>Subbaraya Sundeep Bhatta</name>
</author>
<published>2015-05-21T10:16:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=35910b3c03c66d782a78f801c624319e0bb7a06b'/>
<id>urn:sha1:35910b3c03c66d782a78f801c624319e0bb7a06b</id>
<content type='text'>
commit 891b1dc022955d36cf4c0f42d383226a930db7ed upstream.

We need to return error to caller if command is not sent to
controller succesfully.

Signed-off-by: Subbaraya Sundeep Bhatta &lt;sbhatta@xilinx.com&gt;
Fixes: b09bb64239c8 (usb: dwc3: gadget: implement Global Command support)
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: dwc3-omap: Fix disable IRQ</title>
<updated>2015-03-18T12:31:29Z</updated>
<author>
<name>George Cherian</name>
</author>
<published>2015-02-13T04:43:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=caceeec3c202bb7a30b4be52548f3a1cb3ed9c13'/>
<id>urn:sha1:caceeec3c202bb7a30b4be52548f3a1cb3ed9c13</id>
<content type='text'>
commit 96e5d31244c5542f5b2ea81d76f14ba4b8a7d440 upstream.

In the wrapper the IRQ disable should be done by writing 1's to the
IRQ*_CLR register. Existing code is broken because it instead writes
zeros to IRQ*_SET register.

Fix this by adding functions dwc3_omap_write_irqmisc_clr() and
dwc3_omap_write_irq0_clr() which do the right thing.

Fixes: 72246da40f37 ("usb: Introduce DesignWare USB3 DRD Driver")
Signed-off-by: George Cherian &lt;george.cherian@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: dwc3: gadget: Stop TRB preparation after limit is reached</title>
<updated>2015-01-27T16:18:56Z</updated>
<author>
<name>Amit Virdi</name>
</author>
<published>2015-01-13T08:57:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=adcf24128515915ae4a325af7a6d65b12e255709'/>
<id>urn:sha1:adcf24128515915ae4a325af7a6d65b12e255709</id>
<content type='text'>
commit 39e60635a01520e8c8ed3946a28c2b98e6a46f79 upstream.

DWC3 gadget sets up a pool of 32 TRBs for each EP during initialization. This
means, the max TRBs that can be submitted for an EP is fixed to 32. Since the
request queue for an EP is a linked list, any number of requests can be queued
to it by the gadget layer.  However, the dwc3 driver must not submit TRBs more
than the pool it has created for. This limit wasn't respected when SG was used
resulting in submitting more than the max TRBs, eventually leading to
non-transfer of the TRBs submitted over the max limit.

Root cause:
When SG is used, there are two loops iterating to prepare TRBs:
 - Outer loop over the request_list
 - Inner loop over the SG list
The code was missing break to get out of the outer loop.

Fixes: eeb720fb21d6 (usb: dwc3: gadget: add support for SG lists)
Signed-off-by: Amit Virdi &lt;amit.virdi@st.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: dwc3: gadget: Fix TRB preparation during SG</title>
<updated>2015-01-27T16:18:56Z</updated>
<author>
<name>Amit Virdi</name>
</author>
<published>2015-01-13T08:57:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0f1f031c46c984faeeca6d6d0adb7d11c2da3ced'/>
<id>urn:sha1:0f1f031c46c984faeeca6d6d0adb7d11c2da3ced</id>
<content type='text'>
commit ec512fb8e5611fed1df2895f90317ce6797d6b32 upstream.

When scatter gather (SG) is used, multiple TRBs are prepared from one DWC3
request (dwc3_request). So while preparing TRBs, the 'last' flag should be set
only when it is the last TRB being prepared from the last dwc3_request entry.

The current implementation uses list_is_last to check if the dwc3_request is the
last entry from the request_list. However, list_is_last returns false for the
last entry too. This is because, while preparing the first TRB from a request,
the function dwc3_prepare_one_trb modifies the request's next and prev pointers
while moving the URB to req_queued. Hence, list_is_last always returns false no
matter what.

The correct way is not to access the modified pointers of dwc3_request but to
use list_empty macro instead.

Fixes: e5ba5ec833aa (usb: dwc3: gadget: fix scatter gather implementation)
Signed-off-by: Amit Virdi &lt;amit.virdi@st.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: dwc3: gadget: fix set_halt() bug with pending transfers</title>
<updated>2014-11-14T17:00:11Z</updated>
<author>
<name>Felipe Balbi</name>
</author>
<published>2014-11-10T14:55:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=55016b9e6084a85d212dfdc17ee708c67c18507d'/>
<id>urn:sha1:55016b9e6084a85d212dfdc17ee708c67c18507d</id>
<content type='text'>
[ Upstream commit 7a60855972f0d3c014093046cb6f013a1ee5bb19 ]

According to our Gadget Framework API documentation,
-&gt;set_halt() *must* return -EAGAIN if we have pending
transfers (on either direction) or FIFO isn't empty (on
TX endpoints).

Fix this bug so that the mass storage gadget can be used
without stall=0 parameter.

This patch should be backported to all kernels since v3.2.

Suggested-by: Alan Stern &lt;stern@rowland.harvard.edu&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: dwc3: gadget: Properly initialize LINK TRB</title>
<updated>2014-11-14T17:00:04Z</updated>
<author>
<name>Jack Pham</name>
</author>
<published>2014-10-21T23:31:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ee3e596ae84a65c3657cfdda8e02480d1b50c247'/>
<id>urn:sha1:ee3e596ae84a65c3657cfdda8e02480d1b50c247</id>
<content type='text'>
commit 1200a82a59b6aa65758ccc92c3447b98c53cd7a2 upstream.

On ISOC endpoints the last trb_pool entry used as a
LINK TRB is not getting zeroed out correctly due to
memset being called incorrectly and in the wrong place.
If pool allocated from DMA was not zero-initialized
to begin with this will result in the size and ctrl
values being random garbage. Call memset correctly after
assignment of the trb_link pointer.

Fixes: f6bafc6a1c ("usb: dwc3: convert TRBs into bitshifts")
Signed-off-by: Jack Pham &lt;jackp@codeaurora.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>
</feed>
