<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/usb/dwc3, branch v4.19.112</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v4.19.112</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v4.19.112'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2020-03-11T13:14:58+00:00</updated>
<entry>
<title>usb: dwc3: gadget: Update chain bit correctly when using sg list</title>
<updated>2020-03-11T13:14:58+00:00</updated>
<author>
<name>Pratham Pratap</name>
<email>prathampratap@codeaurora.org</email>
</author>
<published>2020-03-02T21:44:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0c6023a3f0e20c8ceff4ee660f0453a0423f5295'/>
<id>urn:sha1:0c6023a3f0e20c8ceff4ee660f0453a0423f5295</id>
<content type='text'>
commit dad2aff3e827b112f27fa5e6f2bf87a110067c3f upstream.

If scatter-gather operation is allowed, a large USB request is split
into multiple TRBs. For preparing TRBs for sg list, driver iterates
over the list and creates TRB for each sg and mark the chain bit to
false for the last sg. The current IOMMU driver is clubbing the list
of sgs which shares a page boundary into one and giving it to USB driver.
With this the number of sgs mapped it not equal to the the number of sgs
passed. Because of this USB driver is not marking the chain bit to false
since it couldn't iterate to the last sg. This patch addresses this issue
by marking the chain bit to false if it is the last mapped sg.

At a practical level, this patch resolves USB transfer stalls
seen with adb on dwc3 based db845c, pixel3 and other qcom
hardware after functionfs gadget added scatter-gather support
around v4.20.

Credit also to Anurag Kumar Vulisha &lt;anurag.kumar.vulisha@xilinx.com&gt;
who implemented a very similar fix to this issue.

Cc: Felipe Balbi &lt;balbi@kernel.org&gt;
Cc: Yang Fei &lt;fei.yang@intel.com&gt;
Cc: Thinh Nguyen &lt;thinhn@synopsys.com&gt;
Cc: Tejas Joglekar &lt;tejas.joglekar@synopsys.com&gt;
Cc: Andrzej Pietrasiewicz &lt;andrzej.p@collabora.com&gt;
Cc: Jack Pham &lt;jackp@codeaurora.org&gt;
Cc: Todd Kjos &lt;tkjos@google.com&gt;
Cc: Greg KH &lt;gregkh@linuxfoundation.org&gt;
Cc: Linux USB List &lt;linux-usb@vger.kernel.org&gt;
Cc: stable &lt;stable@vger.kernel.org&gt; #4.20+
Signed-off-by: Pratham Pratap &lt;prathampratap@codeaurora.org&gt;
[jstultz: Slight tweak to remove sg_is_last() usage, reworked
          commit message, minor comment tweak]
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
Link: https://lore.kernel.org/r/20200302214443.55783-1-john.stultz@linaro.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>usb: dwc3: gadget: Check for IOC/LST bit in TRB-&gt;ctrl fields</title>
<updated>2020-02-28T15:38:47+00:00</updated>
<author>
<name>Anurag Kumar Vulisha</name>
<email>anurag.kumar.vulisha@xilinx.com</email>
</author>
<published>2020-01-27T19:30:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d59f6a6e35b7749a31dbf37a198e9dee2a62a709'/>
<id>urn:sha1:d59f6a6e35b7749a31dbf37a198e9dee2a62a709</id>
<content type='text'>
commit 5ee858975b13a9b40db00f456989a689fdbb296c upstream.

The current code in dwc3_gadget_ep_reclaim_completed_trb() will
check for IOC/LST bit in the event-&gt;status and returns if
IOC/LST bit is set. This logic doesn't work if multiple TRBs
are queued per request and the IOC/LST bit is set on the last
TRB of that request.

Consider an example where a queued request has multiple queued
TRBs and IOC/LST bit is set only for the last TRB. In this case,
the core generates XferComplete/XferInProgress events only for
the last TRB (since IOC/LST are set only for the last TRB). As
per the logic in dwc3_gadget_ep_reclaim_completed_trb()
event-&gt;status is checked for IOC/LST bit and returns on the
first TRB. This leaves the remaining TRBs left unhandled.

Similarly, if the gadget function enqueues an unaligned request
with sglist already in it, it should fail the same way, since we
will append another TRB to something that already uses more than
one TRB.

To aviod this, this patch changes the code to check for IOC/LST
bits in TRB-&gt;ctrl instead.

At a practical level, this patch resolves USB transfer stalls seen
with adb on dwc3 based HiKey960 after functionfs gadget added
scatter-gather support around v4.20.

