<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/usb, branch v5.8</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v5.8</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.8'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2020-07-23T11:21:01Z</updated>
<entry>
<title>usb: tegra: Fix allocation for the FPCI context</title>
<updated>2020-07-23T11:21:01Z</updated>
<author>
<name>Jon Hunter</name>
<email>jonathanh@nvidia.com</email>
</author>
<published>2020-07-15T11:38:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0b987032f8b58ef51cc8a042f46cc0cf1f277172'/>
<id>urn:sha1:0b987032f8b58ef51cc8a042f46cc0cf1f277172</id>
<content type='text'>
Commit 5c4e8d3781bc ("usb: host: xhci-tegra: Add support for XUSB
context save/restore") is using the IPFS 'num_offsets' value when
allocating memory for FPCI context instead of the FPCI 'num_offsets'.

After commit cad064f1bd52 ("devres: handle zero size in devm_kmalloc()")
was added system suspend started failing on Tegra186. The kernel log
showed that the Tegra XHCI driver was crashing on entry to suspend when
attempting the save the USB context. On Tegra186, the IPFS context has a
zero length but the FPCI content has a non-zero length, and because of
the bug in the Tegra XHCI driver we are incorrectly allocating a zero
length array for the FPCI context. The crash seen on entering suspend
when we attempt to save the FPCI context and following commit
cad064f1bd52 ("devres: handle zero size in devm_kmalloc()") this now
causes a NULL pointer deference when we access the memory. Fix this by
correcting the amount of memory we are allocating for FPCI contexts.

Cc: stable@vger.kernel.org

Fixes: 5c4e8d3781bc ("usb: host: xhci-tegra: Add support for XUSB context save/restore")

Signed-off-by: Jon Hunter &lt;jonathanh@nvidia.com&gt;
Acked-by: Thierry Reding &lt;treding@nvidia.com&gt;
Link: https://lore.kernel.org/r/20200715113842.30680-1-jonathanh@nvidia.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: xhci: Fix ASM2142/ASM3142 DMA addressing</title>
<updated>2020-07-21T12:05:49Z</updated>
<author>
<name>Forest Crossman</name>
<email>cyrozap@gmail.com</email>
</author>
<published>2020-07-17T11:27:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=dbb0897e805f2ab1b8bc358f6c3d878a376b8897'/>
<id>urn:sha1:dbb0897e805f2ab1b8bc358f6c3d878a376b8897</id>
<content type='text'>
The ASM2142/ASM3142 (same PCI IDs) does not support full 64-bit DMA
addresses, which can cause silent memory corruption or IOMMU errors on
platforms that use the upper bits. Add the XHCI_NO_64BIT_SUPPORT quirk
to fix this issue.

Signed-off-by: Forest Crossman &lt;cyrozap@gmail.com&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Link: https://lore.kernel.org/r/20200717112734.328432-1-cyrozap@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: xhci-mtk: fix the failure of bandwidth allocation</title>
<updated>2020-07-21T12:05:49Z</updated>
<author>
<name>Chunfeng Yun</name>
<email>chunfeng.yun@mediatek.com</email>
</author>
<published>2020-07-10T05:57:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5ce1a24dd98c00a57a8fa13660648abf7e08e3ef'/>
<id>urn:sha1:5ce1a24dd98c00a57a8fa13660648abf7e08e3ef</id>
<content type='text'>
The wMaxPacketSize field of endpoint descriptor may be zero
as default value in alternate interface, and they are not
actually selected when start stream, so skip them when try to
allocate bandwidth.

Cc: stable &lt;stable@vger.kernel.org&gt;
Fixes: 0cbd4b34cda9 ("xhci: mediatek: support MTK xHCI host controller")
Signed-off-by: Chunfeng Yun &lt;chunfeng.yun@mediatek.com&gt;
Link: https://lore.kernel.org/r/1594360672-2076-1-git-send-email-chunfeng.yun@mediatek.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'usb-serial-5.8-rc6' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus</title>
<updated>2020-07-16T15:30:59Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2020-07-16T15:30:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c7300cdf8f683ae00cf74616b5fd14ffac327979'/>
<id>urn:sha1:c7300cdf8f683ae00cf74616b5fd14ffac327979</id>
<content type='text'>
Johan writes:

USB-serial fixes for 5.8-rc6

Here's a fix for 5.8 addressing a long-standing bug in iuu_phoenix.

* tag 'usb-serial-5.8-rc6' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial:
  USB: serial: iuu_phoenix: fix memory corruption
</content>
</entry>
<entry>
<title>USB: serial: iuu_phoenix: fix memory corruption</title>
<updated>2020-07-16T08:20:21Z</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2020-07-15T09:02:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e7b931bee739e8a77ae216e613d3b99342b6dec0'/>
<id>urn:sha1:e7b931bee739e8a77ae216e613d3b99342b6dec0</id>
<content type='text'>
The driver would happily overwrite its write buffer with user data in
256 byte increments due to a removed buffer-space sanity check.

Fixes: 5fcf62b0f1f2 ("tty: iuu_phoenix: fix locking.")
Cc: stable &lt;stable@vger.kernel.org&gt;     # 2.6.31
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'fixes-for-v5.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus</title>
<updated>2020-07-10T10:40:04Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2020-07-10T10:40:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d1c0d96535d7464d1111727c79d6dac274b8bc4f'/>
<id>urn:sha1:d1c0d96535d7464d1111727c79d6dac274b8bc4f</id>
<content type='text'>
Felipe writes:

USB: fixes for v5.8-rc3

Adding support for recent Intel devices (Tiger Lake and Jasper Lake)
on dwc3. We have some endianess fixes in cdns3, a memleak fix in
gr_udc and lock API usage fix in the legacy f_uac1

Signed-off-by: Felipe Balbi &lt;balbi@kernel.org&gt;

* tag 'fixes-for-v5.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb:
  usb: gadget: function: fix missing spinlock in f_uac1_legacy
  usb: gadget: udc: atmel: fix uninitialized read in debug printk
  usb: gadget: udc: atmel: remove outdated comment in usba_ep_disable()
  usb: dwc2: Fix shutdown callback in platform
  usb: cdns3: trace: fix some endian issues
  usb: cdns3: ep0: fix some endian issues
  usb: gadget: udc: gr_udc: fix memleak on error handling path in gr_ep_init()
  usb: gadget: fix langid kernel-doc warning in usbstring.c
  usb: dwc3: pci: add support for the Intel Jasper Lake
  usb: dwc3: pci: add support for the Intel Tiger Lake PCH -H variant
</content>
</entry>
<entry>
<title>USB: c67x00: fix use after free in c67x00_giveback_urb</title>
<updated>2020-07-10T07:01:41Z</updated>
<author>
<name>Tom Rix</name>
<email>trix@redhat.com</email>
</author>
<published>2020-07-08T13:12:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=211f08347355cba1f769bbf3355816a12b3ddd55'/>
<id>urn:sha1:211f08347355cba1f769bbf3355816a12b3ddd55</id>
<content type='text'>
clang static analysis flags this error

c67x00-sched.c:489:55: warning: Use of memory after it is freed [unix.Malloc]
        usb_hcd_giveback_urb(c67x00_hcd_to_hcd(c67x00), urb, urbp-&gt;status);
                                                             ^~~~~~~~~~~~
Problem happens in this block of code

	c67x00_release_urb(c67x00, urb);
	usb_hcd_unlink_urb_from_ep(c67x00_hcd_to_hcd(c67x00), urb);
	spin_unlock(&amp;c67x00-&gt;lock);
	usb_hcd_giveback_urb(c67x00_hcd_to_hcd(c67x00), urb, urbp-&gt;status);

In the call to c67x00_release_urb has this freeing of urbp

	urbp = urb-&gt;hcpriv;
	urb-&gt;hcpriv = NULL;
	list_del(&amp;urbp-&gt;hep_node);
	kfree(urbp);

And so urbp is freed before usb_hcd_giveback_urb uses it as its 3rd
parameter.

Since all is required is the status, pass the status directly as is
done in c64x00_urb_dequeue

Fixes: e9b29ffc519b ("USB: add Cypress c67x00 OTG controller HCD driver")
Signed-off-by: Tom Rix &lt;trix@redhat.com&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Link: https://lore.kernel.org/r/20200708131243.24336-1-trix@redhat.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: gadget: function: fix missing spinlock in f_uac1_legacy</title>
<updated>2020-07-09T07:13:07Z</updated>
<author>
<name>Zhang Qiang</name>
<email>qiang.zhang@windriver.com</email>
</author>
<published>2020-07-06T05:14:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8778eb0927ddcd3f431805c37b78fa56481aeed9'/>
<id>urn:sha1:8778eb0927ddcd3f431805c37b78fa56481aeed9</id>
<content type='text'>
Add a missing spinlock protection for play_queue, because
the play_queue may be destroyed when the "playback_work"
work func and "f_audio_out_ep_complete" callback func
operate this paly_queue at the same time.

Fixes: c6994e6f067cf ("USB: gadget: add USB Audio Gadget driver")
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Zhang Qiang &lt;qiang.zhang@windriver.com&gt;
Signed-off-by: Felipe Balbi &lt;balbi@kernel.org&gt;
</content>
</entry>
<entry>
<title>usb: gadget: udc: atmel: fix uninitialized read in debug printk</title>
<updated>2020-07-09T07:13:07Z</updated>
<author>
<name>Michał Mirosław</name>
<email>mirq-linux@rere.qmqm.pl</email>
</author>
<published>2020-05-28T18:35:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=30517ffeb3bff842e1355cbc32f1959d9dbb5414'/>
<id>urn:sha1:30517ffeb3bff842e1355cbc32f1959d9dbb5414</id>
<content type='text'>
Fixed commit moved the assignment of 'req', but did not update a
reference in the DBG() call. Use the argument as it was renamed.

Fixes: 5fb694f96e7c ("usb: gadget: udc: atmel: fix possible oops when unloading module")
Signed-off-by: Michał Mirosław &lt;mirq-linux@rere.qmqm.pl&gt;
Signed-off-by: Felipe Balbi &lt;balbi@kernel.org&gt;
</content>
</entry>
<entry>
<title>usb: gadget: udc: atmel: remove outdated comment in usba_ep_disable()</title>
<updated>2020-07-09T07:13:07Z</updated>
<author>
<name>Michał Mirosław</name>
<email>mirq-linux@rere.qmqm.pl</email>
</author>
<published>2020-05-28T18:35:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9706247d94165ef9d6f7f00308e1cd7e0cc9251d'/>
<id>urn:sha1:9706247d94165ef9d6f7f00308e1cd7e0cc9251d</id>
<content type='text'>
Fixed commit removed the offending behaviour from the driver, but missed
the comment and associated test. Remove them now.

Fixes: 38e58986e6fc ("usb: gadget: udc: atmel: don't disable enpdoints we don't own")
Signed-off-by: Michał Mirosław &lt;mirq-linux@rere.qmqm.pl&gt;
Signed-off-by: Felipe Balbi &lt;balbi@kernel.org&gt;
</content>
</entry>
</feed>
