<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/usb/gadget/udc, branch linux-5.17.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.17.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.17.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2022-04-13T17:27:09Z</updated>
<entry>
<title>usb: gadget: tegra-xudc: Fix control endpoint's definitions</title>
<updated>2022-04-13T17:27:09Z</updated>
<author>
<name>Wayne Chang</name>
</author>
<published>2022-01-07T09:13:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cac111f2060df1de9cf78b930feca8dae7fbc9e0'/>
<id>urn:sha1:cac111f2060df1de9cf78b930feca8dae7fbc9e0</id>
<content type='text'>
[ Upstream commit 7bd42fb95eb4f98495ccadf467ad15124208ec49 ]

According to the Tegra Technical Reference Manual, the seq_num
field of control endpoint is not [31:24] but [31:27]. Bit 24
is reserved and bit 26 is splitxstate.

The change fixes the wrong control endpoint's definitions.

Signed-off-by: Wayne Chang &lt;waynec@nvidia.com&gt;
Link: https://lore.kernel.org/r/20220107091349.149798-1-waynec@nvidia.com
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: gadget: tegra-xudc: Do not program SPARAM</title>
<updated>2022-04-13T17:27:08Z</updated>
<author>
<name>Wayne Chang</name>
</author>
<published>2022-01-07T09:04:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=54a6139f1e76d5bb434d34e560c6edd6274896e9'/>
<id>urn:sha1:54a6139f1e76d5bb434d34e560c6edd6274896e9</id>
<content type='text'>
[ Upstream commit 62fb61580eb48fc890b7bc9fb5fd263367baeca8 ]

According to the Tegra Technical Reference Manual, SPARAM
is a read-only register and should not be programmed in
the driver.

The change removes the wrong SPARAM usage.

Signed-off-by: Wayne Chang &lt;waynec@nvidia.com&gt;
Link: https://lore.kernel.org/r/20220107090443.149021-1-waynec@nvidia.com
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: gadget: Fix use-after-free bug by not setting udc-&gt;dev.driver</title>
<updated>2022-03-15T17:46:01Z</updated>
<author>
<name>Alan Stern</name>
</author>
<published>2022-03-06T02:47:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=16b1941eac2bd499f065a6739a40ce0011a3d740'/>
<id>urn:sha1:16b1941eac2bd499f065a6739a40ce0011a3d740</id>
<content type='text'>
The syzbot fuzzer found a use-after-free bug:

BUG: KASAN: use-after-free in dev_uevent+0x712/0x780 drivers/base/core.c:2320
Read of size 8 at addr ffff88802b934098 by task udevd/3689

CPU: 2 PID: 3689 Comm: udevd Not tainted 5.17.0-rc4-syzkaller-00229-g4f12b742eb2b #0
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.14.0-2 04/01/2014
Call Trace:
 &lt;TASK&gt;
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106
 print_address_description.constprop.0.cold+0x8d/0x303 mm/kasan/report.c:255
 __kasan_report mm/kasan/report.c:442 [inline]
 kasan_report.cold+0x83/0xdf mm/kasan/report.c:459
 dev_uevent+0x712/0x780 drivers/base/core.c:2320
 uevent_show+0x1b8/0x380 drivers/base/core.c:2391
 dev_attr_show+0x4b/0x90 drivers/base/core.c:2094

Although the bug manifested in the driver core, the real cause was a
race with the gadget core.  dev_uevent() does:

	if (dev-&gt;driver)
		add_uevent_var(env, "DRIVER=%s", dev-&gt;driver-&gt;name);

and between the test and the dereference of dev-&gt;driver, the gadget
core sets dev-&gt;driver to NULL.

The race wouldn't occur if the gadget core registered its devices on
a real bus, using the standard synchronization techniques of the
driver core.  However, it's not necessary to make such a large change
in order to fix this bug; all we need to do is make sure that
udc-&gt;dev.driver is always NULL.

In fact, there is no reason for udc-&gt;dev.driver ever to be set to
anything, let alone to the value it currently gets: the address of the
gadget's driver.  After all, a gadget driver only knows how to manage
a gadget, not how to manage a UDC.

This patch simply removes the statements in the gadget core that touch
udc-&gt;dev.driver.

Fixes: 2ccea03a8f7e ("usb: gadget: introduce UDC Class")
CC: &lt;stable@vger.kernel.org&gt;
Reported-and-tested-by: syzbot+348b571beb5eeb70a582@syzkaller.appspotmail.com
Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Link: https://lore.kernel.org/r/YiQgukfFFbBnwJ/9@rowland.harvard.edu
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>USB: gadget: validate endpoint index for xilinx udc</title>
<updated>2022-02-24T10:00:07Z</updated>
<author>
<name>Szymon Heidrich</name>
</author>
<published>2022-02-21T12:24:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7f14c7227f342d9932f9b918893c8814f86d2a0d'/>
<id>urn:sha1:7f14c7227f342d9932f9b918893c8814f86d2a0d</id>
<content type='text'>
Assure that host may not manipulate the index to point
past endpoint array.