Cc: Felipe Balbi &lt;balbi@kernel.org&gt;
Cc: Yang Fei &lt;fei.yang@intel.com&gt;
Cc: Thinh Nguyen &lt;thinhn@synopsys.com&gt;
Cc: Tejas Joglekar &lt;tejas.joglekar@synopsys.com&gt;
Cc: Andrzej Pietrasiewicz &lt;andrzej.p@collabora.com&gt;
Cc: Jack Pham &lt;jackp@codeaurora.org&gt;
Cc: Todd Kjos &lt;tkjos@google.com&gt;
Cc: Greg KH &lt;gregkh@linuxfoundation.org&gt;
Cc: Linux USB List &lt;linux-usb@vger.kernel.org&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Tested-by: Tejas Joglekar &lt;tejas.joglekar@synopsys.com&gt;
Reviewed-by: Thinh Nguyen &lt;thinhn@synopsys.com&gt;
Signed-off-by: Anurag Kumar Vulisha &lt;anurag.kumar.vulisha@xilinx.com&gt;
[jstultz: forward ported to mainline, reworded commit log, reworked
 to only check trb-&gt;ctrl as suggested by Felipe]
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
Signed-off-by: Felipe Balbi &lt;balbi@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>usb: dwc3: turn off VBUS when leaving host mode</title>
<updated>2020-02-01T09:37:02+00:00</updated>
<author>
<name>Bin Liu</name>
<email>b-liu@ti.com</email>
</author>
<published>2019-12-11T16:10:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=26962313b0adbc65c7354dac5a0a2ebb8a135d0a'/>
<id>urn:sha1:26962313b0adbc65c7354dac5a0a2ebb8a135d0a</id>
<content type='text'>
commit 09ed259fac621634d51cd986aa8d65f035662658 upstream.

VBUS should be turned off when leaving the host mode.
Set GCTL_PRTCAP to device mode in teardown to de-assert DRVVBUS pin to
turn off VBUS power.

Fixes: 5f94adfeed97 ("usb: dwc3: core: refactor mode initialization to its own function")
Cc: stable@vger.kernel.org
Signed-off-by: Bin Liu &lt;b-liu@ti.com&gt;
Signed-off-by: Felipe Balbi &lt;balbi@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>usb: dwc3: pci: add ID for the Intel Comet Lake -V variant</title>
<updated>2020-02-01T09:37:01+00:00</updated>
<author>
<name>Heikki Krogerus</name>
<email>heikki.krogerus@linux.intel.com</email>
</author>
<published>2020-01-17T09:30:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8896e2ef71d8a05bea30dc372fff339dd85af77f'/>
<id>urn:sha1:8896e2ef71d8a05bea30dc372fff339dd85af77f</id>
<content type='text'>
commit f5ae8869095552e3396ee3e404f9586cc6a828f0 upstream.

There is one more Comet Lake PCH variant, CML-V, that has
its own PCI ID.

Signed-off-by: Heikki Krogerus &lt;heikki.krogerus@linux.intel.com&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Link: https://lore.kernel.org/r/20200117093033.48616-1-heikki.krogerus@linux.intel.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>usb: dwc3: Allow building USB_DWC3_QCOM without EXTCON</title>
<updated>2020-01-27T13:51:22+00:00</updated>
<author>
<name>Marc Gonzalez</name>
<email>marc.w.gonzalez@free.fr</email>
</author>
<published>2019-04-24T15:00:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e2a5ad5ac8089ba471fd38b2a61de6a57e651883'/>
<id>urn:sha1:e2a5ad5ac8089ba471fd38b2a61de6a57e651883</id>
<content type='text'>
[ Upstream commit 77a4946516fe488b6a33390de6d749f934a243ba ]

Keep EXTCON support optional, as some platforms do not need it.

Do the same for USB_DWC3_OMAP while we're at it.

Fixes: 3def4031b3e3f ("usb: dwc3: add EXTCON dependency for qcom")
Signed-off-by: Marc Gonzalez &lt;marc.w.gonzalez@free.fr&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>usb: dwc3: add EXTCON dependency for qcom</title>
<updated>2020-01-27T13:49:57+00:00</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2018-09-13T09:37:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bc2ddaa2ab57d784ae46fa1af32551bd05268b1c'/>
<id>urn:sha1:bc2ddaa2ab57d784ae46fa1af32551bd05268b1c</id>
<content type='text'>
[ Upstream commit 3def4031b3e3fbb524cbd01555b057a6cef0d5e6 ]

Like the omap back-end, we get a link error with CONFIG_EXTCON=m
when building the qcom back-end into the kernel:

drivers/usb/dwc3/dwc3-qcom.o: In function `dwc3_qcom_probe':
dwc3-qcom.c:(.text+0x13dc): undefined reference to `extcon_get_edev_by_phandle'
dwc3-qcom.c:(.text+0x1b18): undefined reference to `devm_extcon_register_notifier'
dwc3-qcom.c:(.text+0x1b9c): undefined reference to `extcon_get_state'

Do the same thing as OMAP and add an explicit dependency on
EXTCON.

Fixes: a4333c3a6ba9 ("usb: dwc3: Add Qualcomm DWC3 glue driver")
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>usb: dwc3: gadget: Fix request complete check</title>
<updated>2020-01-12T11:17:29+00:00</updated>
<author>
<name>Thinh Nguyen</name>
<email>Thinh.Nguyen@synopsys.com</email>
</author>
<published>2019-12-14T02:40:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ceaeb21b4bdaaad81577abcbf1c86d35a31071aa'/>
<id>urn:sha1:ceaeb21b4bdaaad81577abcbf1c86d35a31071aa</id>
<content type='text'>
commit ea0d762775e20aaff7909a3f0866ff1688b1c618 upstream.

We can only check for IN direction if the request had completed. For OUT
direction, it's perfectly fine that the host can send less than the
setup length. Let's return true fall all cases of OUT direction.

Fixes: e0c42ce590fe ("usb: dwc3: gadget: simplify IOC handling")
Cc: stable@vger.kernel.org
Signed-off-by: Thinh Nguyen &lt;thinhn@synopsys.com&gt;
Link: https://lore.kernel.org/r/ac5a3593a94fdaa3d92e6352356b5f7a01ccdc7c.1576291140.git.thinhn@synopsys.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>usb: dwc3: ep0: Clear started flag on completion</title>
<updated>2019-12-17T19:34:45+00:00</updated>
<author>
<name>Thinh Nguyen</name>
<email>Thinh.Nguyen@synopsys.com</email>
</author>
<published>2019-11-27T21:10:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c6f58dcdbacbbd56fbec50deae8dc77937a831c7'/>
<id>urn:sha1:c6f58dcdbacbbd56fbec50deae8dc77937a831c7</id>
<content type='text'>
commit 2d7b78f59e020b07fc6338eefe286f54ee2d6773 upstream.

Clear ep0's DWC3_EP_TRANSFER_STARTED flag if the END_TRANSFER command is
completed. Otherwise, we can't start control transfer again after
END_TRANSFER.

Cc: stable@vger.kernel.org
Signed-off-by: Thinh Nguyen &lt;thinhn@synopsys.com&gt;
Signed-off-by: Felipe Balbi &lt;balbi@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>usb: dwc3: gadget: Fix logical condition</title>
<updated>2019-12-17T19:34:44+00:00</updated>
<author>
<name>Tejas Joglekar</name>
<email>Tejas.Joglekar@synopsys.com</email>
</author>
<published>2019-11-13T06:15:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=16831495d435710c4ae2cd663dc131b821549a68'/>
<id>urn:sha1:16831495d435710c4ae2cd663dc131b821549a68</id>
<content type='text'>
commit 8c7d4b7b3d43c54c0b8c1e4adb917a151c754196 upstream.

This patch corrects the condition to kick the transfer without
giving back the requests when either request has remaining data
or when there are pending SGs. The &amp;&amp; check was introduced during
spliting up the dwc3_gadget_ep_cleanup_completed_requests() function.

Fixes: f38e35dd84e2 ("usb: dwc3: gadget: split dwc3_gadget_ep_cleanup_completed_requests()")

Cc: stable@vger.kernel.org
Signed-off-by: Tejas Joglekar &lt;joglekar@synopsys.com&gt;
Signed-off-by: Felipe Balbi &lt;balbi@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>usb: dwc3: pci: add ID for the Intel Comet Lake -H variant</title>
<updated>2019-12-17T19:34:44+00:00</updated>
<author>
<name>Heikki Krogerus</name>
<email>heikki.krogerus@linux.intel.com</email>
</author>
<published>2019-12-12T09:37:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6aa56f58aaf5cd43c59bea0d81049459a3822d89'/>
<id>urn:sha1:6aa56f58aaf5cd43c59bea0d81049459a3822d89</id>
<content type='text'>
commit 3c3caae4cd6e122472efcf64759ff6392fb6bce2 upstream.

The original ID that was added for Comet Lake PCH was
actually for the -LP (low power) variant even though the
constant for it said CMLH. Changing that while at it.

Signed-off-by: Heikki Krogerus &lt;heikki.krogerus@linux.intel.com&gt;
Acked-by: Felipe Balbi &lt;balbi@kernel.org&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Link: https://lore.kernel.org/r/20191212093713.60614-1-heikki.krogerus@linux.intel.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
</feed>