Signed-off-by: Szymon Heidrich &lt;szymon.heidrich@gmail.com&gt;
Cc: stable &lt;stable@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: gadget: udc: renesas_usb3: Fix host to USB_ROLE_NONE transition</title>
<updated>2022-01-31T13:22:49Z</updated>
<author>
<name>Adam Ford</name>
</author>
<published>2022-01-28T22:36:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=459702eea6132888b5c5b64c0e9c626da4ec2493'/>
<id>urn:sha1:459702eea6132888b5c5b64c0e9c626da4ec2493</id>
<content type='text'>
The support the external role switch a variety of situations were
addressed, but the transition from USB_ROLE_HOST to USB_ROLE_NONE
leaves the host up which can cause some error messages when
switching from host to none, to gadget, to none, and then back
to host again.

 xhci-hcd ee000000.usb: Abort failed to stop command ring: -110
 xhci-hcd ee000000.usb: xHCI host controller not responding, assume dead
 xhci-hcd ee000000.usb: HC died; cleaning up
 usb 4-1: device not accepting address 6, error -108
 usb usb4-port1: couldn't allocate usb_device

After this happens it will not act as a host again.
Fix this by releasing the host mode when transitioning to USB_ROLE_NONE.

Fixes: 0604160d8c0b ("usb: gadget: udc: renesas_usb3: Enhance role switch support")
Cc: stable &lt;stable@vger.kernel.org&gt;
Reviewed-by: Yoshihiro Shimoda &lt;yoshihiro.shimoda.uh@renesas.com&gt;
Signed-off-by: Adam Ford &lt;aford173@gmail.com&gt;
Link: https://lore.kernel.org/r/20220128223603.2362621-1-aford173@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: gadget: at91_udc: fix incorrect print type</title>
<updated>2022-01-26T12:45:42Z</updated>
<author>
<name>Miles Chen</name>
</author>
<published>2022-01-19T02:08:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=26d81b29249273d39e753cc0c7b0ca62c6a6283f'/>
<id>urn:sha1:26d81b29249273d39e753cc0c7b0ca62c6a6283f</id>
<content type='text'>
Fix a build error observed with ARCH=arm DEFCONFIG=allmodconfig build.

drivers/usb/gadget/udc/at91_udc.h:174:42: error: format '%d' expects argument of type 'int', but argument 3 has type 'struct gpio_desc *' [-Werror=format=]

Fixes: 4a555f2b8d31 ("usb: gadget: at91_udc: Convert to GPIO descriptors")
Reviewed-by: Macpaul Lin &lt;macpaul.lin@mediatek.com&gt;
Signed-off-by: Miles Chen &lt;miles.chen@mediatek.com&gt;
Link: https://lore.kernel.org/r/20220119020849.25732-1-miles.chen@mediatek.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: gadget: udc: pxa25x: propagate errors from platform_get_irq()</title>
<updated>2021-12-17T15:54:23Z</updated>
<author>
<name>Sergey Shtylyov</name>
</author>
<published>2021-12-14T20:42:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=12ba912c30477481cb50158bc5ca0318f41a1762'/>
<id>urn:sha1:12ba912c30477481cb50158bc5ca0318f41a1762</id>
<content type='text'>
The driver overrides the error codes returned by platform_get_irq() to
-ENODEV for some strange reason.  Switch to propagating the error codes
upstream.

Acked-by: Daniel Mack &lt;daniel@zonque.org&gt;
Signed-off-by: Sergey Shtylyov &lt;s.shtylyov@omp.ru&gt;
Link: https://lore.kernel.org/r/20211214204247.7172-3-s.shtylyov@omp.ru
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: gadget: udc: bcm63xx: propagate errors from platform_get_irq()</title>
<updated>2021-12-17T15:54:23Z</updated>
<author>
<name>Sergey Shtylyov</name>
</author>
<published>2021-12-14T20:42:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4c71960105b4ad74bf0c30d0c9a40cf263e814ea'/>
<id>urn:sha1:4c71960105b4ad74bf0c30d0c9a40cf263e814ea</id>
<content type='text'>
The driver overrides the error codes returned by platform_get_irq() to
-ENXIO for some strange reason.  Switch to propagating the error codes
upstream.

Acked-by: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
Signed-off-by: Sergey Shtylyov &lt;s.shtylyov@omp.ru&gt;
Link: https://lore.kernel.org/r/20211214204247.7172-2-s.shtylyov@omp.ru
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: aspeed-vhub: support test mode feature</title>
<updated>2021-12-13T14:01:58Z</updated>
<author>
<name>Neal Liu</name>
</author>
<published>2021-12-08T10:05:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=aa9c2219f989881dffe2dd6ef9b6540858873a5f'/>
<id>urn:sha1:aa9c2219f989881dffe2dd6ef9b6540858873a5f</id>
<content type='text'>
Support aspeed usb vhub set feature to test mode.

Signed-off-by: Neal Liu &lt;neal_liu@aspeedtech.com&gt;
Acked-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Link: https://lore.kernel.org/r/20211208100545.1441397-5-neal_liu@aspeedtech.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: aspeed-vhub: fix ep0 OUT ack received wrong length issue</title>
<updated>2021-12-13T14:01:46Z</updated>
<author>
<name>Neal Liu</name>
</author>
<published>2021-12-08T10:05:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d693bbd4cbc44dac34dbf6c49c844d30f18ad0c1'/>
<id>urn:sha1:d693bbd4cbc44dac34dbf6c49c844d30f18ad0c1</id>
<content type='text'>
If multiple devices in vhub are enumerated simultaneously, ep0 OUT
ack might received wrong data length. Using expected data length
instead.

Acked-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Signed-off-by: Neal Liu &lt;neal_liu@aspeedtech.com&gt;
Link: https://lore.kernel.org/r/20211208100545.1441397-4-neal_liu@aspeedtech.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
